cosmetic change in resync code - added PAT scanning code if no SDT is found (in the...
[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)
6bc114b2
TA
66ifeq ($(BUILD_SHARED),yes)
67SLIB= $(SLIBPREF)avformat$(SLIBSUF)
68endif
85f07f22 69
cc0799e5 70SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
77b71ddc 71
6bc114b2 72all: $(LIB) $(SLIB)
85f07f22 73
cc0799e5 74$(LIB): $(OBJS) $(PPOBJS)
85f07f22 75 rm -f $@
cc0799e5 76 $(AR) rc $@ $(OBJS) $(PPOBJS)
be7109c1 77 $(RANLIB) $@
85f07f22 78
6bc114b2
TA
79$(SLIB): $(OBJS)
80 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
81
f8d7b5f5 82depend: $(SRCS)
7c235fe2
FB
83 $(CC) -MM $(CFLAGS) $^ 1>.depend
84
6bc114b2
TA
85install: all
86ifeq ($(BUILD_SHARED),yes)
87 install -d $(prefix)/lib
88 install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
89 ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
90 ldconfig || true
91 mkdir -p $(prefix)/include/ffmpeg
92 install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h
93 install -m 644 $(VPATH)/avio.h $(prefix)/include/ffmpeg/avio.h
94 install -m 644 $(VPATH)/rtp.h $(prefix)/include/ffmpeg/rtp.h
95 install -m 644 $(VPATH)/rtsp.h $(prefix)/include/ffmpeg/rtsp.h
96 install -m 644 $(VPATH)/rtspcodes.h $(prefix)/include/ffmpeg/rtspcodes.h
97endif
98
910fdd21
FB
99installlib: all
100 install -m 644 $(LIB) $(prefix)/lib
101 mkdir -p $(prefix)/include/ffmpeg
f60f0df1
TJ
102 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
103 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
104 $(SRC_PATH)/libavformat/rtspcodes.h \
910fdd21
FB
105 $(prefix)/include/ffmpeg
106
85f07f22
FB
107%.o: %.c
108 $(CC) $(CFLAGS) -c -o $@ $<
109
dfdfa47c
FR
110# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
111%.o: %.cpp
112 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
113
85f07f22 114clean:
7c235fe2
FB
115 rm -f *.o *.d .depend *~ *.a $(LIB)
116
117#
118# include dependency files if they exist
119#
120ifneq ($(wildcard .depend),)
121include .depend
122endif