From 52a4e85a98fdb7e03f13cfc1eb9f2ef4326ec62a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 23 Jan 2002 21:36:59 +0000 Subject: [PATCH] More rules checked in git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1571 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Makefile | 5 +-- test/Makefile.tests | 82 +++++++++++++++++++++++++-------------------- 2 files changed, 48 insertions(+), 39 deletions(-) diff --git a/test/Makefile b/test/Makefile index 2b7bf2c647d..9166324359a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,3 +1,4 @@ LEVEL = .. -DIRS = Feature Regression Programs -include ../Makefile.common \ No newline at end of file +DIRS = Feature Libraries Regression Programs +include ../Makefile.common + diff --git a/test/Makefile.tests b/test/Makefile.tests index 3390d01b118..21c4b7cb433 100644 --- a/test/Makefile.tests +++ b/test/Makefile.tests @@ -10,26 +10,41 @@ include ${LEVEL}/Makefile.common .PHONY: clean default -## keep %.bc and %.s from being deleted while we're debugging -.PRECIOUS: Output/%.bc Output/%.ll %.s Output/.dir - +# These files, which might be intermediate results, should not be deleted by +# make +.PRECIOUS: Output/%.bc Output/%.ll +.PRECIOUS: Output/%.tbc Output/%.tll +.PRECIOUS: Output/.dir +# LLVM Tool Definitions... +# +LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc TOOLS = $(LEVEL)/tools/Debug - LLI = $(TOOLS)/lli LLC = $(TOOLS)/llc -LAS = $(TOOLS)/gccas +LAS = $(TOOLS)/as +LGCCAS = $(TOOLS)/gccas LDIS = $(TOOLS)/dis LOPT = $(TOOLS)/opt LLINK = $(TOOLS)/link -LLCFLAGS = -LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc -LCFLAGS += -O2 -Wall +LCCFLAGS += -O2 -Wall +LLCFLAGS = +FAILURE = $(LEVEL)/test/Failure.sh + +# Native Tool Definitions +NATGCC = /usr/dcs/software/supported/bin/gcc +CC = /opt/SUNWspro/bin/cc +AS = /opt/SUNWspro/bin/cc +DIS = /usr/ccs/bin/dis +CP = /bin/cp -f +CFLAGS += -g -xarch=v9 LLCLIB = $(LEVEL)/test/runtime.o LIBS += $(LLCLIB) + + ifeq ($(TRACE), yes) LLCFLAGS += -trace endif @@ -37,43 +52,36 @@ ifeq ($(TRACEM), yes) 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 -CP = /bin/cp -f -CFLAGS += -g -xarch=v9 - -## Special target to force target-dependent library to be compiled -## directly to native code. -## -$(LLCLIB): $(LLCLIB:.o=.c) - cd $(LEVEL)/test; $(MAKE) $(@F) - -#runtime.o: runtime.c -# $(CC) -c $(CCFLAGS) $< - clean :: - $(RM) *.bc *.mc *.s *.o a.out core + $(RM) a.out core $(RM) -rf Output/ -%.mc: %.bc $(LLC) $(AS) - @echo "Generating machine instructions for $<" - $(LLC) -f -dsched y $(LLCFLAGS) $< > $@ - -%.trace.bc: %.bc $(LLC) - $(LLC) -f -trace $(LLCFLAGS) $< - - Output/%.ll: %.c $(LCC) Output/.dir - $(LCC) $(LCFLAGS) -S $< -o $@ + $(LCC) $(LCCFLAGS) -S $< -o $@ -Output/%.bc: Output/%.ll $(LAS) +Output/%.bc: Output/%.ll $(LGCCAS) + $(LGCCAS) $< -o $@ + +Output/%.bc: %.ll $(LAS) $(LAS) $< -o $@ +# +# Testing versions of provided utilities... +# +Output/%.tll: %.c $(LCC) Output/.dir + @echo "======== Compiling $<" + $(LCC) $(LCCFLAGS) -S $< -o $@ || \ + ( rm -f $@; $(FAILURE) $@ ) + +Output/%.tbc: Output/%.tll $(LAS) + @echo "======== Assembling $<" + $(LAS) -f $< -o $@ || \ + ( rm -f $@; $(FAILURE) $@ ) + + + #%.s: %.linked.bc -# $(LLC) -f $(LCFLAGS) $< -o $@ +# $(LLC) -f $(LLCFLAGS) $< -o $@ #%: %.o $(LIBS) # $(CC) $(LDFLAGS) $< $(LIBS) -o $@