Removal of more unnecesary stuff
[oota-llvm.git] / test / Makefile.tests
1 ##-----------------------------------------------------------*-Makefile-*-
2 ## Common rules for generating, linking, and compiling via LLVM.  This is
3 ## used to implement a robust testing framework for LLVM
4 ##------------------------------------------------------------------------
5
6 ## NOTE: This is preliminary and will change in the future
7
8
9 include ${LEVEL}/Makefile.common
10
11 .PHONY: clean default
12
13 ## keep %.bc and %.s from being deleted while we're debugging
14 .PRECIOUS: Output/%.bc Output/%.ll %.s Output/.dir
15
16
17 TOOLS    = $(LEVEL)/tools/Debug
18
19 LLI      = $(TOOLS)/lli
20 LLC      = $(TOOLS)/llc
21 LAS      = $(TOOLS)/gccas
22 LDIS     = $(TOOLS)/dis 
23 LOPT     = $(TOOLS)/opt
24 LLINK    = $(TOOLS)/link
25 LLCFLAGS =
26
27 LCC      = /home/vadve/lattner/cvs/gcc_install/bin/gcc
28 LCFLAGS  += -O2 -Wall
29
30 LLCLIB   = $(LEVEL)/test/runtime.o
31 LIBS    += $(LLCLIB)
32
33 ifeq ($(TRACE), yes)
34     LLCFLAGS += -trace
35 endif
36 ifeq ($(TRACEM), yes)
37     LLCFLAGS += -tracem
38 endif
39
40 NATGCC  = /usr/dcs/software/supported/bin/gcc
41
42 CC      = /opt/SUNWspro/bin/cc
43 AS      = /opt/SUNWspro/bin/cc
44 DIS     = /usr/ccs/bin/dis
45 CP      = /bin/cp -f
46 CFLAGS  += -g -xarch=v9
47
48 ## Special target to force target-dependent library to be compiled
49 ## directly to native code.
50 ## 
51 $(LLCLIB): $(LLCLIB:.o=.c)
52         cd $(LEVEL)/test; $(MAKE) $(@F)
53
54 #runtime.o: runtime.c
55 #       $(CC) -c $(CCFLAGS) $<
56
57 clean ::
58         $(RM) *.bc *.mc *.s *.o a.out core
59         $(RM) -rf Output/
60
61 %.mc: %.bc $(LLC) $(AS)
62         @echo "Generating machine instructions for $<"
63         $(LLC) -f -dsched y $(LLCFLAGS) $< > $@
64
65 %.trace.bc: %.bc $(LLC)
66         $(LLC) -f -trace $(LLCFLAGS) $<
67
68
69 Output/%.ll: %.c $(LCC) Output/.dir
70         $(LCC) $(LCFLAGS) -S $< -o $@
71
72 Output/%.bc: Output/%.ll $(LAS)
73         $(LAS) $< -o $@
74
75 #%.s: %.linked.bc
76 #       $(LLC) -f $(LCFLAGS) $< -o $@
77
78 #%: %.o $(LIBS)
79 #       $(CC) $(LDFLAGS) $< $(LIBS) -o $@
80
81
82 ## Cancel built-in implicit rules that override above rules
83 %: %.s
84
85 %: %.c
86
87 %.o: %.c
88
89 ## The next two rules are for disassembling an executable or an object file
90 #%.dis: %
91 #       $(DIS) $< > $@
92
93 #%.dis: %.o
94 #       $(DIS) $< > $@
95
96