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 #FIXME: This should be in configure/config.mak
12 ifeq ($(CONFIG_WIN32),yes)
13 LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
16 OBJS= utils.o cutils.o os_support.o allformats.o
20 OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
21 avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
22 yuv4mpeg.o 4xm.o flvdec.o psxstr.o idroq.o ipmovie.o \
23 nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
24 sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o \
25 ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o aiff.o \
29 ifeq ($(CONFIG_MUXERS),yes)
30 OBJS+= flvenc.o movenc.o asf-enc.o adtsenc.o
38 ifeq ($(AMR_NB_FIXED),yes)
47 OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
50 ifeq ($(CONFIG_VIDEO4LINUX),yes)
54 ifeq ($(CONFIG_VIDEO4LINUX2),yes)
58 ifeq ($(CONFIG_BKTR),yes)
62 ifeq ($(CONFIG_DV1394),yes)
66 ifeq ($(CONFIG_DC1394),yes)
70 ifeq ($(CONFIG_AUDIO_OSS),yes)
74 EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
76 ifeq ($(CONFIG_AUDIO_BEOS),yes)
81 OBJS+= avio.o aviobuf.o
83 ifeq ($(CONFIG_PROTOCOLS),yes)
85 ifeq ($(CONFIG_NETWORK),yes)
86 OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
87 # BeOS and Darwin network stuff
88 ifeq ($(NEED_INET_ATON),yes)
94 ifeq ($(CONFIG_LIBOGG),yes)
98 ifeq ($(TARGET_ARCH_SPARC64),yes)
99 CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
103 ifeq ($(BUILD_SHARED),yes)
104 LIBVERSION=$(LAVFVERSION)
105 LIBMAJOR=$(LAVFMAJOR)
106 AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
109 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
111 all: $(LIB) $(SLIBNAME)
113 $(LIB): $(OBJS) $(PPOBJS)
115 $(AR) rc $@ $(OBJS) $(PPOBJS)
119 $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
120 ifeq ($(CONFIG_WIN32),yes)
121 -lib /machine:i386 /def:$(@:.dll=.def)
125 $(CC) -MM $(CFLAGS) $^ 1>.depend
127 ifeq ($(BUILD_SHARED),yes)
129 ifeq ($(CONFIG_WIN32),yes)
130 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
133 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
134 $(libdir)/$(SLIBNAME_WITH_VERSION)
135 ln -sf $(SLIBNAME_WITH_VERSION) \
136 $(libdir)/$(SLIBNAME_WITH_MAJOR)
137 ln -sf $(SLIBNAME_WITH_VERSION) \
138 $(libdir)/$(SLIBNAME)
146 install -m 644 $(LIB) "$(libdir)"
149 mkdir -p "$(prefix)/include/ffmpeg"
150 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
151 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
152 $(SRC_PATH)/libavformat/rtspcodes.h \
153 "$(prefix)/include/ffmpeg"
154 install -d "$(libdir)/pkgconfig"
155 install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
158 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
160 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
162 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
165 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
166 *.lib *.def *.dll.a *.exp
172 # include dependency files if they exist
174 ifneq ($(wildcard .depend),)