# (locallly generated header files).
# BUILD_SRC_DIR : Files local to the particular source directory.
# BUILD_SRC_ROOT/include : Files global to the project.
+# LLVM_OBJ_ROOT/include : config.h files generated by autoconf
# LEVEL/include : config.h files for the project
# LLVM_SRC_ROOT/include : Files global to LLVM.
-# LLVM_OBJ_ROOT/include : config.h files generated by autoconf
#
-CPPFLAGS += -I$(BUILD_OBJ_DIR) -I$(BUILD_SRC_DIR) -I$(BUILD_SRC_ROOT)/include -I$(LEVEL)/include -I$(LLVM_SRC_ROOT)/include -I$(LLVM_OBJ_ROOT)/include
+CPPFLAGS += -I$(BUILD_OBJ_DIR) -I$(BUILD_SRC_DIR) -I$(LLVM_OBJ_ROOT)/include \
+ -I$(BUILD_SRC_ROOT)/include -I$(LEVEL)/include \
+ -I$(LLVM_SRC_ROOT)/include
# By default, strip symbol information from executable
ifndef KEEP_SYMBOLS
# The local Makefile can list other Source files via ExtraSource = ...
#
ifndef Source
-Source := $(notdir $(ExtraSource) $(wildcard $(SourceDir)/*.cpp $(SourceDir)/*.c $(SourceDir)/*.y $(SourceDir)/*.l))
+Source := $(notdir $(ExtraSource) $(wildcard $(SourceDir)/*.cpp \
+ $(SourceDir)/*.c $(SourceDir)/*.y $(SourceDir)/*.l))
endif
#
ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs))
ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs))
ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs))
-ObjectsBC := $(addprefix $(BUILD_OBJ_DIR)/Bytecode/,$(addsuffix .bc, $(Srcs)))
+ObjectsBC := $(addprefix $(BUILD_OBJ_DIR)/BytecodeObj/,$(addsuffix .bc, $(Srcs)))
#
# The real objects underlying the libtool objects
ifdef EXPORTED_SYMBOL_LIST
LinkBCLib += -Xlinker -internalize-public-api-list=$(EXPORTED_SYMBOL_LIST)
else
+ ifdef EXPORTED_SYMBOL_FILE
+LinkBCLib += -Xlinker -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
+ else
LinkBCLib += -Xlinker -disable-internalize
+ endif
endif
# Create a TAGS database for emacs
#------------------------------------------------------------------------
-ifdef ETAGS
+ifneq ($(ETAGS),false)
ifeq ($(LEVEL), .)
SRCDIRS := $(wildcard $(SourceDir)/include $(SourceDir)/lib $(SourceDir)/tools)
#---------------------------------------------------------
-.PRECIOUS: $(BUILD_OBJ_DIR)/Depend/.dir $(BUILD_OBJ_DIR)/Bytecode/.dir
+.PRECIOUS: $(BUILD_OBJ_DIR)/Depend/.dir $(BUILD_OBJ_DIR)/BytecodeObj/.dir
.PRECIOUS: $(BUILD_OBJ_DIR)/Debug/.dir $(BUILD_OBJ_DIR)/Release/.dir
# Create .lo files in the ObjectFiles directory from the .cpp and .c files...
@echo "Compiling $<"
$(VERB) $(CompileCG) $< -o $@
-$(BUILD_OBJ_DIR)/Bytecode/%.bc: %.cpp $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1XX)
+$(BUILD_OBJ_DIR)/BytecodeObj/%.bc: %.cpp $(BUILD_OBJ_DIR)/BytecodeObj/.dir $(LCC1XX)
@echo "Compiling $< to bytecode"
$(VERB) $(LLVMGXX) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
-$(BUILD_OBJ_DIR)/Bytecode/%.bc: %.c $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1)
+$(BUILD_OBJ_DIR)/BytecodeObj/%.bc: %.c $(BUILD_OBJ_DIR)/BytecodeObj/.dir $(LCC1)
@echo "Compiling $< to bytecode"
$(VERB) $(LLVMGCC) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
-$(BUILD_OBJ_DIR)/Bytecode/%.bc: %.ll $(BUILD_OBJ_DIR)/Bytecode/.dir $(LLVMAS)
+$(BUILD_OBJ_DIR)/BytecodeObj/%.bc: %.ll $(BUILD_OBJ_DIR)/BytecodeObj/.dir $(LLVMAS)
@echo "Compiling $< to bytecode"
$(VERB) $(LLVMAS) $< -f -o $@
@$(DATE) > $@
# To create postscript files from dot files...
-ifdef DOT
+ifneq ($(DOT),false)
%.ps: %.dot
${DOT} -Tps < $< > $@
else
# which they can be "generated." This allows make to ignore them and
# reproduce the dependency lists.
#
-%.h::
+%.h:: ;
# 'make clean' nukes the tree
clean::
$(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Debug $(BUILD_OBJ_DIR)/Release
$(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Profile $(BUILD_OBJ_DIR)/Depend
- $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Bytecode
+ $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/BytecodeObj
$(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc
$(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT)