* headers valid for C++ compilers
[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
c9a65ca8
FB
12
13# mux and demuxes
14OBJS+=mpeg.o mpegts.o ffm.o crc.o img.o raw.o rm.o asf.o \
87a0a681
FB
15 avienc.o avidec.o wav.o swf.o au.o gif.o mov.o jpeg.o dv.o \
16 yuv4mpeg.o
17# image formats
18OBJS+= pnm.o yuv.o
c9a65ca8
FB
19# file I/O
20OBJS+= avio.o aviobuf.o file.o
87a0a681 21OBJS+= framehook.o
8be1c656 22
487ec9a0
PG
23ifeq ($(BUILD_STRPTIME),yes)
24OBJS+= strptime.o
25endif
26
19720f15
FB
27ifeq ($(CONFIG_VIDEO4LINUX),yes)
28OBJS+= grab.o
8be1c656 29endif
85f07f22 30
8aa3ee32
MK
31ifeq ($(CONFIG_DV1394),yes)
32OBJS+= dv1394.o
33endif
34
19720f15
FB
35ifeq ($(CONFIG_AUDIO_OSS),yes)
36OBJS+= audio.o
37endif
38
dfdfa47c
FR
39ifeq ($(CONFIG_AUDIO_BEOS),yes)
40OBJS+= beosaudio.o
41endif
42
19720f15 43ifeq ($(CONFIG_NETWORK),yes)
bdd7d518 44OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
9ddd71fc 45# BeOS network stuff
4baca069 46ifeq ($(NEED_INET_ATON),yes)
9ddd71fc
FR
47OBJS+= barpainet.o
48endif
a74127c0
FB
49endif
50
81e0d0b4
MH
51ifeq ($(CONFIG_VORBIS),yes)
52OBJS+= ogg.o
53endif
54
f3ec2d46 55LIB= $(LIBPREF)avformat$(LIBSUF)
85f07f22 56
7c235fe2 57SRCS := $(OBJS:.o=.c)
77b71ddc 58
85f07f22
FB
59all: $(LIB)
60
7c235fe2 61$(LIB): .depend $(OBJS)
85f07f22 62 rm -f $@
be7109c1 63 $(AR) rc $@ $(OBJS)
f3ec2d46 64ifneq ($(CONFIG_OS2),yes)
be7109c1 65 $(RANLIB) $@
f3ec2d46 66endif
85f07f22 67
7c235fe2
FB
68.depend: $(SRCS)
69 $(CC) -MM $(CFLAGS) $^ 1>.depend
70
910fdd21
FB
71installlib: all
72 install -m 644 $(LIB) $(prefix)/lib
73 mkdir -p $(prefix)/include/ffmpeg
f60f0df1
TJ
74 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
75 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
76 $(SRC_PATH)/libavformat/rtspcodes.h \
910fdd21
FB
77 $(prefix)/include/ffmpeg
78
85f07f22
FB
79%.o: %.c
80 $(CC) $(CFLAGS) -c -o $@ $<
81
dfdfa47c
FR
82# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
83%.o: %.cpp
84 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
85
85f07f22 86clean:
7c235fe2
FB
87 rm -f *.o *.d .depend *~ *.a $(LIB)
88
89#
90# include dependency files if they exist
91#
92ifneq ($(wildcard .depend),)
93include .depend
94endif