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 # These files, which might be intermediate results, should not be deleted by
15 .PRECIOUS: Output/%.bc Output/%.ll
16 .PRECIOUS: Output/%.tbc Output/%.tll
17 .PRECIOUS: Output/.dir
19 # LLVM Tool Definitions...
21 LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc
22 TOOLS = $(LEVEL)/tools/Debug
26 LGCCAS = $(TOOLS)/gccas
33 FAILURE = $(LEVEL)/test/Failure.sh
35 # Native Tool Definitions
36 NATGCC = /usr/dcs/software/supported/bin/gcc
37 CC = /opt/SUNWspro/bin/cc
38 AS = /opt/SUNWspro/bin/cc
39 DIS = /usr/ccs/bin/dis
41 CFLAGS += -g -xarch=v9
43 LLCLIB = $(LEVEL)/test/runtime.o
59 Output/%.ll: %.c $(LCC) Output/.dir
60 $(LCC) $(LCCFLAGS) -S $< -o $@
62 Output/%.bc: Output/%.ll $(LGCCAS)
65 Output/%.bc: %.ll $(LAS)
69 # Testing versions of provided utilities...
71 Output/%.tll: %.c $(LCC) Output/.dir
72 @echo "======== Compiling $<"
73 $(LCC) $(LCCFLAGS) -S $< -o $@ || \
74 ( rm -f $@; $(FAILURE) $@ )
76 Output/%.tbc: Output/%.tll $(LAS)
77 @echo "======== Assembling $<"
78 $(LAS) -f $< -o $@ || \
79 ( rm -f $@; $(FAILURE) $@ )
84 # $(LLC) -f $(LLCFLAGS) $< -o $@
87 # $(CC) $(LDFLAGS) $< $(LIBS) -o $@
90 ## Cancel built-in implicit rules that override above rules
97 ## The next two rules are for disassembling an executable or an object file