Add explicit dependencies on generated header files.

These explicit dependencies are not normally needed (because they
are covered by automatic dependency generation) but when the "-jN"
flag is passed to gmake, they help gmake schedule parallel builds.
(cherry picked from commit 5479aaf721)
This commit is contained in:
Stephen Williams 2009-12-04 15:20:03 -08:00
parent a720b2309e
commit 26ab32ac3b
6 changed files with 9 additions and 7 deletions

View File

@ -197,10 +197,12 @@ version.exe: $(srcdir)/version.c $(srcdir)/version_base.h version_tag.h
dep:
mkdir dep
%.o: %.cc
%.o: %.cc config.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
mv $*.d dep/$*.d
# Here are some explicit dependencies needed to get things going.
main.o: main.cc version_tag.h
lexor.o: lexor.cc parse.h

View File

@ -78,7 +78,7 @@ libveriuser.a: libveriuser.o
dep:
mkdir dep
%.o: %.c
%.o: %.c config.h
$(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o
mv $*.d dep

View File

@ -45,7 +45,7 @@ all: dep vhdl.tgt vhdl.conf vhdl-s.conf
dep:
mkdir dep
%.o: %.cc
%.o: %.cc vhdl_config.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
mv $*.d dep

View File

@ -47,7 +47,7 @@ all: dep vvp.tgt vvp.conf vvp-s.conf
dep:
mkdir dep
%.o: %.c
%.o: %.c vvp_config.h
$(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o
mv $*.d dep

View File

@ -50,7 +50,7 @@ check: all
dep:
mkdir dep
%.o: %.c
%.o: %.c vpi_config.h
$(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o
mv $*.d dep

View File

@ -103,11 +103,11 @@ endif
dep:
mkdir dep
%.o: %.cc
%.o: %.cc config.h
$(CXX) $(CPPFLAGS) $(MDIR1) $(MDIR2) $(CXXFLAGS) -MD -c $< -o $*.o
mv $*.d dep/$*.d
%.o: %.c
%.o: %.c config.h
$(CC) $(CPPFLAGS) $(MDIR1) $(MDIR2) $(CFLAGS) -MD -c $< -o $*.o
mv $*.d dep/$*.d