2008-03-16 07:59:48 +08:00
|
|
|
##===- clang/lib/Headers/Makefile --------------------------*- Makefile -*-===##
|
2008-03-03 09:22:28 +08:00
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
2010-06-09 04:34:18 +08:00
|
|
|
CLANG_LEVEL := ../..
|
2010-05-28 10:20:47 +08:00
|
|
|
|
2014-03-29 23:21:06 +08:00
|
|
|
BUILT_SOURCES = arm_neon.h.inc
|
2010-05-28 10:20:47 +08:00
|
|
|
TABLEGEN_INC_FILES_COMMON = 1
|
|
|
|
|
2010-06-09 04:34:18 +08:00
|
|
|
include $(CLANG_LEVEL)/Makefile
|
2008-03-03 09:22:28 +08:00
|
|
|
|
2010-06-26 01:33:49 +08:00
|
|
|
CLANG_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
|
|
|
|
$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
|
2009-09-16 09:26:05 +08:00
|
|
|
|
|
|
|
HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include
|
2008-03-03 09:22:28 +08:00
|
|
|
|
|
|
|
HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
|
|
|
|
|
|
|
|
OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
|
|
|
|
|
|
|
|
|
2014-03-30 01:35:34 +08:00
|
|
|
$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir $(HeaderDir)/arm_neon.h
|
2008-03-09 09:29:23 +08:00
|
|
|
$(Verb) cp $< $@
|
2009-02-22 04:52:41 +08:00
|
|
|
$(Echo) Copying $(notdir $<) to build dir
|
|
|
|
|
2014-03-30 01:35:34 +08:00
|
|
|
$(HeaderDir)/arm_neon.h: $(BUILT_SOURCES) $(HeaderDir)/.dir
|
2010-05-28 10:20:47 +08:00
|
|
|
$(Verb) cp $< $@
|
|
|
|
$(Echo) Copying $(notdir $<) to build dir
|
2010-06-09 04:34:18 +08:00
|
|
|
|
2014-04-17 08:52:48 +08:00
|
|
|
$(HeaderDir)/module.modulemap: $(PROJ_SRC_DIR)/module.modulemap $(HeaderDir)/.dir
|
2012-01-30 04:52:14 +08:00
|
|
|
$(Verb) cp $< $@
|
|
|
|
$(Echo) Copying $(notdir $<) to build dir
|
|
|
|
|
|
|
|
|
2008-03-03 09:22:28 +08:00
|
|
|
# Hook into the standard Makefile rules.
|
2014-04-17 08:52:48 +08:00
|
|
|
all-local:: $(OBJHEADERS) $(HeaderDir)/module.modulemap
|
2008-03-03 09:22:28 +08:00
|
|
|
|
2009-09-16 09:26:05 +08:00
|
|
|
PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include
|
2008-03-03 09:22:28 +08:00
|
|
|
|
|
|
|
INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
|
2010-07-22 09:19:36 +08:00
|
|
|
INSTHEADERS += $(PROJ_headers)/arm_neon.h
|
2008-03-03 09:22:28 +08:00
|
|
|
|
2009-01-22 10:53:03 +08:00
|
|
|
$(PROJ_headers):
|
|
|
|
$(Verb) $(MKDIR) $@
|
|
|
|
|
|
|
|
$(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
|
2008-03-03 09:22:28 +08:00
|
|
|
$(Verb) $(DataInstall) $< $(PROJ_headers)
|
2009-02-22 04:52:41 +08:00
|
|
|
$(Echo) Installing compiler include file: $(notdir $<)
|
2008-03-03 09:22:28 +08:00
|
|
|
|
2014-04-17 08:52:48 +08:00
|
|
|
$(PROJ_headers)/module.modulemap: $(HeaderDir)/module.modulemap | $(PROJ_headers)
|
2012-01-30 04:52:14 +08:00
|
|
|
$(Verb) $(DataInstall) $< $(PROJ_headers)
|
|
|
|
$(Echo) Installing compiler module map file: $(notdir $<)
|
|
|
|
|
|
|
|
|
2014-04-17 08:52:48 +08:00
|
|
|
install-local:: $(INSTHEADERS) $(PROJ_headers)/module.modulemap
|
2010-05-28 10:20:47 +08:00
|
|
|
|
2011-10-06 09:52:10 +08:00
|
|
|
$(ObjDir)/arm_neon.h.inc.tmp : $(CLANG_LEVEL)/include/clang/Basic/arm_neon.td $(CLANG_TBLGEN) $(ObjDir)/.dir
|
2010-05-28 10:20:47 +08:00
|
|
|
$(Echo) "Building Clang arm_neon.h.inc with tblgen"
|
2014-03-30 01:35:34 +08:00
|
|
|
$(Verb) $(ClangTableGen) -gen-arm-neon -o $(call SYSPATH, $@) $<
|