From 4afe61060d62668e054e2f8e9d2b734b6da2b426 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 6 Jan 2013 10:55:22 +0000 Subject: [PATCH] Add a "depend" rule for the makefile. It uses makedepend to generate dependinces that are catted to the current Makefile. --- Makefile | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f7a39e5..f804fd1 100644 --- a/Makefile +++ b/Makefile @@ -101,14 +101,15 @@ check: all clean: rm -f *.o $(GMQCC) $(QCVM) $(TESTSUITE) *.dat -# deps -$(OBJ_D) $(OBJ_C) $(OBJ_X): gmqcc.h opts.def -main.o: lexer.h -parser.o: ast.h lexer.h -ftepp.o: lexer.h -lexer.o: lexer.h -ast.o: ast.h ir.h -ir.o: ir.h +depend: + makedepend -Y -w 65536 \ + $(subst .o,.c,$(OBJ_D)) + makedepend -a -Y -w 65536 \ + $(subst .o,.c,$(OBJ_T)) + makedepend -a -Y -w 65536 \ + $(subst .o,.c,$(OBJ_C)) + makedepend -a -Y -w 65536 \ + $(subst .o,.c,$(OBJ_X)) #install rules install: install-gmqcc install-qcvm install-doc @@ -122,3 +123,29 @@ install-doc: install -d -m755 $(DESTDIR)$(MANDIR)/man1 install -m755 doc/gmqcc.1 $(DESTDIR)$(MANDIR)/man1/ install -m755 doc/qcvm.1 $(DESTDIR)$(MANDIR)/man1/ + +# DO NOT DELETE +util.o: gmqcc.h opts.def +code.o: gmqcc.h opts.def +ast.o: gmqcc.h opts.def ast.h ir.h +ir.o: gmqcc.h opts.def ir.h +conout.o: gmqcc.h opts.def +ftepp.o: gmqcc.h opts.def lexer.h +opts.o: gmqcc.h opts.def +file.o: gmqcc.h opts.def +utf8.o: gmqcc.h opts.def +correct.o: gmqcc.h opts.def + +test.o: gmqcc.h opts.def +util.o: gmqcc.h opts.def +conout.o: gmqcc.h opts.def +file.o: gmqcc.h opts.def + +main.o: gmqcc.h opts.def lexer.h +lexer.o: gmqcc.h opts.def lexer.h +parser.o: gmqcc.h opts.def lexer.h ast.h ir.h +file.o: gmqcc.h opts.def + +util.o: gmqcc.h opts.def +conout.o: gmqcc.h opts.def +file.o: gmqcc.h opts.def -- 2.39.2