changeset 24:b4fdbec3d729

New dependency system
author arpi_esp
date Fri, 02 Mar 2001 21:42:17 +0000
parents 5fb05d71a0fb
children 385c002c97d1
files libvo/Makefile
diffstat 1 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/Makefile	Fri Mar 02 20:46:48 2001 +0000
+++ b/libvo/Makefile	Fri Mar 02 21:42:17 2001 +0000
@@ -6,8 +6,7 @@
 SRCS=rgb15to16mmx.c yuv2rgb_mmx.c yuv2rgb.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_odivx.c $(OPTIONAL_SRCS)
 OBJS=rgb15to16mmx.o yuv2rgb_mmx.o yuv2rgb.o video_out.o vo_null.o vo_pgm.o vo_md5.o vo_odivx.o $(OPTIONAL_OBJS)
 
-CFLAGS  = $(OPTFLAGS) -DMPG12PLAY
-INCLUDE = -I. -I..
+CFLAGS  = $(OPTFLAGS) -I. -I.. -DMPG12PLAY
 # -I/usr/X11R6/include/
 
 .SUFFIXES: .c .o
@@ -15,9 +14,9 @@
 # .PHONY: all clean
 
 .c.o:
-	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
+	$(CC) -c $(CFLAGS) -o $@ $<
 
-$(LIBNAME):     $(OBJS)
+$(LIBNAME):     .depend $(OBJS)
 	$(AR) r $(LIBNAME) $(OBJS)
 
 all:    $(LIBNAME)
@@ -26,12 +25,17 @@
 	rm -f *.o *.a *~
 
 distclean:
-	makedepend
-	rm -f Makefile.bak *.o *.a *~
+	rm -f Makefile.bak *.o *.a *~ .depend
 
 dep:    depend
+depend: .depend
 
-depend:
-	makedepend -- $(CFLAGS) -- $(SRCS) &> /dev/null
+.depend: Makefile config.mak ../config.mak ../config.h
+	makedepend -f- -- $(CFLAGS) -- $(SRCS) 1>.depend 2>/dev/null
 
-# DO NOT DELETE
+#
+# include dependency files if they exist
+#
+ifneq ($(wildcard .depend),)
+include .depend
+endif