30ee86998716739ce9388d0e7bcd8d53b9d593ef
[oota-llvm.git] / lib / Target / SparcV9 / Makefile
1 ##===- lib/Target/SparcV9/Makefile -------------------------*- Makefile -*-===##
2
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
7
8 ##===----------------------------------------------------------------------===##
9 LEVEL = ../../..
10 LIBRARYNAME = LLVMSparcV9
11 PARALLEL_DIRS = InstrSched LiveVar ModuloScheduling RegAlloc
12
13 BUILT_SOURCES = \
14   SparcV9CodeEmitter.inc \
15   SparcV9.burm.cpp 
16
17 include $(LEVEL)/Makefile.common
18
19 SparcV9.burg.in1 : $(BUILD_SRC_DIR)/SparcV9.burg.in
20         @$(ECHO) Pre-processing SparcV9.burg.in
21         $(VERB) $(CXX) -E $(CPPFLAGS) -x c++ $< | $(SED) '/^#/d' | $(SED) 's/Ydefine/#define/' > $@
22
23 SparcV9.burm : SparcV9.burg.in1
24         @$(ECHO) Pre-processing SparcV9.burg.in
25         $(VERB) $(CXX) -E $(CPPFLAGS) -x c++ $< | $(SED) '/^#/d' | $(SED) 's/^Xinclude/#include/' | $(SED) 's/^Xdefine/#define/' > $@
26
27 SparcV9.burm.cpp: SparcV9.burm
28         @$(ECHO) "Burging `basename $<`"
29         $(VERB) $(BURG) -I $< -o $@
30
31 TABLEGEN_FILES := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.td))
32
33 SparcV9CodeEmitter.inc: $(BUILD_SRC_DIR)/SparcV9.td $(TABLEGEN_FILES) $(TBLGEN)
34         @$(ECHO) "Running tblgen on SparcV9.td"
35         $(VERB) $(TableGen) -gen-emitter -o $@ $<
36
37 clean::
38         $(VERB) $(RM) -f SparcV9CodeEmitter.inc SparcV9.burg.in1 SparcV9.burm SparcV9.burm.cpp
39