summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2001-10-28 20:18:11 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2001-10-28 20:18:11 +0000
commit59a99604232c71a53fbe24b4b384722e9d9c0110 (patch)
tree03236f6f746e431c2da1c247370b57629b340d1c /test
parent20c82b12c909ed643e9b47f93a60fefc46753bcd (diff)
downloadllvm-59a99604232c71a53fbe24b4b384722e9d9c0110.tar.gz
llvm-59a99604232c71a53fbe24b4b384722e9d9c0110.tar.bz2
llvm-59a99604232c71a53fbe24b4b384722e9d9c0110.tar.xz
Added rules for building sparc executable with and without tracing,
and linking with local runtime library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Makefile56
1 files changed, 36 insertions, 20 deletions
diff --git a/test/Makefile b/test/Makefile
index 80871361a0..a9c7f75138 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,12 +1,22 @@
LLC := ../tools/Debug/llc
-AS := ../tools/Debug/as
-LLCOPTS := -dsched y
-ARCHFLAGS =
+LAS := ../tools/Debug/as
+LDIS := ../tools/Debug/dis
+LINK := ../tools/Debug/link
+LLCLIBS := runtime.o
+LLCOPTS :=
+
+ifeq ($(TRACE), yes)
+ LLCOPTS := -trace
+endif
+
+CC = /opt/SUNWspro/bin/cc
+AS = /opt/SUNWspro/bin/cc
+DIS = /usr/ccs/bin/dis
+CFLAGS = -g -xarch=v9
+CCFLAGS = $(CFLAGS)
+LDFLAGS = $(CFLAGS)
+ASFLAGS = -c $(CFLAGS)
-CC = /opt/SUNWspro/bin/cc
-CCFLAGS = -g -xarch=v9
-## CC = gcc
-## CCFLAGS = -g -xarch=v9 ## -mcpu=v9
TESTS := $(wildcard *.ll)
@@ -30,7 +40,7 @@ testcodegen : $(LLCTESTS:%.ll=%.mc)
testsparc : $(LLCTESTS:%.ll=%.s)
clean :
- rm -f *.[123] *.bc *.mc *.s core
+ rm -f *.[123] *.bc *.mc *.s *.o a.out core
%.asmdis: %
@echo "Running assembler/disassembler test on $<"
@@ -40,24 +50,30 @@ clean :
@echo "Running optimizier test on $<"
@./TestOptimizer.sh $<
-%.bc: %.ll
- $(AS) $< -f
+%.bc: %.ll $(LAS)
+ $(LAS) -f $<
-%.mc: %.ll $(LLC) $(AS)
+%.mc: %.bc $(LLC) $(AS)
@echo "Generating machine instructions for $<"
- $(AS) < $< | $(LLC) $(LLCOPTS) > $@
+ $(LLC) -dsched y $(LLCOPTS) $< > $@
+
+%.trace.bc: %.bc $(LLC)
+ $(LLC) -f -trace $(LLCOPTS) $<
-%.s: %.ll $(LLC) $(AS)
- $(AS) < $< | $(LLC) > $@
+%.s: %.bc $(LLC)
+ $(LLC) -f $(LLCOPTS) $<
-## %.o: %.s %.ll
-## /usr/ccs/bin/as $(ARCHFLAGS) $<
+%: %.o $(LLCLIBS)
+ $(CC) -o $@ $(LDFLAGS) $< $(LLCLIBS)
-%.o: %.s
- $(CC) -c $(CCFLAGS) $<
+## Cancel built-in implicit rule that overrides the above rule
+%: %.s
-%: %.o
- $(CC) -o $@ $(CCFLAGS) $<
+## The next two rules are for disassembling an executable or an object file
+%.dis: %
+ $(DIS) $< > $@
+%.dis: %.o
+ $(DIS) $< > $@