First implementation of nsv demuxer.
[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 \
27d5f18f 19 sierravmd.o matroska.o sol.o electronicarts.o nsvdec.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
f02be79d
RS
50ifeq ($(CONFIG_DC1394),yes)
51OBJS+= dc1394.o
52endif
53
19720f15
FB
54ifeq ($(CONFIG_AUDIO_OSS),yes)
55OBJS+= audio.o
56endif
57
dfdfa47c 58ifeq ($(CONFIG_AUDIO_BEOS),yes)
cc0799e5 59PPOBJS+= beosaudio.o
aa35ccb8
FR
60EXTRALIBS+=-lbe -lmedia
61# this should be the default !
62EXTRALIBS+=-lavcodec -L../libavcodec
dfdfa47c
FR
63endif
64
19720f15 65ifeq ($(CONFIG_NETWORK),yes)
bdd7d518 66OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
cc0799e5 67# BeOS and Darwin network stuff
4baca069 68ifeq ($(NEED_INET_ATON),yes)
9ddd71fc
FR
69OBJS+= barpainet.o
70endif
a74127c0
FB
71endif
72
81e0d0b4
MH
73ifeq ($(CONFIG_VORBIS),yes)
74OBJS+= ogg.o
75endif
76
bb476ff3
JM
77ifeq ($(TARGET_ARCH_SPARC64),yes)
78CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
79endif
80
f3ec2d46 81LIB= $(LIBPREF)avformat$(LIBSUF)
6bc114b2
TA
82ifeq ($(BUILD_SHARED),yes)
83SLIB= $(SLIBPREF)avformat$(SLIBSUF)
84endif
85f07f22 85
27d5f18f
FR
86EXTRALIBS+=-lavcodec -L../libavcodec
87ifeq ($(CONFIG_MP3LAME),yes)
88EXTRALIBS+=-lmp3lame
89endif
90
cc0799e5 91SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
77b71ddc 92
6bc114b2 93all: $(LIB) $(SLIB)
85f07f22 94
cc0799e5 95$(LIB): $(OBJS) $(PPOBJS)
85f07f22 96 rm -f $@
cc0799e5 97 $(AR) rc $@ $(OBJS) $(PPOBJS)
be7109c1 98 $(RANLIB) $@
85f07f22 99
6bc114b2 100$(SLIB): $(OBJS)
cb728d79 101ifeq ($(CONFIG_WIN32),yes)
165f74ff 102 $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
a17236c5
MN
103 -lib /machine:i386 /def:$(@:.dll=.def)
104else
165f74ff 105 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS)
a17236c5 106endif
6bc114b2 107
f8d7b5f5 108depend: $(SRCS)
7c235fe2
FB
109 $(CC) -MM $(CFLAGS) $^ 1>.depend
110
6bc114b2 111ifeq ($(BUILD_SHARED),yes)
cb728d79
FB
112install: all install-headers
113ifeq ($(CONFIG_WIN32),yes)
65d1bea2 114 install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
cb728d79 115else
6bc114b2 116 install -d $(prefix)/lib
65d1bea2 117 install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
6bc114b2
TA
118 ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
119 ldconfig || true
cb728d79
FB
120endif
121else
122install:
6bc114b2
TA
123endif
124
cb728d79 125installlib: all install-headers
910fdd21 126 install -m 644 $(LIB) $(prefix)/lib
cb728d79
FB
127
128install-headers:
129 mkdir -p "$(prefix)/include/ffmpeg"
f60f0df1
TJ
130 install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
131 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
132 $(SRC_PATH)/libavformat/rtspcodes.h \
cb728d79 133 "$(prefix)/include/ffmpeg"
910fdd21 134
85f07f22
FB
135%.o: %.c
136 $(CC) $(CFLAGS) -c -o $@ $<
137
dfdfa47c
FR
138# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
139%.o: %.cpp
140 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
141
2fefb220 142distclean clean:
e1e98dbd 143 rm -f *.o *.d .depend *~ *.a *.so $(LIB)
7c235fe2
FB
144
145#
146# include dependency files if they exist
147#
148ifneq ($(wildcard .depend),)
149include .depend
150endif