Renamed Makefile.target to Makefile.tests and folded in
authorVikram S. Adve <vadve@cs.uiuc.edu>
Sat, 15 Dec 2001 01:13:42 +0000 (01:13 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Sat, 15 Dec 2001 01:13:42 +0000 (01:13 +0000)
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

index 849803d26086e0f46307c0ec822bacf4b981aa67..fe3cc4b807f53cf343251146a2ab19870ec1babc 100644 (file)
@@ -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) $< $@