##----------------------------------------------------------*- Makefile -*-===##
+##
## Common rules for generating, linking, and compiling via LLVM. This is
## used to implement a robust testing framework for LLVM
+##
##-------------------------------------------------------------------------===##
# If the user specified a TEST= option on the command line, we do not want to do
.PRECIOUS: Output/%.llvm.bc
.PRECIOUS: Output/%.llvm
-ifdef ENABLE_OPTIMIZED
-TOOLS = $(BUILD_OBJ_ROOT)/tools/Release
-else
-TOOLS = $(BUILD_OBJ_ROOT)/tools/Debug
-endif
+TOOLS = $(LLVMTOOLCURRENT)
# LLVM Tool Definitions...
#
LAS = $(TOOLS)/as
LGCCAS = $(TOOLS)/gccas
LGCCLD = $(TOOLS)/gccld -L$(LLVMGCCDIR)/lib/gcc-lib/$(LLVMGCCARCH) -L$(LLVMGCCDIR)/lib
+LGCCLDPROG = $(TOOLS)/gccld
LDIS = $(TOOLS)/dis
LOPT = $(TOOLS)/opt
LLINK = $(TOOLS)/link
LCXXFLAGS += -O2 -Wall
LLCFLAGS =
FAILURE = $(LEVEL)/test/Failure.sh
-TESTRUNR = $(LEVEL)/test/TestRunner.sh
+TESTRUNR = @echo Running test: $<; \
+ PATH=$(LLVMTOOLCURRENT):$(LEVEL)/test/Scripts:$(PATH) \
+ $(LEVEL)/test/TestRunner.sh
# Native Tool Definitions
NATGCC = $(CC)
## mark that tracing on, and set the TRACELIBS variable.
TRACEFLAGS =
ifeq ($(TRACE), yes)
- TRACEFLAGS += -trace
- DOTRACING = yes
-else
- ifeq ($(TRACEM), yes)
- TRACEFLAGS += -tracem
- DOTRACING = yes
- endif
-endif
-ifeq ($(DOTRACING), yes)
- TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr64
+ TRACEFLAGS = -trace
+ TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr.$(ARCH)
endif
+ifeq ($(TRACEM), yes)
+ TRACEFLAGS = -tracem
+ TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr.$(ARCH)
+endif
LLCLIBS := $(LLCLIBS) -lm
clean::
- $(RM) a.out core
+ $(RM) -f a.out core
$(RM) -rf Output/
# Compile from X.c to Output/X.ll