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