checksum update cuz of build change 4620->4621
[libav.git] / Makefile
CommitLineData
a1b63811 1#
85f07f22 2# Main ffmpeg Makefile
a1b63811 3# (c) 2000, 2001, 2002 Fabrice Bellard
85f07f22 4#
980fc7b8 5include config.mak
85f07f22 6
dd9ca370
FB
7VPATH=$(SRC_PATH)
8
eddbd7e5 9CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libav -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
90cee0c3
MN
10ifeq ($(CONFIG_DARWIN),yes)
11LDFLAGS+= -g -d
12else
37736979 13LDFLAGS+= -g -Wl,--warn-common
90cee0c3 14endif
37736979 15
980fc7b8 16ifeq ($(TARGET_GPROF),yes)
85f07f22
FB
17CFLAGS+=-p
18LDFLAGS+=-p
19endif
20
daf8e955
FB
21ifeq ($(CONFIG_WIN32),yes)
22EXE=.exe
23PROG=ffmpeg$(EXE)
24else
25EXT=
2744a37f 26PROG=ffmpeg ffplay ffserver
daf8e955 27endif
85f07f22 28
a1b63811 29
0fd94442 30ifeq ($(BUILD_SHARED),yes)
a1b63811 31DEP_LIBS=libavcodec/libavcodec.so libav/libavformat.a
0fd94442 32else
a1b63811 33DEP_LIBS=libavcodec/libavcodec.a libav/libavformat.a
a6741398
J
34ifeq ($(CONFIG_MP3LAME),yes)
35EXTRALIBS+=-lmp3lame
36endif
0fd94442
NK
37endif
38
57514323
ZK
39OBJS = ffmpeg.o ffserver.o
40SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
41
85f07f22
FB
42all: lib $(PROG)
43
44lib:
2cc8ae96
FB
45 $(MAKE) -C libavcodec all
46 $(MAKE) -C libav all
85f07f22 47
37736979 48ffmpeg_g$(EXE): ffmpeg.o $(DEP_LIBS)
a1b63811
FB
49 $(CC) $(LDFLAGS) -o $@ ffmpeg.o -L./libavcodec -L./libav \
50 -lavformat -lavcodec $(EXTRALIBS)
85f07f22 51
37736979
FB
52ffmpeg$(EXE): ffmpeg_g$(EXE)
53 $(STRIP) -o $@ $<
54
a1b63811 55ffserver$(EXE): ffserver.o $(DEP_LIBS)
37736979
FB
56 $(CC) $(LDFLAGS) -Wl,-E -o $@ ffserver.o -L./libavcodec -L./libav \
57 -lavformat -lavcodec -ldl $(EXTRALIBS)
85f07f22 58
2744a37f
FB
59ffplay: ffmpeg$(EXE)
60 ln -sf $< $@
61
85f07f22 62%.o: %.c
daf8e955 63 $(CC) $(CFLAGS) -c -o $@ $<
85f07f22
FB
64
65install: all
0fd94442 66 $(MAKE) -C libavcodec install
c1325d18 67 install -d $(prefix)/bin
980fc7b8 68 install -s -m 755 $(PROG) $(prefix)/bin
2744a37f 69 ln -sf ffmpeg $(prefix)/bin/ffplay
85f07f22 70
37736979
FB
71installlib:
72 $(MAKE) -C libavcodec installlib
73 $(MAKE) -C libav installlib
74
57514323
ZK
75dep: depend
76
77depend:
78 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
79
85f07f22 80clean:
2cc8ae96
FB
81 $(MAKE) -C libavcodec clean
82 $(MAKE) -C libav clean
dd9ca370 83 $(MAKE) -C tests clean
37736979 84 rm -f *.o *~ .depend gmon.out TAGS ffmpeg_g$(EXE) $(PROG)
85f07f22
FB
85
86distclean: clean
c72c6d2d 87 $(MAKE) -C libavcodec distclean
980fc7b8 88 rm -f config.mak config.h
85f07f22
FB
89
90TAGS:
91 etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
57514323 92
dd9ca370
FB
93# regression tests
94
4c41db9a 95libavtest test mpeg4 mpeg: ffmpeg$(EXE)
dd9ca370
FB
96 make -C tests $@
97
57514323
ZK
98ifneq ($(wildcard .depend),)
99include .depend
100endif