#/************************************************************************** # * # * Linux PPC makefile # * # * Adapted from linux x86 Makefile by Guillaume Morin # * # * libso: # * (-lm not neccessary if using -ffast-math) # * # *************************************************************************/ include Makefile.inc CC = gcc CFLAGS = -DLINUX -DARCH_PPC -DARCH_IS_BIG_ENDIAN -DARCH_PPC_ALTIVEC LIBDIR = /usr/local/lib CFLAGS += -Wall -O3 -funroll-loops -ffast-math CFLAGS += -fstrict-aliasing -fomit-frame-pointer ## for profiling, uncomment the next line. #CFLAGS += -D_PROFILING_ ## for debugging, comment the previous lines and uncomment the next one. #CFLAGS += -Wall -g AS = as # if GNU as choke on Altivec instructions, try to comment the previous # line, and uncomment the next one. # AS = as -mvec %.o: %.s $(AS) $< -o $@ RM = rm -rf all: $(LIB) $(LIBSO) $(LIB): $(SRC:.c=.o) $(SRC_ALTIVEC:.s=.o) ar rcs $@ $^ $(LIBSO): $(SRC:.c=.o) $(SRC_ALTIVEC:.s=.o) $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@ clean: $(RM) `find $(SRCDIR) -name "*.o"` remove-all: $(RM) $(DIRS) $(RM) $(DIRS_PPC) $(RM) $(LIB) $(RM) $(LIBSO) install: libxvidcore.so cp libxvidcore.so $(LIBDIR) # you have to be root for this /sbin/ldconfig install-test: libxvidcore.so # if you don't want to overwrite previous compile cp libxvidcore.so $(LIBDIR)/libtestcore.so /sbin/ldconfig