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 ##------------------------------------------------------------------------
6 ## NOTE: This is preliminary and will change in the future
9 include ${LEVEL}/Makefile.common
13 ## keep %.bc and %.s from being deleted while we're debugging
14 .PRECIOUS: Output/%.bc Output/%.ll %.s Output/.dir
17 TOOLS = $(LEVEL)/tools/Debug
27 LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc
30 LLCLIB = $(LEVEL)/test/runtime.o
40 NATGCC = /usr/dcs/software/supported/bin/gcc
42 CC = /opt/SUNWspro/bin/cc
43 AS = /opt/SUNWspro/bin/cc
44 DIS = /usr/ccs/bin/dis
46 CFLAGS += -g -xarch=v9
48 ## Special target to force target-dependent library to be compiled
49 ## directly to native code.
51 $(LLCLIB): $(LLCLIB:.o=.c)
52 cd $(LEVEL)/test; $(MAKE) $(@F)
55 # $(CC) -c $(CCFLAGS) $<
58 $(RM) *.bc *.mc *.s *.o a.out core
61 %.mc: %.bc $(LLC) $(AS)
62 @echo "Generating machine instructions for $<"
63 $(LLC) -f -dsched y $(LLCFLAGS) $< > $@
65 %.trace.bc: %.bc $(LLC)
66 $(LLC) -f -trace $(LLCFLAGS) $<
69 Output/%.ll: %.c $(LCC) Output/.dir
70 $(LCC) $(LCFLAGS) -S $< -o $@
72 Output/%.bc: Output/%.ll $(LAS)
76 # $(LLC) -f $(LCFLAGS) $< -o $@
79 # $(CC) $(LDFLAGS) $< $(LIBS) -o $@
82 ## Cancel built-in implicit rules that override above rules
89 ## The next two rules are for disassembling an executable or an object file