aboutsummaryrefslogtreecommitdiff
path: root/tools/llvmc2/Makefile
blob: ab8ff478c903b26e59535373c522519a659b33d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
##===- tools/llvmcc/Makefile -------------------------------*- Makefile -*-===##
#
#                     The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open
# Source License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = llvmc2
BUILT_SOURCES = Tools.inc
LINK_COMPONENTS = support system
REQUIRES_EH := 1

include $(LEVEL)/Makefile.common

TOOLS_TARGET=default
ifeq ($(TOOLS_TARGET), default)
	TOOLS_SOURCE=Example.td
else
	TOOLS_SOURCE=ExampleWithOpt.td
endif

# TOFIX: integrate this part into Makefile.rules?
# The degree of horrorshowness in that file is too much for me atm.
$(ObjDir)/Tools.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir
	$(Echo) "Building LLVMCC configuration library with tblgen"
	$(Verb) $(TableGen) -gen-llvmcc -o $(call SYSPATH, $@) $<

Tools.inc : $(ObjDir)/Tools.inc.tmp
	$(Verb) $(CMP) -s $@ $< || $(CP) $< $@