1include ../../config.mak 2 3vpath %.c $(SRC_PATH)/modules/ffmpeg_in 4 5CFLAGS=-fPIC $(OPTFLAGS) -Wno-deprecated-declarations -I"$(SRC_PATH)/include" $(ffmpeg_cflags) 6 7ifeq ($(DEBUGBUILD), yes) 8CFLAGS+=-g 9LDFLAGS+=-g 10endif 11 12ifeq ($(GPROFBUILD), yes) 13CFLAGS+=-pg 14LDFLAGS+=-pg 15endif 16 17LOCAL_LIB= 18 19LINKFLAGS=$(ffmpeg_lflags) 20 21ifeq ($(STATICBUILD),yes) 22##include static modules and other deps for libgpac 23include ../../static.mak 24LINKFLAGS+=-lgpac_static 25LINKFLAGS+=$(EXTRALIBS) 26else 27LINKFLAGS+=-lgpac 28endif 29 30#common obj 31OBJS=ffmpeg_decode.o ffmpeg_demux.o ffmpeg_load.o 32 33 34#darwin needs bz2 35ifeq ($(CONFIG_DARWIN),yes) 36LINKFLAGS+=-lbz2 37endif 38 39#old ffmpeg lib 40ifeq ($(CONFIG_FFMPEG_OLD), yes) 41CFLAGS+=-DFFMPEG_OLD_HEADERS -I/usr/include 42else 43LINKFLAGS+=-lswscale 44endif 45 46#local ffmpeg lib 47ifeq ($(CONFIG_FFMPEG), local) 48LOCAL_LIB=-L../../extra_lib/lib/gcc 49CFLAGS+= -I"$(LOCAL_INC_PATH)" 50endif 51 52ifeq ($(CONFIG_ZLIB), local) 53LOCAL_LIB=-L../../extra_lib/lib/gcc 54endif 55 56 57SRCS := $(OBJS:.o=.c) 58 59LIB=gm_ffmpeg_in$(DYN_LIB_SUFFIX) 60ifeq ($(CONFIG_WIN32),yes) 61#LDFLAGS+=-export-symbols ffmpeg_in.def 62endif 63 64#need to add cross-libraries if not local 65ifeq ($(CROSS_COMPILING),yes) 66LINKFLAGS+=-L$(prefix)/$(libdir) 67endif 68 69 70all: $(LIB) 71 72 73$(LIB): $(OBJS) 74 $(CC) $(SHFLAGS) -o ../../bin/gcc/$@ $(OBJS) -L../../bin/gcc $(LOCAL_LIB) $(LDFLAGS) $(LINKFLAGS) 75 76clean: 77 rm -f $(OBJS) ../../bin/gcc/$(LIB) 78 79dep: depend 80 81depend: 82 rm -f .depend 83 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend 84 85distclean: clean 86 rm -f Makefile.bak .depend 87 88-include .depend 89