Anton Korobeynikov | e9ffb5b | 2008-03-23 08:57:20 +0000 | [diff] [blame^] | 1 | ##===- tools/llvmcc/Makefile -------------------------------*- Makefile -*-===## |
| 2 | # |
| 3 | # The LLVM Compiler Infrastructure |
| 4 | # |
| 5 | # This file is distributed under the University of Illinois Open |
| 6 | # Source License. See LICENSE.TXT for details. |
| 7 | # |
| 8 | ##===----------------------------------------------------------------------===## |
| 9 | LEVEL = ../.. |
| 10 | TOOLNAME = llvmc2 |
| 11 | BUILT_SOURCES = Tools.inc |
| 12 | LINK_COMPONENTS = support system |
| 13 | REQUIRES_EH := 1 |
| 14 | |
| 15 | include $(LEVEL)/Makefile.common |
| 16 | |
| 17 | TOOLS_TARGET=default |
| 18 | ifeq ($(TOOLS_TARGET), default) |
| 19 | TOOLS_SOURCE=Example.td |
| 20 | else |
| 21 | TOOLS_SOURCE=ExampleWithOpt.td |
| 22 | endif |
| 23 | |
| 24 | # TOFIX: integrate this part into Makefile.rules? |
| 25 | # The degree of horrorshowness in that file is too much for me atm. |
| 26 | $(ObjDir)/Tools.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir |
| 27 | $(Echo) "Building LLVMCC configuration library with tblgen" |
| 28 | $(Verb) $(TableGen) -gen-llvmcc -o $@ $< |
| 29 | |
| 30 | Tools.inc : $(ObjDir)/Tools.inc.tmp |
| 31 | $(Verb) $(CMP) -s $@ $< || $(CP) $< $@ |
| 32 | |