X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile.rules;h=85a3b7926c85bf040afd74e65b2e83eeeb77a494;hb=c89d27a440370455336202b2a8f25eb9c73e67bc;hp=014d6973cf06799bc5aa06ebe116efa5c040f7c3;hpb=b33cc145619b27cfb5cec3ea4646adaf4f44af98;p=oota-llvm.git diff --git a/Makefile.rules b/Makefile.rules index 014d6973cf0..85a3b7926c8 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -19,10 +19,11 @@ #-------------------------------------------------------------------- # Define the various target sets #-------------------------------------------------------------------- -RecursiveTargets := all clean clean-all install uninstall install-bytecode +RecursiveTargets := all clean clean-all install uninstall install-bytecode \ + unitcheck LocalTargets := all-local clean-local clean-all-local check-local \ install-local printvars uninstall-local \ - install-bytecode-local unittests + install-bytecode-local TopLevelTargets := check dist dist-check dist-clean dist-gzip dist-bzip2 \ dist-zip unittests UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets) @@ -245,6 +246,12 @@ LLVMC_BUILTIN_PLUGIN_2 = $(word 2, $(LLVMC_BUILTIN_PLUGINS)) LLVMC_BUILTIN_PLUGIN_3 = $(word 3, $(LLVMC_BUILTIN_PLUGINS)) LLVMC_BUILTIN_PLUGIN_4 = $(word 4, $(LLVMC_BUILTIN_PLUGINS)) LLVMC_BUILTIN_PLUGIN_5 = $(word 5, $(LLVMC_BUILTIN_PLUGINS)) +LLVMC_BUILTIN_PLUGIN_6 = $(word 6, $(LLVMC_BUILTIN_PLUGINS)) +LLVMC_BUILTIN_PLUGIN_7 = $(word 7, $(LLVMC_BUILTIN_PLUGINS)) +LLVMC_BUILTIN_PLUGIN_8 = $(word 8, $(LLVMC_BUILTIN_PLUGINS)) +LLVMC_BUILTIN_PLUGIN_9 = $(word 9, $(LLVMC_BUILTIN_PLUGINS)) +LLVMC_BUILTIN_PLUGIN_10 = $(word 10, $(LLVMC_BUILTIN_PLUGINS)) + ifneq ($(LLVMC_BUILTIN_PLUGIN_1),) CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_1=$(LLVMC_BUILTIN_PLUGIN_1) @@ -266,6 +273,27 @@ ifneq ($(LLVMC_BUILTIN_PLUGIN_5),) CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_5) endif +ifneq ($(LLVMC_BUILTIN_PLUGIN_6),) +CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_6) +endif + +ifneq ($(LLVMC_BUILTIN_PLUGIN_7),) +CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_7) +endif + +ifneq ($(LLVMC_BUILTIN_PLUGIN_8),) +CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_8) +endif + +ifneq ($(LLVMC_BUILTIN_PLUGIN_9),) +CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_9) +endif + +ifneq ($(LLVMC_BUILTIN_PLUGIN_10),) +CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_10) +endif + + endif endif # LLVMC_BASED_DRIVER @@ -312,6 +340,13 @@ ifeq ($(ENABLE_OPTIMIZED),1) CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) C.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) LD.Flags += $(OPTIMIZE_OPTION) + ifdef DEBUG_SYMBOLS + BuildMode := $(BuildMode)+Debug + CXX.Flags += -g + C.Flags += -g + LD.Flags += -g + KEEP_SYMBOLS := 1 + endif else BuildMode := Debug CXX.Flags += -g @@ -343,9 +378,10 @@ ifdef REQUIRES_FRAME_POINTER LD.Flags := $(filter-out -fomit-frame-pointer,$(LD.Flags)) endif -# IF REQUIRES_RTTI=1 is specified then don't disable run-time type id -ifndef REQUIRES_RTTI - CXX.Flags += -fno-rtti +# If REQUIRES_RTTI=1 is specified then don't disable run-time type id. +ifeq ($(REQUIRES_RTTI), 1) + CXX.Flags := $(filter-out -fno-rtti,$(CXX.Flags)) + CXXFLAGS := $(filter-out -fno-rtti,$(CXXFLAGS)) endif ifdef ENABLE_COVERAGE @@ -799,6 +835,7 @@ clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS)) install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS)) uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS)) install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS)) +unitcheck:: $(addsuffix /.makeunitcheck,$(PARALLEL_DIRS)) ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T)) @@ -1270,7 +1307,7 @@ DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.d.tmp" "$(ObjDir)/$*.d"; \ else $(RM) "$(ObjDir)/$*.d.tmp"; exit 1; fi $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cpp for $(BuildMode) build " $(PIC_FLAG) + $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG) $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) @@ -1610,6 +1647,18 @@ check-lit:: $(EchoCmd) No test directory ; \ fi +check-all:: + $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \ + if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \ + $(EchoCmd) Running test suite ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-all ; \ + else \ + $(EchoCmd) No Makefile in test directory ; \ + fi ; \ + else \ + $(EchoCmd) No test directory ; \ + fi + ############################################################################### # UNITTESTS: Running the unittests test suite ############################################################################### @@ -1618,7 +1667,7 @@ unittests:: $(Verb) if test -d "$(PROJ_OBJ_ROOT)/unittests" ; then \ if test -f "$(PROJ_OBJ_ROOT)/unittests/Makefile" ; then \ $(EchoCmd) Running unittests test suite ; \ - $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests unitcheck; \ else \ $(EchoCmd) No Makefile in unittests directory ; \ fi ; \