Fix libs and includes for compiling with llc.
authorVikram S. Adve <vadve@cs.uiuc.edu>
Sun, 19 May 2002 15:47:52 +0000 (15:47 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Sun, 19 May 2002 15:47:52 +0000 (15:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2654 91177308-0d34-0410-b5e6-96231b3b80d8

test/Makefile.tests

index a370765e8c7894a3c9eacc2a061c80b9a638c567..bf2b85a600bf6dad22828cd9dc1de50d424c32f0 100644 (file)
@@ -27,7 +27,7 @@ LLI      = $(TOOLS)/lli
 LLC      = $(TOOLS)/llc
 LAS      = $(TOOLS)/as
 LGCCAS   = $(TOOLS)/gccas
-LGCCLD   = $(TOOLS)/gccld -L/home/vadve/lattner/cvs/gcc_install/lib/gcc-lib/llvm/3.1/
+LGCCLD   = $(TOOLS)/gccld -L/home/vadve/lattner/cvs/gcc_install/lib/gcc-lib/llvm/3.1/ -L/home/vadve/vadve/Research/DynOpt/LLVM/llvm/test/Libraries/Output
 LDIS     = $(TOOLS)/dis 
 LOPT     = $(TOOLS)/opt
 LLINK    = $(TOOLS)/link
@@ -45,24 +45,25 @@ DIS     = /usr/ccs/bin/dis
 CP     = /bin/cp -f
 CFLAGS  += -g -xarch=v9
 
-#LLCLIB   = $(LEVEL)/test/Libraries/runtime.o
-#LIBS    += $(LLCLIB)
-
-
 
 ifeq ($(TRACE), yes)
-    LLCFLAGS += -trace
-endif
-ifeq ($(TRACEM), yes)
-    LLCFLAGS += -tracem
+    LLCFLAGS += -trace basicblock
+    LLCLIBS := -L$(LEVEL)/test/Libraries/Output -linstr64
+else
+    ifeq ($(TRACEM), yes)
+        LLCFLAGS += -trace function
+       LLCLIBS := -L$(LEVEL)/test/Libraries/Output -linstr64
+    endif
 endif
 
+LLCLIBS := $(LLCLIBS) -lm
+
 clean ::
        $(RM) a.out core
        $(RM) -rf Output/
 
 # Compile from X.c to Output/X.ll
-Output/%.ll: %.c $(LCC1) Output/.dir
+Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES)
        $(LCC) $(LCCFLAGS) -S $< -o $@
 
 # LLVM Assemble from Output/X.ll to Output/X.bc.  Output/X.ll must have come
@@ -85,12 +86,12 @@ Output/%.llc.s: Output/%.llvm.bc
 # Assemble (and link) an LLVM-linked program using the system assembler...
 #
 Output/%.llc: Output/%.llc.s
-       $(CC) $(CFLAGS) $< $(LIBS) -o $@
+       $(CC) $(CFLAGS) $< $(LLCLIBS) -o $@
 
 #
 # Testing versions of provided utilities...
 #
-Output/%.tll: %.c $(LCC1) Output/.dir
+Output/%.tll: %.c $(LCC1) Output/.dir $(INCLUDES)
        @echo "======== Compiling $<"
        $(LCC) $(LCCFLAGS) -S $< -o $@ || \
            ( rm -f $@; $(FAILURE) $@ )