3 # (c) 2000-2003 Fabrice Bellard
7 VPATH=$(SRC_PATH)/libavformat
9 CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -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 mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
17 yuv4mpeg.o 4xm.o flvdec.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 sol.o electronicarts.o nsvdec.o asf.o \
20 ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o
23 ifeq ($(CONFIG_MUXERS),yes)
24 OBJS+= flvenc.o movenc.o asf-enc.o
32 ifeq ($(AMR_NB_FIXED),yes)
41 OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
44 ifeq ($(CONFIG_VIDEO4LINUX),yes)
48 ifeq ($(CONFIG_BKTR),yes)
52 ifeq ($(CONFIG_DV1394),yes)
56 ifeq ($(CONFIG_DC1394),yes)
60 ifeq ($(CONFIG_AUDIO_OSS),yes)
64 EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
66 ifeq ($(CONFIG_AUDIO_BEOS),yes)
71 OBJS+= avio.o aviobuf.o
73 ifeq ($(CONFIG_PROTOCOLS),yes)
75 ifeq ($(CONFIG_NETWORK),yes)
76 OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
77 # BeOS and Darwin network stuff
78 ifeq ($(NEED_INET_ATON),yes)
84 ifeq ($(CONFIG_LIBOGG),yes)
88 ifeq ($(TARGET_ARCH_SPARC64),yes)
89 CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
93 ifeq ($(BUILD_SHARED),yes)
94 LIBVERSION=$(LAVFVERSION)
96 AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
99 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
101 all: $(LIB) $(SLIBNAME)
103 $(LIB): $(OBJS) $(PPOBJS)
105 $(AR) rc $@ $(OBJS) $(PPOBJS)
109 ifeq ($(CONFIG_WIN32),yes)
110 $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
111 -lib /machine:i386 /def:$(@:.dll=.def)
113 $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
117 $(CC) -MM $(CFLAGS) $^ 1>.depend
119 ifeq ($(BUILD_SHARED),yes)
120 install: all install-headers
121 ifeq ($(CONFIG_WIN32),yes)
122 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
125 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
126 $(libdir)/$(SLIBNAME_WITH_VERSION)
127 ln -sf $(SLIBNAME_WITH_VERSION) \
128 $(libdir)/$(SLIBNAME_WITH_MAJOR)
129 ln -sf $(SLIBNAME_WITH_VERSION) \
130 $(libdir)/$(SLIBNAME)
137 installlib: all install-headers
138 install -m 644 $(LIB) "$(libdir)"
141 mkdir -p "$(prefix)/include/ffmpeg"
142 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
143 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
144 $(SRC_PATH)/libavformat/rtspcodes.h \
145 "$(prefix)/include/ffmpeg"
146 install -d "$(libdir)/pkgconfig"
147 install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
150 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
152 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
154 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
157 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
160 rm -f Makefile.bak .depend
163 # include dependency files if they exist
165 ifneq ($(wildcard .depend),)