Fix silly typos.
[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
c11c2bc2 9CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
85f07f22 10
c0af3840
DB
11#FIXME: This should be in configure/config.mak
12ifeq ($(CONFIG_WIN32),yes)
320d060a 13 LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
c0af3840
DB
14endif
15
f71869a4 16OBJS= utils.o cutils.o os_support.o allformats.o
cc0799e5 17PPOBJS=
c9a65ca8 18
04f46ced 19# demuxers
03cfe134 20OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
93a23627 21 avienc.o avidec.o wav.o mmf.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
04f46ced 22 yuv4mpeg.o 4xm.o flvdec.o psxstr.o idroq.o ipmovie.o \
a7eb3c8d 23 nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
04f46ced 24 sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o \
b93f738f 25 ogg2.o oggparsevorbis.o oggparsetheora.o oggparseflac.o daud.o
04f46ced
GB
26
27# muxers
28ifeq ($(CONFIG_MUXERS),yes)
29OBJS+= flvenc.o movenc.o asf-enc.o
30endif
31
32
4d4bb927 33AMROBJS=
485bc05d 34ifeq ($(AMR_NB),yes)
4d4bb927 35AMROBJS= amr.o
485bc05d
AB
36endif
37ifeq ($(AMR_NB_FIXED),yes)
4d4bb927 38AMROBJS= amr.o
485bc05d
AB
39endif
40ifeq ($(AMR_WB),yes)
4d4bb927 41AMROBJS= amr.o
bc634f6f 42endif
4d4bb927 43OBJS+= $(AMROBJS)
bc634f6f 44
87a0a681 45# image formats
6a91ec51 46OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
115329f1 47OBJS+= framehook.o
8be1c656 48
19720f15
FB
49ifeq ($(CONFIG_VIDEO4LINUX),yes)
50OBJS+= grab.o
8be1c656 51endif
85f07f22 52
6beefa40
MN
53ifeq ($(CONFIG_BKTR),yes)
54OBJS+= grab_bktr.o
55endif
56
8aa3ee32
MK
57ifeq ($(CONFIG_DV1394),yes)
58OBJS+= dv1394.o
59endif
60
f02be79d
RS
61ifeq ($(CONFIG_DC1394),yes)
62OBJS+= dc1394.o
63endif
64
19720f15 65ifeq ($(CONFIG_AUDIO_OSS),yes)
115329f1 66OBJS+= audio.o
19720f15
FB
67endif
68
a71a1dfc 69EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
dbbcfd6b 70
dfdfa47c 71ifeq ($(CONFIG_AUDIO_BEOS),yes)
cc0799e5 72PPOBJS+= beosaudio.o
dfdfa47c
FR
73endif
74
04f46ced
GB
75# protocols I/O
76OBJS+= avio.o aviobuf.o
77
78ifeq ($(CONFIG_PROTOCOLS),yes)
79OBJS+= file.o
19720f15 80ifeq ($(CONFIG_NETWORK),yes)
bdd7d518 81OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
cc0799e5 82# BeOS and Darwin network stuff
4baca069 83ifeq ($(NEED_INET_ATON),yes)
9ddd71fc
FR
84OBJS+= barpainet.o
85endif
a74127c0 86endif
04f46ced 87endif
a74127c0 88
5c5dea3f 89ifeq ($(CONFIG_LIBOGG),yes)
81e0d0b4
MH
90OBJS+= ogg.o
91endif
92
bb476ff3
JM
93ifeq ($(TARGET_ARCH_SPARC64),yes)
94CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
95endif
96
4bdd05e7 97NAME=avformat
6bc114b2 98ifeq ($(BUILD_SHARED),yes)
f3b60109
DB
99LIBVERSION=$(LAVFVERSION)
100LIBMAJOR=$(LAVFMAJOR)
4e159595 101AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
27d5f18f
FR
102endif
103
cc0799e5 104SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
77b71ddc 105
4e159595 106all: $(LIB) $(SLIBNAME)
85f07f22 107
cc0799e5 108$(LIB): $(OBJS) $(PPOBJS)
85f07f22 109 rm -f $@
cc0799e5 110 $(AR) rc $@ $(OBJS) $(PPOBJS)
be7109c1 111 $(RANLIB) $@
85f07f22 112
4e159595 113$(SLIBNAME): $(OBJS)
c0af3840 114 $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
cb728d79 115ifeq ($(CONFIG_WIN32),yes)
a17236c5 116 -lib /machine:i386 /def:$(@:.dll=.def)
a17236c5 117endif
6bc114b2 118
f8d7b5f5 119depend: $(SRCS)
7c235fe2
FB
120 $(CC) -MM $(CFLAGS) $^ 1>.depend
121
6bc114b2 122ifeq ($(BUILD_SHARED),yes)
cb728d79
FB
123install: all install-headers
124ifeq ($(CONFIG_WIN32),yes)
4e159595 125 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
cb728d79 126else
cc973ecb 127 install -d $(libdir)
f3b60109
DB
128 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
129 $(libdir)/$(SLIBNAME_WITH_VERSION)
130 ln -sf $(SLIBNAME_WITH_VERSION) \
131 $(libdir)/$(SLIBNAME_WITH_MAJOR)
132 ln -sf $(SLIBNAME_WITH_VERSION) \
133 $(libdir)/$(SLIBNAME)
f39e56a8 134 $(LDCONFIG) || true
cb728d79
FB
135endif
136else
137install:
6bc114b2
TA
138endif
139
cb728d79 140installlib: all install-headers
cc973ecb 141 install -m 644 $(LIB) "$(libdir)"
cb728d79
FB
142
143install-headers:
144 mkdir -p "$(prefix)/include/ffmpeg"
f60f0df1
TJ
145 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
146 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
147 $(SRC_PATH)/libavformat/rtspcodes.h \
cb728d79 148 "$(prefix)/include/ffmpeg"
25f8db58
FO
149 install -d "$(libdir)/pkgconfig"
150 install -m 644 ../libavformat.pc "$(libdir)/pkgconfig"
910fdd21 151
85f07f22 152%.o: %.c
115329f1 153 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
85f07f22 154
dfdfa47c
FR
155# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
156%.o: %.cpp
115329f1 157 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
dfdfa47c 158
98013cc1 159clean:
320d060a
DB
160 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
161 *.lib *.def *.dll.a *.exp
98013cc1
DB
162
163distclean: clean
04c07634 164 rm -f .depend
7c235fe2
FB
165
166#
167# include dependency files if they exist
168#
169ifneq ($(wildcard .depend),)
170include .depend
171endif