set keyframe flag at a more central place instead of in every demuxer for containers...
[libav.git] / libavformat / Makefile
CommitLineData
19720f15
FB
1#
2# libavformat Makefile
165f74ff 3# (c) 2000-2003 Fabrice Bellard
19720f15 4#
980fc7b8 5include ../config.mak
f57a4535 6
a382b927 7VPATH=$(SRC_PATH)/libavformat
f57a4535 8
cf9d24ad 9CFLAGS=$(OPTFLAGS) -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
f71869a4 11OBJS= utils.o cutils.o os_support.o allformats.o
cc0799e5 12PPOBJS=
c9a65ca8
FB
13
14# mux and demuxes
03cfe134 15OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
7458ccbb 16 avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
3aa180b8 17 yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
a7eb3c8d 18 nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
ad81a9fe 19 sierravmd.o matroska.o sol.o electronicarts.o
1d0d55da
MN
20
21ifeq ($(CONFIG_RISKY),yes)
22OBJS+= asf.o
e4053d52 23OBJS+= asf-enc.o
1d0d55da
MN
24endif
25
485bc05d
AB
26ifeq ($(AMR_NB),yes)
27OBJS+= amr.o
28endif
29ifeq ($(AMR_NB_FIXED),yes)
30OBJS+= amr.o
31endif
32ifeq ($(AMR_WB),yes)
bc634f6f
ZK
33OBJS+= amr.o
34endif
35
87a0a681 36# image formats
6a91ec51 37OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
c9a65ca8
FB
38# file I/O
39OBJS+= avio.o aviobuf.o file.o
87a0a681 40OBJS+= framehook.o
8be1c656 41
19720f15
FB
42ifeq ($(CONFIG_VIDEO4LINUX),yes)
43OBJS+= grab.o
8be1c656 44endif
85f07f22 45
8aa3ee32
MK
46ifeq ($(CONFIG_DV1394),yes)
47OBJS+= dv1394.o
48endif
49
19720f15
FB
50ifeq ($(CONFIG_AUDIO_OSS),yes)
51OBJS+= audio.o
52endif
53
dfdfa47c 54ifeq ($(CONFIG_AUDIO_BEOS),yes)
cc0799e5 55PPOBJS+= beosaudio.o
aa35ccb8
FR
56EXTRALIBS+=-lbe -lmedia
57# this should be the default !
58EXTRALIBS+=-lavcodec -L../libavcodec
dfdfa47c
FR
59endif
60
19720f15 61ifeq ($(CONFIG_NETWORK),yes)
bdd7d518 62OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
cc0799e5 63# BeOS and Darwin network stuff
4baca069 64ifeq ($(NEED_INET_ATON),yes)
9ddd71fc
FR
65OBJS+= barpainet.o
66endif
a74127c0
FB
67endif
68
81e0d0b4
MH
69ifeq ($(CONFIG_VORBIS),yes)
70OBJS+= ogg.o
71endif
72
bb476ff3
JM
73ifeq ($(TARGET_ARCH_SPARC64),yes)
74CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
75endif
76
f3ec2d46 77LIB= $(LIBPREF)avformat$(LIBSUF)
6bc114b2
TA
78ifeq ($(BUILD_SHARED),yes)
79SLIB= $(SLIBPREF)avformat$(SLIBSUF)
80endif
85f07f22 81
cc0799e5 82SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
77b71ddc 83
6bc114b2 84all: $(LIB) $(SLIB)
85f07f22 85
cc0799e5 86$(LIB): $(OBJS) $(PPOBJS)
85f07f22 87 rm -f $@
cc0799e5 88 $(AR) rc $@ $(OBJS) $(PPOBJS)
be7109c1 89 $(RANLIB) $@
85f07f22 90
6bc114b2 91$(SLIB): $(OBJS)
cb728d79 92ifeq ($(CONFIG_WIN32),yes)
165f74ff 93 $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
a17236c5
MN
94 -lib /machine:i386 /def:$(@:.dll=.def)
95else
165f74ff 96 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
a17236c5 97endif
6bc114b2 98
f8d7b5f5 99depend: $(SRCS)
7c235fe2
FB
100 $(CC) -MM $(CFLAGS) $^ 1>.depend
101
6bc114b2 102ifeq ($(BUILD_SHARED),yes)
cb728d79
FB
103install: all install-headers
104ifeq ($(CONFIG_WIN32),yes)
65d1bea2 105 install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
cb728d79 106else
6bc114b2 107 install -d $(prefix)/lib
65d1bea2 108 install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
6bc114b2
TA
109 ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
110 ldconfig || true
cb728d79
FB
111endif
112else
113install:
6bc114b2
TA
114endif
115
cb728d79 116installlib: all install-headers
910fdd21 117 install -m 644 $(LIB) $(prefix)/lib
cb728d79
FB
118
119install-headers:
120 mkdir -p "$(prefix)/include/ffmpeg"
f60f0df1
TJ
121 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
122 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
123 $(SRC_PATH)/libavformat/rtspcodes.h \
cb728d79 124 "$(prefix)/include/ffmpeg"
910fdd21 125
85f07f22
FB
126%.o: %.c
127 $(CC) $(CFLAGS) -c -o $@ $<
128
dfdfa47c
FR
129# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
130%.o: %.cpp
131 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
132
2fefb220 133distclean clean:
e1e98dbd 134 rm -f *.o *.d .depend *~ *.a *.so $(LIB)
7c235fe2
FB
135
136#
137# include dependency files if they exist
138#
139ifneq ($(wildcard .depend),)
140include .depend
141endif