2001-07-22 16:37:44 +02:00
|
|
|
# Main ffmpeg Makefile
|
|
|
|
# (c) 2000, 2001 Gerard Lantau
|
|
|
|
#
|
2001-07-23 22:06:54 +02:00
|
|
|
include config.mak
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2001-10-17 20:19:30 +02:00
|
|
|
CFLAGS= $(OPTFLAGS) -Wall -g -I./libavcodec -I./libav
|
|
|
|
LDFLAGS= -g
|
2001-07-23 22:06:54 +02:00
|
|
|
ifeq ($(TARGET_GPROF),yes)
|
2001-07-22 16:37:44 +02:00
|
|
|
CFLAGS+=-p
|
|
|
|
LDFLAGS+=-p
|
|
|
|
endif
|
|
|
|
|
2001-08-16 00:29:44 +02:00
|
|
|
ifeq ($(CONFIG_WIN32),yes)
|
|
|
|
EXE=.exe
|
|
|
|
PROG=ffmpeg$(EXE)
|
|
|
|
else
|
|
|
|
EXT=
|
2001-09-25 01:21:02 +02:00
|
|
|
PROG=ffmpeg ffplay ffserver
|
2001-08-16 00:29:44 +02:00
|
|
|
endif
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2001-10-27 14:04:27 +02:00
|
|
|
ifeq ($(BUILD_SHARED),yes)
|
|
|
|
FFMPEG_LIB=-Llibavcodec -lffmpeg
|
2001-10-31 20:40:18 +01:00
|
|
|
DEP_FFMPEG_LIB=
|
2001-10-27 14:04:27 +02:00
|
|
|
else
|
|
|
|
FFMPEG_LIB=libavcodec/libavcodec.a
|
2001-10-31 20:40:18 +01:00
|
|
|
DEP_FFMPEG_LIB=libavcodec/libavcodec.a
|
2002-03-10 15:44:19 +01:00
|
|
|
ifeq ($(CONFIG_MP3LAME),yes)
|
|
|
|
EXTRALIBS+=-lmp3lame
|
|
|
|
endif
|
2001-10-27 14:04:27 +02:00
|
|
|
endif
|
|
|
|
|
2001-07-22 16:37:44 +02:00
|
|
|
all: lib $(PROG)
|
|
|
|
|
|
|
|
lib:
|
2001-08-11 20:57:27 +02:00
|
|
|
$(MAKE) -C libavcodec all
|
|
|
|
$(MAKE) -C libav all
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2001-10-31 20:40:18 +01:00
|
|
|
ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
|
2002-03-08 10:09:57 +01:00
|
|
|
$(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2001-10-31 20:40:18 +01:00
|
|
|
ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
|
2002-03-08 10:09:57 +01:00
|
|
|
$(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
|
2001-07-22 16:37:44 +02:00
|
|
|
|
2001-09-25 01:21:02 +02:00
|
|
|
ffplay: ffmpeg$(EXE)
|
|
|
|
ln -sf $< $@
|
|
|
|
|
2001-07-22 16:37:44 +02:00
|
|
|
%.o: %.c
|
2001-08-16 00:29:44 +02:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
2001-07-22 16:37:44 +02:00
|
|
|
|
|
|
|
install: all
|
2001-10-27 14:04:27 +02:00
|
|
|
$(MAKE) -C libavcodec install
|
2001-07-23 22:06:54 +02:00
|
|
|
install -s -m 755 $(PROG) $(prefix)/bin
|
2001-09-25 01:21:02 +02:00
|
|
|
ln -sf ffmpeg $(prefix)/bin/ffplay
|
2001-07-22 16:37:44 +02:00
|
|
|
|
|
|
|
clean:
|
2001-08-11 20:57:27 +02:00
|
|
|
$(MAKE) -C libavcodec clean
|
|
|
|
$(MAKE) -C libav clean
|
2001-07-22 16:37:44 +02:00
|
|
|
rm -f *.o *~ gmon.out TAGS $(PROG)
|
|
|
|
|
|
|
|
distclean: clean
|
2001-08-15 15:16:05 +02:00
|
|
|
$(MAKE) -C libavcodec distclean
|
2001-07-23 22:06:54 +02:00
|
|
|
rm -f config.mak config.h
|
2001-07-22 16:37:44 +02:00
|
|
|
|
|
|
|
TAGS:
|
|
|
|
etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
|