Implement audio cutoff frequency to the vorbis encoder.
[FFMpeg-mirror/ordered_chapters.git] / Makefile
blobae3dcd87a7c50a41e2dbd1b6d75c3e56063ae8b9
2 # Main ffmpeg Makefile
3 # (c) 2000-2004 Fabrice Bellard
5 include config.mak
7 VPATH=$(SRC_PATH)
9 CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
10 LDFLAGS+= -g
12 ifeq ($(TARGET_GPROF),yes)
13 CFLAGS+=-p
14 LDFLAGS+=-p
15 endif
17 MANPAGE=doc/ffmpeg.1
18 PROG=ffmpeg$(EXESUF)
19 PROGTEST=output_example$(EXESUF)
20 QTFASTSTART=qt-faststart$(EXESUF)
22 ifeq ($(CONFIG_FFSERVER),yes)
23 MANPAGE+=doc/ffserver.1
24 PROG+=ffserver$(EXESUF)
25 endif
27 ifeq ($(CONFIG_FFPLAY),yes)
28 MANPAGE+=doc/ffplay.1
29 PROG+=ffplay$(EXESUF)
30 FFPLAY_O=ffplay.o
31 endif
33 ifeq ($(CONFIG_AUDIO_BEOS),yes)
34 EXTRALIBS+=-lmedia -lbe
35 endif
37 ifeq ($(BUILD_SHARED),yes)
38 DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF)
39 else
40 DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
41 endif
43 ifeq ($(BUILD_VHOOK),yes)
44 VHOOK=videohook
45 INSTALLVHOOK=install-vhook
46 endif
48 ifeq ($(TARGET_OS), SunOS)
49 TEST=/usr/bin/test
50 else
51 TEST=test
52 endif
54 ifeq ($(BUILD_DOC),yes)
55 DOC=documentation
56 endif
58 OBJS = ffmpeg.o ffserver.o cmdutils.o $(FFPLAY_O)
59 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
60 FFLIBS = -L./libavformat -lavformat$(BUILDSUF) -L./libavcodec -lavcodec$(BUILDSUF) -L./libavutil -lavutil$(BUILDSUF)
62 all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
64 lib:
65 $(MAKE) -C libavutil all
66 $(MAKE) -C libavcodec all
67 $(MAKE) -C libavformat all
69 ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs
70 $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS)
72 ffmpeg$(EXESUF): ffmpeg_g$(EXESUF)
73 cp -p $< $@
74 $(STRIP) $@
76 ffserver$(EXESUF): ffserver.o .libs
77 $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS)
79 ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
80 $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
82 ffplay$(EXESUF): ffplay_g$(EXESUF)
83 cp -p $< $@
84 $(STRIP) $@
86 output_example$(EXESUF): output_example.o .libs
87 $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS)
89 qt-faststart$(EXESUF): qt-faststart.c
90 $(CC) $(SRC_PATH)/qt-faststart.c -o qt-faststart$(EXESUF)
92 cws2fws$(EXESUF): cws2fws.c
93 $(CC) $(SRC_PATH)/cws2fws.c -o cws2fws$(EXESUF) -lz
95 ffplay.o: ffplay.c
96 $(CC) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
98 %.o: %.c
99 $(CC) $(CFLAGS) -c -o $@ $<
101 videohook: .libs
102 $(MAKE) -C vhook all
104 documentation:
105 $(MAKE) -C doc all
107 .PHONY: install
109 install: all install-man $(INSTALLVHOOK)
110 $(MAKE) -C libavutil install
111 $(MAKE) -C libavcodec install
112 $(MAKE) -C libavformat install
113 install -d "$(bindir)"
114 install -c $(INSTALLSTRIP) -m 755 $(PROG) "$(bindir)"
116 # create the window installer
117 wininstaller: all install
118 makensis ffinstall.nsi
120 # install man from source dir if available
121 install-man:
122 ifneq ($(CONFIG_WIN32),yes)
123 if [ -f doc/ffmpeg.1 ] ; then \
124 install -d "$(mandir)/man1" ; \
125 install -m 644 $(MANPAGE) "$(mandir)/man1" ; \
127 endif
129 install-vhook:
130 $(MAKE) -C vhook install
132 installlib:
133 $(MAKE) -C libavutil installlib
134 $(MAKE) -C libavcodec installlib
135 $(MAKE) -C libavformat installlib
137 dep: depend
139 depend: .depend
140 $(MAKE) -C libavcodec depend
141 $(MAKE) -C libavformat depend
142 ifeq ($(BUILD_VHOOK),yes)
143 $(MAKE) -C vhook depend
144 endif
146 .depend: $(SRCS)
147 $(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $^ 1>.depend
149 .libs: lib
150 @test -f .libs || touch .libs
151 @for i in $(DEP_LIBS) ; do if $(TEST) $$i -nt .libs ; then touch .libs; fi ; done
153 clean:
154 $(MAKE) -C libavutil clean
155 $(MAKE) -C libavcodec clean
156 $(MAKE) -C libavformat clean
157 $(MAKE) -C tests clean
158 $(MAKE) -C vhook clean
159 rm -f *.o *.d *~ .libs gmon.out TAGS \
160 $(PROG) $(PROGTEST) $(QTFASTSTART)
162 # Note well: config.log is NOT removed.
163 distclean: clean
164 $(MAKE) -C libavutil distclean
165 $(MAKE) -C libavcodec distclean
166 $(MAKE) -C libavformat distclean
167 $(MAKE) -C tests distclean
168 $(MAKE) -C vhook distclean
169 rm -f Makefile.bak .depend config.mak config.h *.pc
171 TAGS:
172 etags *.[ch] libavformat/*.[ch] libavcodec/*.[ch]
174 # regression tests
176 libavtest test mpeg4 mpeg test-server fulltest: ffmpeg$(EXESUF)
177 $(MAKE) -C tests $@
179 # tar release (use 'make -k tar' on a checkouted tree)
180 FILE=ffmpeg-$(shell grep "\#define FFMPEG_VERSION " libavcodec/avcodec.h | \
181 cut -d "\"" -f 2 )
183 tar:
184 rm -rf /tmp/$(FILE)
185 cp -r . /tmp/$(FILE)
186 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
187 rm -rf /tmp/$(FILE)
189 .PHONY: lib
191 ifneq ($(wildcard .depend),)
192 include .depend
193 endif