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 img2.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 \
19 sierravmd.o matroska.o
21 ifeq ($(CONFIG_RISKY),yes)
29 ifeq ($(AMR_NB_FIXED),yes)
37 OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.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 ifeq ($(TARGET_ARCH_SPARC64),yes)
74 CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
77 LIB= $(LIBPREF)avformat$(LIBSUF)
78 ifeq ($(BUILD_SHARED),yes)
79 SLIB= $(SLIBPREF)avformat$(SLIBSUF)
82 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
86 $(LIB): $(OBJS) $(PPOBJS)
88 $(AR) rc $@ $(OBJS) $(PPOBJS)
92 ifeq ($(CONFIG_WIN32),yes)
93 $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
94 -lib /machine:i386 /def:$(@:.dll=.def)
96 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
100 $(CC) -MM $(CFLAGS) $^ 1>.depend
102 ifeq ($(BUILD_SHARED),yes)
103 install: all install-headers
104 ifeq ($(CONFIG_WIN32),yes)
105 install -s -m 755 $(SLIB) "$(prefix)"
107 install -d $(prefix)/lib
108 install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
109 ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
116 installlib: all install-headers
117 install -m 644 $(LIB) $(prefix)/lib
120 mkdir -p "$(prefix)/include/ffmpeg"
121 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
122 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
123 $(SRC_PATH)/libavformat/rtspcodes.h \
124 "$(prefix)/include/ffmpeg"
127 $(CC) $(CFLAGS) -c -o $@ $<
129 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
131 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
134 rm -f *.o *.d .depend *~ *.a $(LIB)
137 # include dependency files if they exist
139 ifneq ($(wildcard .depend),)