1 ##===- lib/IR/Makefile -------------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
10 LIBRARYNAME = LLVMCore
13 BUILT_SOURCES = $(PROJ_OBJ_ROOT)/include/llvm/IR/Intrinsics.gen \
14 $(PROJ_OBJ_ROOT)/include/llvm/IR/Attributes.inc
16 include $(LEVEL)/Makefile.common
18 GENFILE:=$(PROJ_OBJ_ROOT)/include/llvm/IR/Intrinsics.gen
19 ATTRINCFILE:=$(PROJ_OBJ_ROOT)/include/llvm/IR/Attributes.inc
21 INTRINSICTD := $(PROJ_SRC_ROOT)/include/llvm/IR/Intrinsics.td
22 INTRINSICTDS := $(wildcard $(PROJ_SRC_ROOT)/include/llvm/IR/Intrinsics*.td)
23 ATTRIBUTESTD := $(PROJ_SRC_ROOT)/include/llvm/IR/Attributes.td
25 $(ObjDir)/Intrinsics.gen.tmp: $(ObjDir)/.dir $(INTRINSICTDS) $(LLVM_TBLGEN)
26 $(Echo) Building Intrinsics.gen.tmp from Intrinsics.td
27 $(Verb) $(LLVMTableGen) $(call SYSPATH, $(INTRINSICTD)) -o $(call SYSPATH, $@) -gen-intrinsic
29 $(GENFILE): $(ObjDir)/Intrinsics.gen.tmp $(PROJ_OBJ_ROOT)/include/llvm/IR/.dir
30 $(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \
31 $(EchoCmd) Updated Intrinsics.gen because Intrinsics.gen.tmp \
32 changed significantly. )
34 $(ObjDir)/Attributes.inc.tmp: $(ObjDir)/.dir $(ATTRIBUTESTD) $(LLVM_TBLGEN)
35 $(Echo) Building Attributes.inc.tmp from $(ATTRIBUTESTD)
36 $(Verb) $(LLVMTableGen) $(call SYSPATH, $(ATTRIBUTESTD)) -o $(call SYSPATH, $@) -gen-attrs
38 $(ATTRINCFILE): $(ObjDir)/Attributes.inc.tmp $(PROJ_OBJ_ROOT)/include/llvm/IR/.dir
39 $(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \
40 $(EchoCmd) Updated Attributes.inc because Attributes.inc.tmp \
41 changed significantly. )
43 install-local:: $(GENFILE)
44 $(Echo) Installing $(DESTDIR)$(PROJ_includedir)/llvm/IR/Intrinsics.gen
45 $(Verb) $(DataInstall) $(GENFILE) $(DESTDIR)$(PROJ_includedir)/llvm/IR/Intrinsics.gen
47 install-local:: $(ATTRINCFILE)
48 $(Echo) Installing $(DESTDIR)$(PROJ_includedir)/llvm/IR/Attributes.inc
49 $(Verb) $(DataInstall) $(ATTRINCFILE) $(DESTDIR)$(PROJ_includedir)/llvm/IR/Attributes.inc