Building ffmpeg with gcc-2.95.3 encountered a problem due to C99 initialization fix...
[libav.git] / libavformat / Makefile
CommitLineData
19720f15
FB
1#
2# libavformat Makefile
3# (c) 2000, 2001, 2002 Fabrice Bellard
4#
980fc7b8 5include ../config.mak
f57a4535 6
a382b927 7VPATH=$(SRC_PATH)/libavformat
f57a4535 8
eddbd7e5 9CFLAGS= $(OPTFLAGS) -Wall -g -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
85f07f22 10
910fdd21 11OBJS= utils.o cutils.o allformats.o
cc0799e5 12PPOBJS=
c9a65ca8
FB
13
14# mux and demuxes
5dbafeb7 15OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o raw.o rm.o \
0250738f 16 avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
d4f5d74a 17 yuv4mpeg.o 4xm.o flvenc.o flvdec.o
1d0d55da
MN
18
19ifeq ($(CONFIG_RISKY),yes)
20OBJS+= asf.o
21endif
22
bc634f6f
ZK
23ifeq ($(AMR_NB),yes)
24OBJS+= amr.o
25endif
26
87a0a681 27# image formats
85a57296 28OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
c9a65ca8
FB
29# file I/O
30OBJS+= avio.o aviobuf.o file.o
87a0a681 31OBJS+= framehook.o
8be1c656 32
487ec9a0
PG
33ifeq ($(BUILD_STRPTIME),yes)
34OBJS+= strptime.o
35endif
36
19720f15
FB
37ifeq ($(CONFIG_VIDEO4LINUX),yes)
38OBJS+= grab.o
8be1c656 39endif
85f07f22 40
8aa3ee32
MK
41ifeq ($(CONFIG_DV1394),yes)
42OBJS+= dv1394.o
43endif
44
19720f15
FB
45ifeq ($(CONFIG_AUDIO_OSS),yes)
46OBJS+= audio.o
47endif
48
dfdfa47c 49ifeq ($(CONFIG_AUDIO_BEOS),yes)
cc0799e5 50PPOBJS+= beosaudio.o
dfdfa47c
FR
51endif
52
19720f15 53ifeq ($(CONFIG_NETWORK),yes)
bdd7d518 54OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
cc0799e5 55# BeOS and Darwin network stuff
4baca069 56ifeq ($(NEED_INET_ATON),yes)
9ddd71fc
FR
57OBJS+= barpainet.o
58endif
a74127c0
FB
59endif
60
81e0d0b4
MH
61ifeq ($(CONFIG_VORBIS),yes)
62OBJS+= ogg.o
63endif
64
f3ec2d46 65LIB= $(LIBPREF)avformat$(LIBSUF)
85f07f22 66
cc0799e5 67SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
77b71ddc 68
85f07f22
FB
69all: $(LIB)
70
cc0799e5 71$(LIB): $(OBJS) $(PPOBJS)
85f07f22 72 rm -f $@
cc0799e5 73 $(AR) rc $@ $(OBJS) $(PPOBJS)
be7109c1 74 $(RANLIB) $@
85f07f22 75
f8d7b5f5 76depend: $(SRCS)
7c235fe2
FB
77 $(CC) -MM $(CFLAGS) $^ 1>.depend
78
910fdd21
FB
79installlib: all
80 install -m 644 $(LIB) $(prefix)/lib
81 mkdir -p $(prefix)/include/ffmpeg
f60f0df1
TJ
82 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
83 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
84 $(SRC_PATH)/libavformat/rtspcodes.h \
910fdd21
FB
85 $(prefix)/include/ffmpeg
86
85f07f22
FB
87%.o: %.c
88 $(CC) $(CFLAGS) -c -o $@ $<
89
dfdfa47c
FR
90# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
91%.o: %.cpp
92 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
93
85f07f22 94clean:
7c235fe2
FB
95 rm -f *.o *.d .depend *~ *.a $(LIB)
96
97#
98# include dependency files if they exist
99#
100ifneq ($(wildcard .depend),)
101include .depend
102endif