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 10 CLANG_LEVEL := ../.. 11 12 BUILT_SOURCES = arm_neon.h.inc 13 TABLEGEN_INC_FILES_COMMON = 1 14 15 include $(CLANG_LEVEL)/Makefile 16 17 CLANG_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \ 18 $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc)) 19 20 HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include 21 22 HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h)) 23 24 OBJHEADERS := $(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 # Hook into the standard Makefile rules. 36 all-local:: $(OBJHEADERS) 37 38 PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include 39 40 INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS)) 41 INSTHEADERS += $(PROJ_headers)/arm_neon.h 42 43 $(PROJ_headers): 44 $(Verb) $(MKDIR) $@ 45 46 $(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers) 47 $(Verb) $(DataInstall) $< $(PROJ_headers) 48 $(Echo) Installing compiler include file: $(notdir $<) 49 50 install-local:: $(INSTHEADERS) 51 52 $(ObjDir)/arm_neon.h.inc.tmp : $(CLANG_LEVEL)/include/clang/Basic/arm_neon.td $(TBLGEN) $(ObjDir)/.dir 53 $(Echo) "Building Clang arm_neon.h.inc with tblgen" 54 $(Verb) $(TableGen) -gen-arm-neon -o $(call SYSPATH, $@) $< 55