]> git.proxmox.com Git - rustc.git/blame - src/llvm/tools/clang/lib/Headers/Makefile
Imported Upstream version 0.6
[rustc.git] / src / llvm / tools / clang / lib / Headers / Makefile
CommitLineData
223e47cc
LB
1##===- clang/lib/Headers/Makefile --------------------------*- Makefile -*-===##
2#
3# The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7#
8##===----------------------------------------------------------------------===##
9
10CLANG_LEVEL := ../..
11
12BUILT_SOURCES = arm_neon.h.inc
13TABLEGEN_INC_FILES_COMMON = 1
14
15include $(CLANG_LEVEL)/Makefile
16
17CLANG_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
18 $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
19
20HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include
21
22HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
23
24OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
25
26
27$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir $(HeaderDir)/arm_neon.h
28 $(Verb) cp $< $@
29 $(Echo) Copying $(notdir $<) to build dir
30
31$(HeaderDir)/arm_neon.h: $(BUILT_SOURCES) $(HeaderDir)/.dir
32 $(Verb) cp $< $@
33 $(Echo) Copying $(notdir $<) to build dir
34
35$(HeaderDir)/module.map: $(PROJ_SRC_DIR)/module.map $(HeaderDir)/.dir
36 $(Verb) cp $< $@
37 $(Echo) Copying $(notdir $<) to build dir
38
39
40# Hook into the standard Makefile rules.
41all-local:: $(OBJHEADERS) $(HeaderDir)/module.map
42
43PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include
44
45INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
46INSTHEADERS += $(PROJ_headers)/arm_neon.h
47
48$(PROJ_headers):
49 $(Verb) $(MKDIR) $@
50
51$(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
52 $(Verb) $(DataInstall) $< $(PROJ_headers)
53 $(Echo) Installing compiler include file: $(notdir $<)
54
55$(PROJ_headers)/module.map: $(HeaderDir)/module.map | $(PROJ_headers)
56 $(Verb) $(DataInstall) $< $(PROJ_headers)
57 $(Echo) Installing compiler module map file: $(notdir $<)
58
59
60install-local:: $(INSTHEADERS) $(PROJ_headers)/module.map
61
62$(ObjDir)/arm_neon.h.inc.tmp : $(CLANG_LEVEL)/include/clang/Basic/arm_neon.td $(CLANG_TBLGEN) $(ObjDir)/.dir
63 $(Echo) "Building Clang arm_neon.h.inc with tblgen"
64 $(Verb) $(ClangTableGen) -gen-arm-neon -o $(call SYSPATH, $@) $<