changeset 26:8ee4acebff58

New dependency system
author arpi_esp
date Fri, 02 Mar 2001 21:47:18 +0000
parents 385c002c97d1
children f0f2a9174225
files mp3lib/Makefile
diffstat 1 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mp3lib/Makefile	Fri Mar 02 21:42:55 2001 +0000
+++ b/mp3lib/Makefile	Fri Mar 02 21:47:18 2001 +0000
@@ -15,7 +15,7 @@
 .s.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-libMP3.a:	$(OBJS)
+libMP3.a:	.depend $(OBJS)
 	$(AR) r libMP3.a $(OBJS)
 
 all:	libMP3.a
@@ -24,11 +24,17 @@
 	rm -f *~ *.o *.a
 
 distclean:
-	makedepend
-	rm -f *~ *.o *.a Makefile.bak
+	rm -f *~ *.o *.a Makefile.bak .depend
+
+dep:    depend
+depend: .depend
 
-dep:	depend
+.depend: Makefile config.mak ../config.mak ../config.h
+	makedepend -f- -- $(CFLAGS) -- $(SRCS) 1>.depend 2>/dev/null
 
-depend:
-	makedepend -- $(CFLAGS) -- $(SRCS) &>/dev/null
-# DO NOT DELETE
+#
+# include dependency files if they exist
+#
+ifneq ($(wildcard .depend),)
+include .depend
+endif