From 977fa8df93ac03b89ef07c94fa12ed7aec11f41c Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sat, 15 Dec 2001 01:13:42 +0000 Subject: Renamed Makefile.target to Makefile.tests and folded in Chris's Makefile.tests used to build and test single-source tests (but with some uses of Output/ directory eliminated for now). Let's not create two versions of this file! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1490 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Makefile.tests | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'test') diff --git a/test/Makefile.tests b/test/Makefile.tests index 849803d260..fe3cc4b807 100644 --- a/test/Makefile.tests +++ b/test/Makefile.tests @@ -3,20 +3,25 @@ ## Common rules for generating, linking, and compiling via LLVM. ##------------------------------------------------------------------------ +## NOTE: This is preliminary and will change in the future + + +include ${LEVEL}/Makefile.common + .PHONY: clean default ## keep %.linked.bc and %.s from being deleted while we're debugging -.PRECIOUS: %.linked.bc %.s +.PRECIOUS: %.bc %.s %.ll TOOLS = $(LEVEL)/tools/Debug +LLI = $(TOOLS)/lli LLC = $(TOOLS)/llc -LAS = $(TOOLS)/as +LAS = $(TOOLS)/gccas LDIS = $(TOOLS)/dis LOPT = $(TOOLS)/opt LLINK = $(TOOLS)/link -LGCCAS = $(TOOLS)/gccas LLCFLAGS = LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc @@ -32,6 +37,8 @@ ifeq ($(TRACEM), yes) LLCFLAGS := $(LLCFLAGS) -tracem endif +NATGCC = /usr/dcs/software/supported/bin/gcc + CC = /opt/SUNWspro/bin/cc AS = /opt/SUNWspro/bin/cc DIS = /usr/ccs/bin/dis @@ -71,8 +78,8 @@ $(LLCLIB): $(LLCLIB:.o=.c) runtime.o: runtime.c $(CC) -c $(CCFLAGS) $< -clean : - $(RM) *.[123] *.bc *.mc *.s *.o a.out core $(PROG) $(PROG).native +clean :: + $(RM) *.bc *.mc *.s *.o a.out core $(PROG) $(PROG).native %.mc: %.bc $(LLC) $(AS) @echo "Generating machine instructions for $<" @@ -81,18 +88,16 @@ clean : %.trace.bc: %.bc $(LLC) $(LLC) -f -trace $(LLCFLAGS) $< -## Leave this rule out to avoid problems in tests that have both .c and .ll -## %.ll: %.c -## $(LCC) $(LCFLAGS) -S $< -o $*.ll -%.gll: %.c - $(LCC) $(LCFLAGS) -S $< -o $@ +## FIXME: LIBS should be specified, not hardcoded to -lm +%.native: %.c + $(NATGCC) $+ -lm -o $@ -%.bc: %.gll - $(LGCCAS) $< -o $@ +%.ll: %.c $(LCC) + $(LCC) $(LCFLAGS) -S $< -o $@ -%.bc: %.ll - $(LAS) -f $< +%.bc: %.ll $(LAS) + $(LAS) $< -o $@ %.linked.bc: %.bc $(CP) $< $@ -- cgit v1.2.3-18-g5258