Mercurial > libavcodec.hg
changeset 1005:c331a07c0be2 libavcodec
AUtomatic dependency generation. Runs on Linux (at least). Probably should
update .cvsignore (somehere) to exclude .d files
author | philipjsg |
---|---|
date | Tue, 14 Jan 2003 15:30:42 +0000 |
parents | 3b9c2ac59ec4 |
children | a32feda30b01 |
files | Makefile |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Mon Jan 13 13:20:21 2003 +0000 +++ b/Makefile Tue Jan 14 15:30:42 2003 +0000 @@ -89,6 +89,7 @@ endif SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) +DEPS := $(OBJS:.o=.d) OBJS := $(OBJS) $(ASM_OBJS) LIB= $(LIBPREF)avcodec$(LIBSUF) @@ -116,6 +117,12 @@ %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< +%.d: %.c + @echo $@ \\ > $@ + $(CC) $(CFLAGS) -MM $< >> $@ + +-include $(DEPS) + %.o: %.S $(CC) $(CFLAGS) -c -o $@ $< @@ -137,7 +144,7 @@ $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend clean: - rm -f *.o *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ + rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ armv4l/*.o armv4l/*~ \ mlib/*.o mlib/*~ \ alpha/*.o alpha/*~ \