From 5b6f47cd0f83129d12fba9428c97ae3d97607f93 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 19 Sep 2016 19:31:09 -0400 Subject: [PATCH] If VM_PARALLEL_BUILDS=1, use OPT_FAST and OPT_SLOW. --- Changes | 3 +++ include/verilated.mk.in | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 8ec85af18..391b7a1c9 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,9 @@ The contributors that suggested a given feature are shown in []. Thanks! *** Add --no-decoration to remove output comments, msg2015. [Frederic Requin] +*** If VM_PARALLEL_BUILDS=1, use OPT_FAST and OPT_SLOW. [Frederic Requin] + Set VM_DEFAULT_RULES=0 for old behavior. + **** Add error on DPI functions > 32 bits, msg1995. [Elliot Mednick] **** Fix SystemC compiles with VPI, bug1081. [Arthur Kahlich] diff --git a/include/verilated.mk.in b/include/verilated.mk.in index 4dfc8e6f1..64cc400ce 100644 --- a/include/verilated.mk.in +++ b/include/verilated.mk.in @@ -163,16 +163,24 @@ $(VM_PREFIX)__ALL.a: $(VK_OBJS) ###################################################################### ### Compile rules -#Default rule embedded in make: (Not defined so user makefiles can override it) -#.cpp.o: -# $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< - +ifneq ($(VM_DEFAULT_RULES),0) $(VM_PREFIX)__ALLsup.o: $(VM_PREFIX)__ALLsup.cpp $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_SLOW) -c -o $@ $< $(VM_PREFIX)__ALLcls.o: $(VM_PREFIX)__ALLcls.cpp $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -c -o $@ $< +$(VM_PREFIX)%__Slow.o: $(VM_PREFIX)%__Slow.cpp + $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_SLOW) -c -o $@ $< + +$(VM_PREFIX)%.o: $(VM_PREFIX)%.cpp + $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -c -o $@ $< +endif + +#Default rule embedded in make: +#.cpp.o: +# $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + ###################################################################### ### Debugging