]> git.sesse.net Git - ffmpeg/blobdiff - Makefile
- VCD MPEG-1 compliant stream support (set AVF_FLAG_VCD)
[ffmpeg] / Makefile
index dda8b165bdd84acdbb4d4c798cf8a18a69eb37b1..a4f8d579df848b0d405e40489dae389250d3bef2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,13 @@ DEP_FFMPEG_LIB=
 else
 FFMPEG_LIB=libavcodec/libavcodec.a
 DEP_FFMPEG_LIB=libavcodec/libavcodec.a
+ifeq ($(CONFIG_MP3LAME),yes)
+EXTRALIBS+=-lmp3lame
 endif
+endif
+
+OBJS = ffmpeg.o ffserver.o
+SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
 
 all: lib $(PROG)
 
@@ -33,10 +39,10 @@ lib:
        $(MAKE) -C libav all
 
 ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
-       $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
+       $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
 
 ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
-       $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
+       $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
 
 ffplay: ffmpeg$(EXE)
        ln -sf $< $@
@@ -49,10 +55,15 @@ install: all
        install -s -m 755 $(PROG) $(prefix)/bin
        ln -sf ffmpeg $(prefix)/bin/ffplay 
 
+dep:   depend
+
+depend:
+       $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
+
 clean: 
        $(MAKE) -C libavcodec clean
        $(MAKE) -C libav clean
-       rm -f *.o *~ gmon.out TAGS $(PROG) 
+       rm -f *.o *~ .depend gmon.out TAGS $(PROG) 
 
 distclean: clean
        $(MAKE) -C libavcodec distclean
@@ -60,3 +71,7 @@ distclean: clean
 
 TAGS:
        etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
+
+ifneq ($(wildcard .depend),)
+include .depend
+endif