From c7acf81519ea0d1d6a68862cca58060baa7b0934 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 23 Jan 2002 05:46:01 +0000 Subject: [PATCH] Add := to make stuff more efficient git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1551 91177308-0d34-0410-b5e6-96231b3b80d8 --- Makefile.common | 22 +++++++++++----------- Makefile.rules | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile.common b/Makefile.common index c83a55d52b0..8088d506935 100644 --- a/Makefile.common +++ b/Makefile.common @@ -52,12 +52,12 @@ RunBurg = $(BURG) $(BURG_OPTS) #Prof = -pg # TODO: Get rid of exceptions! : -fno-exceptions -fno-rtti -CompileCommonOpts = $(Prof) -Wall -W -Wwrite-strings -Wno-unused-parameter -I$(LEVEL)/include +# -Wno-unused-parameter +CompileCommonOpts = $(Prof) -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include # Compile a file, don't link... Compile = $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts) CompileG = $(Compile) -g -D_DEBUG -# Add This for DebugMalloc: -fno-defer-pop CompileO = $(Compile) -O3 -DNDEBUG -finline-functions -felide-constructors -fnonnull-objects -freg-struct-return -fshort-enums # Link final executable @@ -89,7 +89,7 @@ MakeLib = $(AR) # Source := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l) -Objs = $(sort $(addsuffix .o,$(basename $(Source)))) +Objs := $(sort $(addsuffix .o,$(basename $(Source)))) ObjectsO = $(addprefix Release/,$(Objs)) ObjectsG = $(addprefix Debug/,$(Objs)) @@ -167,7 +167,7 @@ ifdef TOOLNAME # TOOLEXENAME* - These compute the output filenames to generate... TOOLEXENAME_G = $(LEVEL)/tools/Debug/$(TOOLNAME) TOOLEXENAME_O = $(LEVEL)/tools/Release/$(TOOLNAME) -TOOLEXENAMES = $(TOOLEXENAME_G) ###$(TOOLEXENAME_O) +TOOLEXENAMES := $(TOOLEXENAME_G) ###$(TOOLEXENAME_O) # USED_LIBS_OPTIONS - Compute the options line that add -llib1 -llib2, etc. USED_LIBS_OPTIONS = $(addprefix -l, $(USEDLIBS)) @@ -175,9 +175,9 @@ USED_LIBS_OPTIONS = $(addprefix -l, $(USEDLIBS)) # USED_LIB_PATHS - Compute the path of the libraries used so that tools are # rebuilt if libraries change # -STATICUSEDLIBS = $(addsuffix .a, $(USEDLIBS)) -USED_LIB_PATHS_G = $(addprefix $(LEVEL)/lib/Debug/lib, $(STATICUSEDLIBS)) -USED_LIB_PATHS_O = $(addprefix $(LEVEL)/lib/Release/lib, $(STATICUSEDLIBS)) +STATICUSEDLIBS := $(addsuffix .a, $(USEDLIBS)) +USED_LIB_PATHS_G := $(addprefix $(LEVEL)/lib/Debug/lib, $(STATICUSEDLIBS)) +USED_LIB_PATHS_O := $(addprefix $(LEVEL)/lib/Release/lib, $(STATICUSEDLIBS)) all:: $(TOOLEXENAMES) clean:: @@ -208,14 +208,14 @@ Depend/%.d: %.c Depend/.dir Release/%.o: %.cpp Release/.dir Depend/.dir $(CompileO) $< -o $@ -Release/%.o: %.c Release/.dir Depend/.dir - $(CompileO) $< -o $@ +#Release/%.o: %.c Release/.dir Depend/.dir +# $(CompileOC) $< -o $@ Debug/%.o: %.cpp Debug/.dir Depend/.dir $(CompileG) $< -o $@ -Debug/%.o: %.c Debug/.dir Depend/.dir - $(CompileG) $< -o $@ +#Debug/%.o: %.c Debug/.dir Depend/.dir +# $(CompileGC) $< -o $@ # Create a .cpp source file from a burg input file %.burm.cpp: Debug/%.burg diff --git a/Makefile.rules b/Makefile.rules index c83a55d52b0..8088d506935 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -52,12 +52,12 @@ RunBurg = $(BURG) $(BURG_OPTS) #Prof = -pg # TODO: Get rid of exceptions! : -fno-exceptions -fno-rtti -CompileCommonOpts = $(Prof) -Wall -W -Wwrite-strings -Wno-unused-parameter -I$(LEVEL)/include +# -Wno-unused-parameter +CompileCommonOpts = $(Prof) -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include # Compile a file, don't link... Compile = $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts) CompileG = $(Compile) -g -D_DEBUG -# Add This for DebugMalloc: -fno-defer-pop CompileO = $(Compile) -O3 -DNDEBUG -finline-functions -felide-constructors -fnonnull-objects -freg-struct-return -fshort-enums # Link final executable @@ -89,7 +89,7 @@ MakeLib = $(AR) # Source := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l) -Objs = $(sort $(addsuffix .o,$(basename $(Source)))) +Objs := $(sort $(addsuffix .o,$(basename $(Source)))) ObjectsO = $(addprefix Release/,$(Objs)) ObjectsG = $(addprefix Debug/,$(Objs)) @@ -167,7 +167,7 @@ ifdef TOOLNAME # TOOLEXENAME* - These compute the output filenames to generate... TOOLEXENAME_G = $(LEVEL)/tools/Debug/$(TOOLNAME) TOOLEXENAME_O = $(LEVEL)/tools/Release/$(TOOLNAME) -TOOLEXENAMES = $(TOOLEXENAME_G) ###$(TOOLEXENAME_O) +TOOLEXENAMES := $(TOOLEXENAME_G) ###$(TOOLEXENAME_O) # USED_LIBS_OPTIONS - Compute the options line that add -llib1 -llib2, etc. USED_LIBS_OPTIONS = $(addprefix -l, $(USEDLIBS)) @@ -175,9 +175,9 @@ USED_LIBS_OPTIONS = $(addprefix -l, $(USEDLIBS)) # USED_LIB_PATHS - Compute the path of the libraries used so that tools are # rebuilt if libraries change # -STATICUSEDLIBS = $(addsuffix .a, $(USEDLIBS)) -USED_LIB_PATHS_G = $(addprefix $(LEVEL)/lib/Debug/lib, $(STATICUSEDLIBS)) -USED_LIB_PATHS_O = $(addprefix $(LEVEL)/lib/Release/lib, $(STATICUSEDLIBS)) +STATICUSEDLIBS := $(addsuffix .a, $(USEDLIBS)) +USED_LIB_PATHS_G := $(addprefix $(LEVEL)/lib/Debug/lib, $(STATICUSEDLIBS)) +USED_LIB_PATHS_O := $(addprefix $(LEVEL)/lib/Release/lib, $(STATICUSEDLIBS)) all:: $(TOOLEXENAMES) clean:: @@ -208,14 +208,14 @@ Depend/%.d: %.c Depend/.dir Release/%.o: %.cpp Release/.dir Depend/.dir $(CompileO) $< -o $@ -Release/%.o: %.c Release/.dir Depend/.dir - $(CompileO) $< -o $@ +#Release/%.o: %.c Release/.dir Depend/.dir +# $(CompileOC) $< -o $@ Debug/%.o: %.cpp Debug/.dir Depend/.dir $(CompileG) $< -o $@ -Debug/%.o: %.c Debug/.dir Depend/.dir - $(CompileG) $< -o $@ +#Debug/%.o: %.c Debug/.dir Depend/.dir +# $(CompileGC) $< -o $@ # Create a .cpp source file from a burg input file %.burm.cpp: Debug/%.burg