444c46fc0f91c7e26058be285f455ea9fa4339d1
[oota-llvm.git] / lib / Target / SparcV9 / Makefile
1 LEVEL = ../../..
2 LIBRARYNAME = sparc
3
4 ExtraSource = 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 Sparc.burg.in1 : Sparc.burg.in
15         $(CXX) -E -I$(LLVM_SRC_ROOT)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Ydefine/#define/' > $@
16
17 Sparc.burm : Sparc.burg.in1
18         $(CXX) -E -I$(LLVM_SRC_ROOT)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Xinclude/#include/g' | ${SED} 's/Xdefine/#define/g' > $@
19
20 Sparc.burm.cpp: Sparc.burm
21         @echo "Burging $<"
22         $(RunBurg) $< -o $@
23
24 $(BUILD_OBJ_DIR)/Debug/Sparc.burm.lo: Sparc.burm.cpp
25         $(CompileG) $< -o $@
26
27 $(BUILD_OBJ_DIR)/Release/Sparc.burm.lo: Sparc.burm.cpp
28         $(CompileO) $< -o $@
29
30 $(BUILD_OBJ_DIR)/Profile/Sparc.burm.lo: Sparc.burm.cpp
31         $(CompileP) $< -o $@
32
33 $(BUILD_OBJ_DIR)/Depend/Sparc.burm.d: $(BUILD_OBJ_DIR)/Depend/.dir
34         touch $@
35
36 TARGET_NAME := SparcV9
37
38 TABLEGEN_FILES := $(notdir $(wildcard $(SourceDir)/*.td))
39
40 $(TARGET_NAME)CodeEmitter.cpp:: $(TARGET_NAME)CodeEmitter.inc
41
42 $(TARGET_NAME)CodeEmitter.inc:: $(TARGET_NAME).td $(TABLEGEN_FILES) $(TBLGEN)
43         @echo "Tblgen'ing $<"
44         $(TBLGEN) -I $(SourceDir) $< -gen-emitter -o $@
45
46 clean::
47         ${RM} -f $(TARGET_NAME)CodeEmitter.inc Sparc.burg.in1 Sparc.burm Sparc.burm.cpp
48