3 ## Special targets to build a program from multiple source files
7 .SECONDARY: $(PROG).clean.bc ## keep %.clean.bc from being deleted
10 $(LLINK) -f $(OBJS) -o $@
13 TOOLS = $(LEVEL)/tools/Debug
22 LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc
23 LCFLAGS = -DTORONTO -O2 $(LOCAL_CFLAGS) -Wall
25 LLCLIB = $(LEVEL)/test/runtime.o
26 LIBS = $(LLCLIB) $(LOCAL_LIBS)
29 LLCFLAGS := $(LLCFLAGS) -trace
32 CC = /opt/SUNWspro/bin/cc
33 AS = /opt/SUNWspro/bin/cc
34 DIS = /usr/ccs/bin/dis
38 ASFLAGS = -c $(CFLAGS)
41 ## Special target to force target-dependent library to be compiled
42 ## directly to native code.
45 cd $(LEVEL)/test; $(MAKE) $(@F)
48 $(CC) -c $(CCFLAGS) $<
51 rm -f *.[123] *.bc *.mc *.s *.o a.out core $(PROG)
53 %.mc: %.bc $(LLC) $(AS)
54 @echo "Generating machine instructions for $<"
55 $(LLC) -f -dsched y $(LLCFLAGS) $< > $@
57 %.trace.bc: %.bc $(LLC)
58 $(LLC) -f -trace $(LLCFLAGS) $<
61 $(LCC) $(LCFLAGS) -c $<
67 $(LOPT) -cleangcc -raise -constprop -dce < $< > $@
70 $(LLC) -f $(LLCOPTS) $<
73 $(CC) -o $@ $(LDFLAGS) $< $(LIBS)
76 ## Use a single rule to go from %.bc to % to avoid ambiguity in
77 ## llvm bytecode files and native object code files, both named %.o
80 $(LLC) -f $(LLCFLAGS) -o $*.s $<
82 $(CC) -o $@ $(LDFLAGS) $*.o $(LIBS)
84 ## Cancel built-in implicit rule that overrides the above rule
87 ## The next two rules are for disassembling an executable or an object file