1##===- lib/VMCore/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##===----------------------------------------------------------------------===##
9LEVEL = ../..
10LIBRARYNAME = LLVMCore
11BUILD_ARCHIVE = 1
12REQUIRES_RTTI = 1
13
14BUILT_SOURCES = $(PROJ_OBJ_ROOT)/include/llvm/Intrinsics.gen
15
16include $(LEVEL)/Makefile.common
17
18GENFILE:=$(PROJ_OBJ_ROOT)/include/llvm/Intrinsics.gen
19
20INTRINSICTD  := $(PROJ_SRC_ROOT)/include/llvm/Intrinsics.td
21INTRINSICTDS := $(wildcard $(PROJ_SRC_ROOT)/include/llvm/Intrinsics*.td)
22
23$(ObjDir)/Intrinsics.gen.tmp: $(ObjDir)/.dir $(INTRINSICTDS) $(LLVM_TBLGEN)
24	$(Echo) Building Intrinsics.gen.tmp from Intrinsics.td
25	$(Verb) $(LLVMTableGen) $(call SYSPATH, $(INTRINSICTD)) -o $(call SYSPATH, $@) -gen-intrinsic
26
27$(GENFILE): $(ObjDir)/Intrinsics.gen.tmp
28	$(Verb) $(CMP) -s $@ $< || ( $(CP) $< $@ && \
29	  $(EchoCmd) Updated Intrinsics.gen because Intrinsics.gen.tmp \
30	    changed significantly. )
31
32install-local:: $(GENFILE)
33	$(Echo) Installing $(DESTDIR)$(PROJ_includedir)/llvm/Intrinsics.gen
34	$(Verb) $(DataInstall) $(GENFILE) $(DESTDIR)$(PROJ_includedir)/llvm/Intrinsics.gen
35