LIBNAME = libx264.a include config.mak SRCS = encoder/analyse.c \ encoder/cabac.c \ encoder/cavlc.c \ encoder/encoder.c \ encoder/eval.c \ encoder/macroblock.c \ encoder/me.c \ encoder/ratecontrol.c \ encoder/set.c \ common/cabac.c \ common/common.c \ common/cpu.c \ common/csp.c \ common/dct.c \ common/frame.c \ common/macroblock.c \ common/mc.c \ common/mdate.c \ common/pixel.c \ common/predict.c \ common/set.c X86_SRCS = common/i386/cpu-a.asm \ common/i386/dct-a.asm \ common/i386/dct-c.c \ common/i386/mc-a2.asm \ common/i386/mc-a.asm \ common/i386/mc-c.c \ common/i386/pixel-a.asm \ common/i386/predict-a.asm \ common/i386/predict.c X86_64_SRCS = common/amd64/cpu-a.asm \ common/amd64/dct-a.asm \ common/amd64/mc-a.asm \ common/amd64/mc-a2.asm \ common/amd64/pixel-a.asm \ common/amd64/predict-a.asm PPC_SRCS = common/ppc/mc.c \ common/ppc/pixel.c \ common/ppc/dct.c SPARC_SRCS = common/sparc/pixel.asm TMPOBJS = $(SRCS:.c=.o) OBJS = $(TMPOBJS:.asm=.o) INCLUDE = -I. -I.. $(EXTRA_INC) CFLAGS = $(OPTFLAGS) $(INCLUDE) ifeq ($(VIS),yes) SRCS += common/visualize.c common/display-x11.c CFLAGS += "-DVISUALIZE=1" endif ifeq ($(TARGET_ARCH_X86),yes) SRCS += $(X86_SRCS) CFLAGS += -DARCH_X86 CFLAGS += -DHAVE_MMXEXT -DHAVE_SSE2 endif ifeq ($(TARGET_ARCH_X86_64),yes) SRCS += $(X86_64_SRCS) CFLAGS += -DARCH_X86_64 CFLAGS += -DHAVE_MMXEXT -DHAVE_SSE2 endif ifeq ($(TARGET_ARCH_POWERPC),yes) SRCS += $(PPC_SRCS) CFLAGS += -DARCH_PPC endif ifeq ($(TARGET_ARCH_SPARC),yes) SRCS += $(SPARC_SRCS) CFLAGS += -DARCH_UltraSparc endif ifeq ($(TARGET_OS),Linux) CFLAGS += -DSYS_LINUX endif ifeq ($(TARGET_OS),FreeBSD) CFLAGS += -DSYS_FREEBSD endif ifeq ($(TARGET_OS),Darwin) CFLAGS += -DSYS_MACOSX endif ifeq ($(TARGET_OS),SunOS) CFLAGS += -DSYS_SunOS endif ifeq ($(TARGET_OS),CYGWIN) CFLAGS += -DSYS_CYGWIN endif CFLAGS += -D__X264__ -DNDEBUG .SUFFIXES: .c .asm .o # .PHONY: all clean .c.o: $(CC) -c $(CFLAGS) -o $@ $< .asm.o: $(NASM) -f elf -o $@ $< $(LIBNAME): config.h $(OBJS) echo $(OBJS) $(AR) r $(LIBNAME) $(OBJS) $(RANLIB) $(LIBNAME) config.h: echo "#define X264_VERSION \" svn-`date +%F`\"" > config.h all: config.h $(LIBNAME) DIRS = . common encoder common/i386 common/ppc common/amd64 clean: @for a in $(DIRS) ; do rm -f $$a/*.o $$a/*.a $$a/*~ ; done rm config.h distclean: clean rm -f Makefile.bak .depend dep: depend depend: $(CC) -MM $(CFLAGS) $(SRCS:%.asm=) 1>.depend # # include dependency files if they exist # ifneq ($(wildcard .depend),) include .depend endif