projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor/genericize this, no functionality change
[oota-llvm.git]
/
Makefile.rules
diff --git
a/Makefile.rules
b/Makefile.rules
index 4b759e6b490ee7157029e1e45ef7a72647001f45..39c741a8838c196a294dbe5529bf000c352fe815 100644
(file)
--- a/
Makefile.rules
+++ b/
Makefile.rules
@@
-108,6
+108,9
@@
spotless:
else \
$(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
fi
else \
$(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \
fi
+else
+spotless:
+ $(EchoCmd) "spotless target not supported for objdir == srcdir"
endif
$(BUILT_SOURCES) : $(ObjMakefiles)
endif
$(BUILT_SOURCES) : $(ObjMakefiles)
@@
-475,9
+478,9
@@
$(RecursiveTargets)::
done
endif
done
endif
-#---------------------------------------------------------
+#---------------------------------------------------------
--
# Handle the PARALLEL_DIRS options for parallel construction
# Handle the PARALLEL_DIRS options for parallel construction
-#---------------------------------------------------------
+#---------------------------------------------------------
--
ifdef PARALLEL_DIRS
SubDirs += $(PARALLEL_DIRS)
ifdef PARALLEL_DIRS
SubDirs += $(PARALLEL_DIRS)
@@
-588,9
+591,9
@@
endif
# What the Sparc JIT requires
ifdef ENABLE_SPARCV9_JIT
JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \
# What the Sparc JIT requires
ifdef ENABLE_SPARCV9_JIT
JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \
- LLVMSparcV9LiveVar LLVMInstrumentation.a
LLVMProfilePaths
\
+ LLVMSparcV9LiveVar LLVMInstrumentation.a \
LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \
LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \
- LLVMDataStructure
.a
LLVMSparcV9RegAlloc
+ LLVMDataStructure LLVMSparcV9RegAlloc
endif
# You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
endif
# You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
@@
-617,7
+620,7
@@
ifdef ENABLE_ALPHA_JIT
JIT_LIBS += LLVMAlpha LLVMSelectionDAG
endif
JIT_LIBS += LLVMAlpha LLVMSelectionDAG
endif
-LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts
LLVMAnalysis.a LLVMTransformUtil
s.a \
+LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts
.a LLVMTransformUtils.a LLVMAnalysi
s.a \
LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
LLVMSystem.a $(PLATFORMLIBDL)
endif
LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
LLVMSystem.a $(PLATFORMLIBDL)
endif
@@
-769,8
+772,10
@@
$(warning Bytecode libraries require llvm-gcc which could not be found ****)
else
# make the C and C++ compilers strip debug info out of bytecode libraries.
else
# make the C and C++ compilers strip debug info out of bytecode libraries.
+ifndef DEBUG_RUNTIME
BCCompile.C += -Wa,-strip-debug
BCCompile.CXX += -Wa,-strip-debug
BCCompile.C += -Wa,-strip-debug
BCCompile.CXX += -Wa,-strip-debug
+endif
all-local:: $(LibName.BCA)
all-local:: $(LibName.BCA)
@@
-824,10
+829,18
@@
endif
#---------------------------------------------------------
# ReLinked Library Targets:
#---------------------------------------------------------
# ReLinked Library Targets:
-# If the user didn't explicitly forbid building a
-# relinked then we provide targets for building them.
+# If the user explicitly requests a relinked library with
+# BUILD_RELINKED, provide it. Otherwise, if they specify
+# neither of BUILD_ARCHIVE or DONT_BUILD_RELINKED, give
+# them one.
#---------------------------------------------------------
#---------------------------------------------------------
+ifndef BUILD_ARCHIVE
ifndef DONT_BUILD_RELINKED
ifndef DONT_BUILD_RELINKED
+BUILD_RELINKED = 1
+endif
+endif
+
+ifdef BUILD_RELINKED
all-local:: $(LibName.O)
all-local:: $(LibName.O)
@@
-1209,7
+1222,6
@@
$(LexObjs): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
clean-local::
-$(Verb) $(RM) -f $(LexOutput)
clean-local::
-$(Verb) $(RM) -f $(LexOutput)
- $(Verb) $(RM) -f $(LexOutput)
endif
endif
@@
-1220,7
+1232,6
@@
endif
YaccFiles := $(filter %.y,$(Sources))
ifneq ($(YaccFiles),)
YaccFiles := $(filter %.y,$(Sources))
ifneq ($(YaccFiles),)
-YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
.PRECIOUS: $(YaccOutput)
.PRECIOUS: $(YaccOutput)
@@
-1229,7
+1240,7
@@
YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
%.cpp: %.y
%.h: %.y
%.cpp: %.y
%.h: %.y
-# Rule for building the bison parsers...
+# Rule for building the bison
based
parsers...
$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
$(Echo) "Bisoning $*.y"
$(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
$(Echo) "Bisoning $*.y"
$(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
@@
-1237,8
+1248,13
@@
$(PROJ_SRC_DIR)/%.cpp $(PROJ_SRC_DIR)/%.h : $(PROJ_SRC_DIR)/%.y
$(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
$(Echo) "*** DON'T FORGET TO CHECK IN $*.cpp and $*.h (generated files)"
$(Verb) $(MV) -f $*.tab.h $(PROJ_SRC_DIR)/$*.h
$(Echo) "*** DON'T FORGET TO CHECK IN $*.cpp and $*.h (generated files)"
+YaccObjs := $(patsubst %.y,$(ObjDir)/%.o,$(YaccFiles))
+$(YaccObjs): $(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp
+
+YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
+
clean-local::
clean-local::
- $(Verb) $(RM) -f $(YaccOutput)
+
-
$(Verb) $(RM) -f $(YaccOutput)
endif
###############################################################################
endif
###############################################################################
@@
-1552,12
+1568,14
@@
install-local::
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
done ; \
fi
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
done ; \
fi
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
cd $(PROJ_OBJ_ROOT)/include && \
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
cd $(PROJ_OBJ_ROOT)/include && \
- for hdr in `find . -type f -print` ; do \
+ for hdr in `find . -type f -print
| grep -v CVS
` ; do \
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
done ; \
fi
$(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
done ; \
fi
+endif
uninstall-local::
$(Echo) Uninstalling include files
uninstall-local::
$(Echo) Uninstalling include files