Commit | Line | Data |
---|---|---|
85f07f22 FB |
1 | # Main ffmpeg Makefile |
2 | # (c) 2000, 2001 Gerard Lantau | |
3 | # | |
980fc7b8 | 4 | include config.mak |
85f07f22 | 5 | |
8d75673b J |
6 | CFLAGS= $(OPTFLAGS) -Wall -g -I./libavcodec -I./libav |
7 | LDFLAGS= -g | |
980fc7b8 | 8 | ifeq ($(TARGET_GPROF),yes) |
85f07f22 FB |
9 | CFLAGS+=-p |
10 | LDFLAGS+=-p | |
11 | endif | |
12 | ||
daf8e955 FB |
13 | ifeq ($(CONFIG_WIN32),yes) |
14 | EXE=.exe | |
15 | PROG=ffmpeg$(EXE) | |
16 | else | |
17 | EXT= | |
2744a37f | 18 | PROG=ffmpeg ffplay ffserver |
daf8e955 | 19 | endif |
85f07f22 | 20 | |
0fd94442 NK |
21 | ifeq ($(BUILD_SHARED),yes) |
22 | FFMPEG_LIB=-Llibavcodec -lffmpeg | |
cabad2ad | 23 | DEP_FFMPEG_LIB= |
0fd94442 NK |
24 | else |
25 | FFMPEG_LIB=libavcodec/libavcodec.a | |
cabad2ad | 26 | DEP_FFMPEG_LIB=libavcodec/libavcodec.a |
a6741398 J |
27 | ifeq ($(CONFIG_MP3LAME),yes) |
28 | EXTRALIBS+=-lmp3lame | |
29 | endif | |
0fd94442 NK |
30 | endif |
31 | ||
57514323 ZK |
32 | OBJS = ffmpeg.o ffserver.o |
33 | SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) | |
34 | ||
85f07f22 FB |
35 | all: lib $(PROG) |
36 | ||
37 | lib: | |
2cc8ae96 FB |
38 | $(MAKE) -C libavcodec all |
39 | $(MAKE) -C libav all | |
85f07f22 | 40 | |
cabad2ad | 41 | ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB) |
c6a8f2ce | 42 | $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS) |
85f07f22 | 43 | |
cabad2ad | 44 | ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB) |
c6a8f2ce | 45 | $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS) |
85f07f22 | 46 | |
2744a37f FB |
47 | ffplay: ffmpeg$(EXE) |
48 | ln -sf $< $@ | |
49 | ||
85f07f22 | 50 | %.o: %.c |
daf8e955 | 51 | $(CC) $(CFLAGS) -c -o $@ $< |
85f07f22 FB |
52 | |
53 | install: all | |
0fd94442 | 54 | $(MAKE) -C libavcodec install |
980fc7b8 | 55 | install -s -m 755 $(PROG) $(prefix)/bin |
2744a37f | 56 | ln -sf ffmpeg $(prefix)/bin/ffplay |
85f07f22 | 57 | |
57514323 ZK |
58 | dep: depend |
59 | ||
60 | depend: | |
61 | $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend | |
62 | ||
85f07f22 | 63 | clean: |
2cc8ae96 FB |
64 | $(MAKE) -C libavcodec clean |
65 | $(MAKE) -C libav clean | |
1ac9248b | 66 | rm -f *.o *~ .depend gmon.out TAGS $(PROG) |
85f07f22 FB |
67 | |
68 | distclean: clean | |
c72c6d2d | 69 | $(MAKE) -C libavcodec distclean |
980fc7b8 | 70 | rm -f config.mak config.h |
85f07f22 FB |
71 | |
72 | TAGS: | |
73 | etags *.[ch] libav/*.[ch] libavcodec/*.[ch] | |
57514323 ZK |
74 | |
75 | ifneq ($(wildcard .depend),) | |
76 | include .depend | |
77 | endif |