Skip to content
Snippets Groups Projects
Commit afed099b authored by Daniel Dunbar's avatar Daniel Dunbar
Browse files

Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.

 - This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
parent 7a402621
No related branches found
No related tags found
No related merge requests found
......@@ -7,12 +7,12 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
CLANG_LEVEL := ../..
BUILT_SOURCES = arm_neon.h.inc
TABLEGEN_INC_FILES_COMMON = 1
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
CLANG_VERSION := $(shell cat $(PROJ_SRC_DIR)/../../VER)
......@@ -30,7 +30,7 @@ $(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir $(HeaderD
$(HeaderDir)/arm_neon.h: $(BUILT_SOURCES)
$(Verb) cp $< $@
$(Echo) Copying $(notdir $<) to build dir
# Hook into the standard Makefile rules.
all-local:: $(OBJHEADERS)
......
......@@ -11,8 +11,8 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
include $(LEVEL)/Makefile.config
CLANG_LEVEL := ../..
include $(CLANG_LEVEL)/../../Makefile.config
LIBRARYNAME := clangIndex
BUILD_ARCHIVE = 1
......@@ -23,5 +23,5 @@ endif
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
......@@ -11,8 +11,8 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
include $(LEVEL)/Makefile.config
CLANG_LEVEL := ../..
include $(CLANG_LEVEL)/../../Makefile.config
LIBRARYNAME := clangLex
BUILD_ARCHIVE = 1
......@@ -23,5 +23,5 @@ endif
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
......@@ -6,10 +6,10 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
CLANG_LEVEL := ..
PARALLEL_DIRS = Headers Runtime Basic Lex Parse AST Sema CodeGen Analysis \
Checker Rewrite Frontend Index Driver
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
......@@ -11,11 +11,11 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
CLANG_LEVEL := ../..
LIBRARYNAME := clangParse
BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
......@@ -11,11 +11,11 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
CLANG_LEVEL := ../..
LIBRARYNAME := clangRewrite
BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
......@@ -13,8 +13,8 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
include $(LEVEL)/Makefile.common
CLANG_LEVEL := ../..
include $(CLANG_LEVEL)/Makefile
CLANG_VERSION := $(shell cat $(PROJ_SRC_DIR)/../../VER)
ResourceDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)
......
......@@ -12,11 +12,11 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
CLANG_LEVEL := ../..
LIBRARYNAME := clangSema
BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
LEVEL = ../../..
include $(LEVEL)/Makefile.common
CLANG_LEVEL := ..
include $(CLANG_LEVEL)/Makefile
# Test in all immediate subdirectories if unset.
ifdef TESTSUITE
......
......@@ -7,13 +7,13 @@
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
CLANG_LEVEL := ..
DIRS := driver libclang c-index-test
include $(LEVEL)/Makefile.config
include $(CLANG_LEVEL)/../../Makefile.config
ifeq ($(OS), $(filter $(OS), Cygwin MingW))
DIRS := $(filter-out libclang c-index-test, $(DIRS))
endif
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
......@@ -6,7 +6,7 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
CLANG_LEVEL := ../..
TOOLNAME = c-index-test
CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
......@@ -14,10 +14,10 @@ CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
# No plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
include $(LEVEL)/Makefile.config
include $(CLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := bitreader mc core
USEDLIBS = clang.a clangIndex.a clangFrontend.a clangDriver.a clangSema.a \
clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a
include $(LLVM_SRC_ROOT)/Makefile.rules
include $(CLANG_LEVEL)/Makefile
......@@ -6,7 +6,7 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
CLANG_LEVEL := ../..
TOOLNAME = clang
ifndef CLANG_IS_PRODUCTION
......@@ -24,7 +24,7 @@ TOOL_NO_EXPORTS = 1
# Include this here so we can get the configuration of the targets that have
# been configured for construction. We have to do this early so we can set up
# LINK_COMPONENTS before including Makefile.rules
include $(LEVEL)/Makefile.config
include $(CLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
ipo selectiondag
......@@ -32,7 +32,7 @@ USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \
clangParse.a clangLex.a clangBasic.a
include $(LLVM_SRC_ROOT)/Makefile.rules
include $(CLANG_LEVEL)/Makefile
# Translate make variable to define when building a "production" clang.
ifdef CLANG_IS_PRODUCTION
......
......@@ -7,7 +7,7 @@
#
##===----------------------------------------------------------------------===##
LEVEL = ../../../..
CLANG_LEVEL := ../..
LIBRARYNAME = clang
EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
......@@ -17,7 +17,7 @@ CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
# Include this here so we can get the configuration of the targets
# that have been configured for construction. We have to do this
# early so we can set up LINK_COMPONENTS before including Makefile.rules
include $(LEVEL)/Makefile.config
include $(CLANG_LEVEL)/../../Makefile.config
LINK_LIBS_IN_SHARED = 1
SHARED_LIBRARY = 1
......@@ -26,7 +26,7 @@ LINK_COMPONENTS := bitreader mc core
USEDLIBS = clangFrontend.a clangDriver.a clangSema.a \
clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a
include $(LEVEL)/Makefile.common
include $(CLANG_LEVEL)/Makefile
##===----------------------------------------------------------------------===##
# FIXME: This is copied from the 'lto' makefile. Should we share this?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment