Index: Makefile =================================================================== --- Makefile (revision 33228) +++ Makefile (revision 33229) @@ -6,6 +6,8 @@ cdt_test: $(OBJS) +include Makefile.dep + cdt_test.o: cdt_test.c $(CC) $(CFLAGS) -c cdt_test.c -o $@ @@ -21,5 +23,8 @@ triangle.o: triangle.c $(CC) $(CFLAGS) -c triangle.c -o $@ +dep: + echo $(OBJS) | ./dep.sh $(CFLAGS) > Makefile.dep + clean: -rm $(OBJS) cdt_test Index: Makefile.dep =================================================================== --- Makefile.dep (nonexistent) +++ Makefile.dep (revision 33229) @@ -0,0 +1,15 @@ +cdt_test.o: cdt_test.c cdt.h typedefs.h point.h ../libcdtr/list/list.h \ + ../genvector/genvector_impl.h ../genvector/genvector_undef.h edge.h \ + triangle.h +cdt.o: cdt.c cdt.h typedefs.h point.h ../libcdtr/list/list.h \ + ../genvector/genvector_impl.h ../genvector/genvector_undef.h edge.h \ + triangle.h +point.o: point.c point.h typedefs.h ../libcdtr/list/list.h \ + ../genvector/genvector_impl.h ../genvector/genvector_undef.h \ + ../libcdtr/list/list.c ../genvector/genvector_impl.c +edge.o: edge.c edge.h typedefs.h ../libcdtr/list/list.h \ + ../genvector/genvector_impl.h ../genvector/genvector_undef.h \ + ../libcdtr/list/list.c ../genvector/genvector_impl.c +triangle.o: triangle.c triangle.h typedefs.h ../libcdtr/list/list.h \ + ../genvector/genvector_impl.h ../genvector/genvector_undef.h \ + ../libcdtr/list/list.c ../genvector/genvector_impl.c Index: dep.sh =================================================================== --- dep.sh (nonexistent) +++ dep.sh (revision 33229) @@ -0,0 +1,8 @@ +#!/bin/sh + +cflags="$@" +tr " " "\n" | while read obj +do + c=${obj%%.o}.c + gcc -MT $obj -MM $c $cflags +done Property changes on: dep.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property