]> git.sesse.net Git - ffmpeg/blob - libavformat/Makefile
flash video (flv) support patch by (Garrick Meeker <gmeeker at theoryllc dot com>)
[ffmpeg] / libavformat / Makefile
1 #
2 # libavformat Makefile
3 # (c) 2000, 2001, 2002 Fabrice Bellard
4 #
5 include ../config.mak
6
7 VPATH=$(SRC_PATH)/libavformat
8
9 CFLAGS= $(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
10
11 OBJS= utils.o cutils.o allformats.o
12 PPOBJS=
13
14 # mux and demuxes
15 OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o raw.o rm.o \
16       avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
17       yuv4mpeg.o 4xm.o flvenc.o flvdec.o
18
19 ifeq ($(CONFIG_RISKY),yes)
20 OBJS+= asf.o
21 endif
22
23 ifeq ($(AMR_NB),yes)
24 OBJS+= amr.o
25 endif
26
27 # image formats
28 OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o
29 # file I/O
30 OBJS+= avio.o aviobuf.o file.o 
31 OBJS+= framehook.o 
32
33 ifeq ($(BUILD_STRPTIME),yes)
34 OBJS+= strptime.o
35 endif
36
37 ifeq ($(CONFIG_VIDEO4LINUX),yes)
38 OBJS+= grab.o
39 endif
40
41 ifeq ($(CONFIG_DV1394),yes)
42 OBJS+= dv1394.o
43 endif
44
45 ifeq ($(CONFIG_AUDIO_OSS),yes)
46 OBJS+= audio.o 
47 endif
48
49 ifeq ($(CONFIG_AUDIO_BEOS),yes)
50 PPOBJS+= beosaudio.o
51 endif
52
53 ifeq ($(CONFIG_NETWORK),yes)
54 OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
55 # BeOS and Darwin network stuff
56 ifeq ($(NEED_INET_ATON),yes)
57 OBJS+= barpainet.o
58 endif
59 endif
60
61 ifeq ($(CONFIG_VORBIS),yes)
62 OBJS+= ogg.o
63 endif
64
65 LIB= $(LIBPREF)avformat$(LIBSUF)
66
67 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
68
69 all: $(LIB)
70
71 $(LIB): $(OBJS) $(PPOBJS)
72         rm -f $@
73         $(AR) rc $@ $(OBJS) $(PPOBJS)
74         $(RANLIB) $@
75
76 depend: $(SRCS)
77         $(CC) -MM $(CFLAGS) $^ 1>.depend
78
79 installlib: all
80         install -m 644 $(LIB) $(prefix)/lib
81         mkdir -p $(prefix)/include/ffmpeg
82         install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
83                 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
84                 $(SRC_PATH)/libavformat/rtspcodes.h \
85                 $(prefix)/include/ffmpeg
86
87 %.o: %.c
88         $(CC) $(CFLAGS) -c -o $@ $< 
89
90 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
91 %.o: %.cpp
92         g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
93
94 clean: 
95         rm -f *.o *.d .depend *~ *.a $(LIB)
96
97 #
98 # include dependency files if they exist
99 #
100 ifneq ($(wildcard .depend),)
101 include .depend
102 endif