]> git.sesse.net Git - ffmpeg/blob - libavformat/Makefile
mov, 3gp, mp4 muxer by (Thomas Raivio <tjraivio at cc dot hut dot fi>)
[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 movenc.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 EXTRALIBS+=-lbe -lmedia
52 # this should be the default !
53 EXTRALIBS+=-lavcodec -L../libavcodec
54 endif
55
56 ifeq ($(CONFIG_NETWORK),yes)
57 OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
58 # BeOS and Darwin network stuff
59 ifeq ($(NEED_INET_ATON),yes)
60 OBJS+= barpainet.o
61 endif
62 endif
63
64 ifeq ($(CONFIG_VORBIS),yes)
65 OBJS+= ogg.o
66 endif
67
68 LIB= $(LIBPREF)avformat$(LIBSUF)
69 ifeq ($(BUILD_SHARED),yes)
70 SLIB= $(SLIBPREF)avformat$(SLIBSUF)
71 endif
72
73 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
74
75 all: $(LIB) $(SLIB)
76
77 $(LIB): $(OBJS) $(PPOBJS)
78         rm -f $@
79         $(AR) rc $@ $(OBJS) $(PPOBJS)
80         $(RANLIB) $@
81
82 $(SLIB): $(OBJS)
83         $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS)
84
85 depend: $(SRCS)
86         $(CC) -MM $(CFLAGS) $^ 1>.depend
87
88 install: all
89 ifeq ($(BUILD_SHARED),yes)
90         install -d $(prefix)/lib
91         install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
92         ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
93         ldconfig || true
94         mkdir -p $(prefix)/include/ffmpeg
95         install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h
96         install -m 644 $(VPATH)/avio.h $(prefix)/include/ffmpeg/avio.h
97         install -m 644 $(VPATH)/rtp.h $(prefix)/include/ffmpeg/rtp.h
98         install -m 644 $(VPATH)/rtsp.h $(prefix)/include/ffmpeg/rtsp.h
99         install -m 644 $(VPATH)/rtspcodes.h $(prefix)/include/ffmpeg/rtspcodes.h
100 endif
101
102 installlib: all
103         install -m 644 $(LIB) $(prefix)/lib
104         mkdir -p $(prefix)/include/ffmpeg
105         install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
106                 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
107                 $(SRC_PATH)/libavformat/rtspcodes.h \
108                 $(prefix)/include/ffmpeg
109
110 %.o: %.c
111         $(CC) $(CFLAGS) -c -o $@ $< 
112
113 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
114 %.o: %.cpp
115         g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
116
117 clean: 
118         rm -f *.o *.d .depend *~ *.a $(LIB)
119
120 #
121 # include dependency files if they exist
122 #
123 ifneq ($(wildcard .depend),)
124 include .depend
125 endif