updated
[libav.git] / Makefile
1 # Main ffmpeg Makefile
2 # (c) 2000, 2001 Gerard Lantau
3 #
4 include config.mak
5
6 CFLAGS= $(OPTFLAGS) -Wall -g -I./libavcodec -I./libav
7 LDFLAGS= -g
8 ifeq ($(TARGET_GPROF),yes)
9 CFLAGS+=-p
10 LDFLAGS+=-p
11 endif
12
13 PROG= ffmpeg ffserver
14
15 all: lib $(PROG)
16
17 lib:
18 make -C libavcodec all
19 make -C libav all
20
21 ffmpeg: ffmpeg.o libav/libav.a libavcodec/libavcodec.a
22 gcc $(LDFLAGS) -o $@ $^ -lm
23
24 ffserver: ffserver.o libav/libav.a libavcodec/libavcodec.a
25 gcc $(LDFLAGS) -o $@ $^ -lm
26
27 %.o: %.c
28 gcc $(CFLAGS) -c -o $@ $<
29
30 install: all
31 install -s -m 755 $(PROG) $(prefix)/bin
32
33 clean:
34 make -C libavcodec clean
35 make -C libav clean
36 rm -f *.o *~ gmon.out TAGS $(PROG)
37
38 distclean: clean
39 rm -f config.mak config.h
40
41 TAGS:
42 etags *.[ch] libav/*.[ch] libavcodec/*.[ch]