dependency handling is consistant with libavcodec
[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
19720f15
FB
31ifeq ($(CONFIG_AUDIO_OSS),yes)
32OBJS+= audio.o
33endif
34
dfdfa47c
FR
35ifeq ($(CONFIG_AUDIO_BEOS),yes)
36OBJS+= beosaudio.o
37endif
38
19720f15 39ifeq ($(CONFIG_NETWORK),yes)
bdd7d518 40OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
9ddd71fc 41# BeOS network stuff
4baca069 42ifeq ($(NEED_INET_ATON),yes)
9ddd71fc
FR
43OBJS+= barpainet.o
44endif
a74127c0
FB
45endif
46
81e0d0b4
MH
47ifeq ($(CONFIG_VORBIS),yes)
48OBJS+= ogg.o
49endif
50
f3ec2d46 51LIB= $(LIBPREF)avformat$(LIBSUF)
85f07f22 52
7c235fe2 53SRCS := $(OBJS:.o=.c)
77b71ddc 54
85f07f22
FB
55all: $(LIB)
56
7c235fe2 57$(LIB): .depend $(OBJS)
85f07f22 58 rm -f $@
be7109c1 59 $(AR) rc $@ $(OBJS)
f3ec2d46 60ifneq ($(CONFIG_OS2),yes)
be7109c1 61 $(RANLIB) $@
f3ec2d46 62endif
85f07f22 63
7c235fe2
FB
64.depend: $(SRCS)
65 $(CC) -MM $(CFLAGS) $^ 1>.depend
66
910fdd21
FB
67installlib: all
68 install -m 644 $(LIB) $(prefix)/lib
69 mkdir -p $(prefix)/include/ffmpeg
f60f0df1
TJ
70 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
71 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
72 $(SRC_PATH)/libavformat/rtspcodes.h \
910fdd21
FB
73 $(prefix)/include/ffmpeg
74
85f07f22
FB
75%.o: %.c
76 $(CC) $(CFLAGS) -c -o $@ $<
77
dfdfa47c
FR
78# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
79%.o: %.cpp
80 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
81
85f07f22 82clean:
7c235fe2
FB
83 rm -f *.o *.d .depend *~ *.a $(LIB)
84
85#
86# include dependency files if they exist
87#
88ifneq ($(wildcard .depend),)
89include .depend
90endif