Statistics
| Branch: | Revision:

ffmpeg / Makefile @ ef0bc4c9

History | View | Annotate | Download (1.16 KB)

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
ifeq ($(CONFIG_WIN32),yes)
14
EXE=.exe
15
PROG=ffmpeg$(EXE)
16
else
17
EXT=
18
PROG=ffmpeg ffplay ffserver
19
endif
20

    
21
ifeq ($(BUILD_SHARED),yes)
22
FFMPEG_LIB=-Llibavcodec -lffmpeg
23
DEP_FFMPEG_LIB=
24
else
25
FFMPEG_LIB=libavcodec/libavcodec.a
26
DEP_FFMPEG_LIB=libavcodec/libavcodec.a
27
endif
28

    
29
all: lib $(PROG)
30

    
31
lib:
32
	$(MAKE) -C libavcodec all
33
	$(MAKE) -C libav all
34

    
35
ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
36
	$(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
37

    
38
ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
39
	$(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
40

    
41
ffplay: ffmpeg$(EXE)
42
	ln -sf $< $@
43

    
44
%.o: %.c
45
	$(CC) $(CFLAGS) -c -o $@ $< 
46

    
47
install: all
48
	$(MAKE) -C libavcodec install
49
	install -s -m 755 $(PROG) $(prefix)/bin
50
	ln -sf ffmpeg $(prefix)/bin/ffplay 
51

    
52
clean: 
53
	$(MAKE) -C libavcodec clean
54
	$(MAKE) -C libav clean
55
	rm -f *.o *~ gmon.out TAGS $(PROG) 
56

    
57
distclean: clean
58
	$(MAKE) -C libavcodec distclean
59
	rm -f config.mak config.h
60

    
61
TAGS:
62
	etags *.[ch] libav/*.[ch] libavcodec/*.[ch]