Statistics
| Branch: | Revision:

ffmpeg / Makefile @ 1c2a8c7f

History | View | Annotate | Download (1.39 KB)

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