Makefile revision afed099bd2e759efd4bb63fdc525d3445f94cc13
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 := $(shell cat $(PROJ_SRC_DIR)/../../VER)
18
19HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include
20
21HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
22
23OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
24
25
26$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir $(HeaderDir)/arm_neon.h
27	$(Verb) cp $< $@
28	$(Echo) Copying $(notdir $<) to build dir
29
30$(HeaderDir)/arm_neon.h: $(BUILT_SOURCES)
31	$(Verb) cp $< $@
32	$(Echo) Copying $(notdir $<) to build dir
33
34# Hook into the standard Makefile rules.
35all-local:: $(OBJHEADERS)
36
37PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include
38
39INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
40
41$(PROJ_headers):
42	$(Verb) $(MKDIR) $@
43
44$(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
45	$(Verb) $(DataInstall) $< $(PROJ_headers)
46	$(Echo) Installing compiler include file: $(notdir $<)
47
48install-local:: $(INSTHEADERS)
49
50$(ObjDir)/arm_neon.h.inc.tmp : arm_neon.td $(TBLGEN) $(ObjDir)/.dir
51	$(Echo) "Building Clang arm_neon.h.inc with tblgen"
52	$(Verb) $(TableGen) -gen-arm-neon-header -o $(call SYSPATH, $@) $<
53