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)
done
endif
-#---------------------------------------------------------
+#-----------------------------------------------------------
# Handle the PARALLEL_DIRS options for parallel construction
-#---------------------------------------------------------
+#-----------------------------------------------------------
ifdef PARALLEL_DIRS
SubDirs += $(PARALLEL_DIRS)
# 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 \
- LLVMDataStructure.a LLVMSparcV9RegAlloc
+ LLVMDataStructure LLVMSparcV9RegAlloc
endif
# You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
JIT_LIBS += LLVMAlpha LLVMSelectionDAG
endif
-LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts LLVMAnalysis.a LLVMTransformUtils.a \
+LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
LLVMSystem.a $(PLATFORMLIBDL)
endif
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
+endif
all-local:: $(LibName.BCA)
#---------------------------------------------------------
# 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
+BUILD_RELINKED = 1
+endif
+endif
+
+ifdef BUILD_RELINKED
all-local:: $(LibName.O)
clean-local::
-$(Verb) $(RM) -f $(LexOutput)
- $(Verb) $(RM) -f $(LexOutput)
endif
YaccFiles := $(filter %.y,$(Sources))
ifneq ($(YaccFiles),)
-YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.output)
.PRECIOUS: $(YaccOutput)
%.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 $<
$(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::
- $(Verb) $(RM) -f $(YaccOutput)
+ -$(Verb) $(RM) -f $(YaccOutput)
endif
###############################################################################
$(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 && \
- 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
+endif
uninstall-local::
$(Echo) Uninstalling include files