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
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
# 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) $@ )