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
This commit is contained in:
Vikram S. Adve 2001-12-15 01:13:42 +00:00
parent 1b654bd347
commit 977fa8df93

View File

@ -3,20 +3,25 @@
## Common rules for generating, linking, and compiling via LLVM. ## 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 .PHONY: clean default
## keep %.linked.bc and %.s from being deleted while we're debugging ## keep %.linked.bc and %.s from being deleted while we're debugging
.PRECIOUS: %.linked.bc %.s .PRECIOUS: %.bc %.s %.ll
TOOLS = $(LEVEL)/tools/Debug TOOLS = $(LEVEL)/tools/Debug
LLI = $(TOOLS)/lli
LLC = $(TOOLS)/llc LLC = $(TOOLS)/llc
LAS = $(TOOLS)/as LAS = $(TOOLS)/gccas
LDIS = $(TOOLS)/dis LDIS = $(TOOLS)/dis
LOPT = $(TOOLS)/opt LOPT = $(TOOLS)/opt
LLINK = $(TOOLS)/link LLINK = $(TOOLS)/link
LGCCAS = $(TOOLS)/gccas
LLCFLAGS = LLCFLAGS =
LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc
@ -32,6 +37,8 @@ ifeq ($(TRACEM), yes)
LLCFLAGS := $(LLCFLAGS) -tracem LLCFLAGS := $(LLCFLAGS) -tracem
endif endif
NATGCC = /usr/dcs/software/supported/bin/gcc
CC = /opt/SUNWspro/bin/cc CC = /opt/SUNWspro/bin/cc
AS = /opt/SUNWspro/bin/cc AS = /opt/SUNWspro/bin/cc
DIS = /usr/ccs/bin/dis DIS = /usr/ccs/bin/dis
@ -71,8 +78,8 @@ $(LLCLIB): $(LLCLIB:.o=.c)
runtime.o: runtime.c runtime.o: runtime.c
$(CC) -c $(CCFLAGS) $< $(CC) -c $(CCFLAGS) $<
clean : clean ::
$(RM) *.[123] *.bc *.mc *.s *.o a.out core $(PROG) $(PROG).native $(RM) *.bc *.mc *.s *.o a.out core $(PROG) $(PROG).native
%.mc: %.bc $(LLC) $(AS) %.mc: %.bc $(LLC) $(AS)
@echo "Generating machine instructions for $<" @echo "Generating machine instructions for $<"
@ -81,18 +88,16 @@ clean :
%.trace.bc: %.bc $(LLC) %.trace.bc: %.bc $(LLC)
$(LLC) -f -trace $(LLCFLAGS) $< $(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 ## FIXME: LIBS should be specified, not hardcoded to -lm
%.native: %.c
$(NATGCC) $+ -lm -o $@
%.ll: %.c $(LCC)
$(LCC) $(LCFLAGS) -S $< -o $@ $(LCC) $(LCFLAGS) -S $< -o $@
%.bc: %.gll %.bc: %.ll $(LAS)
$(LGCCAS) $< -o $@ $(LAS) $< -o $@
%.bc: %.ll
$(LAS) -f $<
%.linked.bc: %.bc %.linked.bc: %.bc
$(CP) $< $@ $(CP) $< $@