Skip to content

Commit

Permalink
Add explicit dependencies on generated header files.
Browse files Browse the repository at this point in the history
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 5479aaf)
  • Loading branch information
steveicarus committed Dec 8, 2009
1 parent a720b23 commit 26ab32a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Makefile.in
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libveriuser/Makefile.in
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tgt-vhdl/Makefile.in
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tgt-vvp/Makefile.in
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion vpi/Makefile.in
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions vvp/Makefile.in
Expand Up @@ -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

Expand Down

0 comments on commit 26ab32a

Please sign in to comment.