3 # (c) 2000-2003 Fabrice Bellard
7 VPATH=$(SRC_PATH)/libavformat
9 CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
11 OBJS= utils.o cutils.o os_support.o allformats.o
15 OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o raw.o rm.o \
16 avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
17 yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
18 nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
21 ifeq ($(CONFIG_RISKY),yes)
29 ifeq ($(AMR_NB_FIXED),yes)
37 OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
39 OBJS+= avio.o aviobuf.o file.o
42 ifeq ($(CONFIG_VIDEO4LINUX),yes)
46 ifeq ($(CONFIG_DV1394),yes)
50 ifeq ($(CONFIG_AUDIO_OSS),yes)
54 ifeq ($(CONFIG_AUDIO_BEOS),yes)
56 EXTRALIBS+=-lbe -lmedia
57 # this should be the default !
58 EXTRALIBS+=-lavcodec -L../libavcodec
61 ifeq ($(CONFIG_NETWORK),yes)
62 OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
63 # BeOS and Darwin network stuff
64 ifeq ($(NEED_INET_ATON),yes)
69 ifeq ($(CONFIG_VORBIS),yes)
73 LIB= $(LIBPREF)avformat$(LIBSUF)
74 ifeq ($(BUILD_SHARED),yes)
75 SLIB= $(SLIBPREF)avformat$(SLIBSUF)
78 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
82 $(LIB): $(OBJS) $(PPOBJS)
84 $(AR) rc $@ $(OBJS) $(PPOBJS)
88 ifeq ($(CONFIG_WIN32),yes)
89 $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
90 -lib /machine:i386 /def:$(@:.dll=.def)
92 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
96 $(CC) -MM $(CFLAGS) $^ 1>.depend
98 ifeq ($(BUILD_SHARED),yes)
99 install: all install-headers
100 ifeq ($(CONFIG_WIN32),yes)
101 install -s -m 755 $(SLIB) "$(prefix)"
103 install -d $(prefix)/lib
104 install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
105 ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
112 installlib: all install-headers
113 install -m 644 $(LIB) $(prefix)/lib
116 mkdir -p "$(prefix)/include/ffmpeg"
117 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
118 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
119 $(SRC_PATH)/libavformat/rtspcodes.h \
120 "$(prefix)/include/ffmpeg"
123 $(CC) $(CFLAGS) -c -o $@ $<
125 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
127 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
130 rm -f *.o *.d .depend *~ *.a $(LIB)
133 # include dependency files if they exist
135 ifneq ($(wildcard .depend),)