This should work better with re-generating the SparcV9CodeEmitter.inc file.
[oota-llvm.git] / lib / Target / SparcV9 / Makefile
1 LEVEL = ../../..
2 LIBRARYNAME = sparc
3
4 ExtraSource = Debug/Sparc.burm.cpp 
5
6 include $(LEVEL)/Makefile.common
7
8 ifdef ENABLE_OPTIMIZED
9   DEBUG_FLAG = 
10 else
11   DEBUG_FLAG = -D_DEBUG
12 endif
13
14 Debug/Sparc.burm.cpp: Debug/Sparc.burm Debug/.dir
15         $(RunBurg) $< -o $@
16
17 $(BUILD_ROOT)/Debug/Sparc.burm.o: Debug/Sparc.burm.cpp
18         $(CompileG) $< -o $@
19
20 $(BUILD_ROOT)/Release/Sparc.burm.o: Debug/Sparc.burm.cpp
21         $(CompileO) $< -o $@
22
23 $(BUILD_ROOT)/Profile/Sparc.burm.o: Debug/Sparc.burm.cpp
24         $(CompileP) $< -o $@
25
26 Debug/Sparc.burg.in1 : Sparc.burg.in Debug/.dir
27         $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | sed '/^# /d' | sed 's/Ydefine/#define/' > $@
28
29 Debug/Sparc.burm : Debug/Sparc.burg.in1
30         $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | sed '/^# /d' | sed 's/Xinclude/#include/g' | sed 's/Xdefine/#define/g' > $@
31
32 $(BUILD_ROOT)/Depend/Sparc.burm.d: $(BUILD_ROOT)/Depend/.dir
33         touch $@
34
35 SparcV9CodeEmitter.cpp: SparcV9CodeEmitter.inc
36
37 SparcV9CodeEmitter.inc: SparcV9.td
38         @echo "TableGen-erating $@"
39         cpp -P SparcV9.td | tblgen -gen-emitter > SparcV9CodeEmitter.inc
40
41 clean::
42         rm -f SparcV9CodeEmitter.inc