qpel & SSE/SATD regression test
[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
5dbafeb7 15OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.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 \
08abe0fd 19 sierravmd.o matroska.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
f3ec2d46 73LIB= $(LIBPREF)avformat$(LIBSUF)
6bc114b2
TA
74ifeq ($(BUILD_SHARED),yes)
75SLIB= $(SLIBPREF)avformat$(SLIBSUF)
76endif
85f07f22 77
cc0799e5 78SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
77b71ddc 79
6bc114b2 80all: $(LIB) $(SLIB)
85f07f22 81
cc0799e5 82$(LIB): $(OBJS) $(PPOBJS)
85f07f22 83 rm -f $@
cc0799e5 84 $(AR) rc $@ $(OBJS) $(PPOBJS)
be7109c1 85 $(RANLIB) $@
85f07f22 86
6bc114b2 87$(SLIB): $(OBJS)
cb728d79 88ifeq ($(CONFIG_WIN32),yes)
165f74ff 89 $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
a17236c5
MN
90 -lib /machine:i386 /def:$(@:.dll=.def)
91else
165f74ff 92 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
a17236c5 93endif
6bc114b2 94
f8d7b5f5 95depend: $(SRCS)
7c235fe2
FB
96 $(CC) -MM $(CFLAGS) $^ 1>.depend
97
6bc114b2 98ifeq ($(BUILD_SHARED),yes)
cb728d79
FB
99install: all install-headers
100ifeq ($(CONFIG_WIN32),yes)
101 install -s -m 755 $(SLIB) "$(prefix)"
102else
6bc114b2
TA
103 install -d $(prefix)/lib
104 install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
105 ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
106 ldconfig || true
cb728d79
FB
107endif
108else
109install:
6bc114b2
TA
110endif
111
cb728d79 112installlib: all install-headers
910fdd21 113 install -m 644 $(LIB) $(prefix)/lib
cb728d79
FB
114
115install-headers:
116 mkdir -p "$(prefix)/include/ffmpeg"
f60f0df1
TJ
117 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
118 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
119 $(SRC_PATH)/libavformat/rtspcodes.h \
cb728d79 120 "$(prefix)/include/ffmpeg"
910fdd21 121
85f07f22
FB
122%.o: %.c
123 $(CC) $(CFLAGS) -c -o $@ $<
124
dfdfa47c
FR
125# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
126%.o: %.cpp
127 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
128
2fefb220 129distclean clean:
7c235fe2
FB
130 rm -f *.o *.d .depend *~ *.a $(LIB)
131
132#
133# include dependency files if they exist
134#
135ifneq ($(wildcard .depend),)
136include .depend
137endif