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