aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2003-01-14 15:30:42 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2003-01-14 15:30:42 +0000
commit77b71ddc11cef98fce54e56dc7a7d26c213a6b6d (patch)
tree9b129f08eba5ac817c75ac9b0bc577ed3d54d9a8 /Makefile
parentcb7c98d6e2277e4ea370aa23926820899bfcd181 (diff)
downloadffmpeg-77b71ddc11cef98fce54e56dc7a7d26c213a6b6d.tar.gz
AUtomatic dependency generation. Runs on Linux (at least). Probably should
update .cvsignore (somehere) to exclude .d files Originally committed as revision 1459 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4d6f3664e6..1c68273f99 100644
--- a/Makefile
+++ b/Makefile
@@ -54,9 +54,12 @@ endif
OBJS = ffmpeg.o ffserver.o
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
+DEPS = $(OBJS:.o=.d)
all: lib $(PROG) $(VHOOK)
+-include $(DEPS)
+
lib:
$(MAKE) -C libavcodec all
$(MAKE) -C libavformat all
@@ -80,6 +83,10 @@ ffplay: ffmpeg$(EXE)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+%.d: %.c
+ @echo $@ \\ > $@
+ $(CC) $(CFLAGS) -MM $< >> $@
+
videohook:
$(MAKE) -C vhook all
@@ -108,7 +115,7 @@ clean: $(CLEANVHOOK)
$(MAKE) -C libavcodec clean
$(MAKE) -C libavformat clean
$(MAKE) -C tests clean
- rm -f *.o *~ .depend gmon.out TAGS ffmpeg_g$(EXE) $(PROG)
+ rm -f *.o *.d *~ .depend gmon.out TAGS ffmpeg_g$(EXE) $(PROG)
clean-vhook:
$(MAKE) -C vhook clean