summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-09-04 20:13:54 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-09-04 20:13:54 +0000
commit39dcf0e0168ed3c77ddc62c119814e3a2e4c9d74 (patch)
tree6904553e9d60967487d23704e5d3bc92c25337a2 /projects
parent820dab7a62f6a9c326e64bbe9725c5683fcdb367 (diff)
downloadllvm-39dcf0e0168ed3c77ddc62c119814e3a2e4c9d74.tar.gz
llvm-39dcf0e0168ed3c77ddc62c119814e3a2e4c9d74.tar.bz2
llvm-39dcf0e0168ed3c77ddc62c119814e3a2e4c9d74.tar.xz
Convert makefile to use standard LLVM macros for tool names
Utilize new stkrc -O4 option for optimization during translation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'projects')
-rw-r--r--projects/Stacker/test/Makefile35
1 files changed, 13 insertions, 22 deletions
diff --git a/projects/Stacker/test/Makefile b/projects/Stacker/test/Makefile
index 64f76cd611..f93d211f89 100644
--- a/projects/Stacker/test/Makefile
+++ b/projects/Stacker/test/Makefile
@@ -1,16 +1,16 @@
-##===- projects/sample/Makefile ----------------------------*- Makefile -*-===##
+##===- projects/Stacker/test/Makefile ----------------------*- Makefile -*-===##
#
-# This is a sample Makefile for a project that uses LLVM.
+# This is the makefile that tests the various facilities of the Stacker language
#
##===----------------------------------------------------------------------===##
#
# Indicates our relative path to the top of the project's root directory.
#
-LEVEL = ../../..
+LEVEL = ../
#
-# Directories that needs to be built.
+# Directories that need to be built.
#
DIRS =
@@ -31,10 +31,7 @@ IO_TESTS = space tab out_chr out_num out_str
TESTS = $(LOGIC_TESTS) $(ARITHMETIC_TESTS) $(BITWISE_TESTS) $(STACK_TESTS) \
$(MEMORY_TESTS) $(CONTROL_TESTS) $(IO_TESTS)
-LLC_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/llc
-OPT_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/opt
STKRC_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/stkrc
-LLVMDIS_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/llvm-dis
all :: test_each
@@ -42,27 +39,21 @@ test_each: $(TESTS)
@$(ECHO) "Running Tests..."
$(VERB) LD_LIBRARY_PATH=$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) $(BUILD_SRC_DIR)/runtests $(BUILD_OBJ_DIR) $(TESTS)
-% : %.s testing.s
- @$(ECHO) "Compiling and Linking $< to $*"
- $(VERB)$(CC) -ggdb -L$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) testing.s -lstkr_runtime -o $* $*.s
+%.bc : %.st Makefile
+ @$(ECHO) "Compiling And Optimizing $< to $*.bc"
+ $(VERB)$(STKRC_EXEC) -f -O4 -s 2048 -o $*.bc $(BUILD_SRC_DIR)/$*.st
%.s : %.bc
- @$(ECHO) "Compiling $< to $*.s"
- $(VERB)$(LLC_EXEC) -f -o $*.s $<
+ @$(ECHO) "Assembling $< to $*.s"
+ $(VERB)$(LLC) -f -o $*.s $*.bc
-ifdef OPTIMIZE
-%.bc : %.st $(STKRC_EXEC)
- @$(ECHO) "Compiling and Optimizing $< to $*.bc"
- $(VERB)$(STKRC_EXEC) -e -o - $< | opt -stats -q -f -o $*.bc -adce -branch-combine -cee -constmerge -constprop -dce -die -gcse -globaldce -instcombine -pre
-else
-%.bc : %.st $(STKRC_EXEC)
- @$(ECHO) "Compiling $< to $*.bc"
- $(VERB)$(STKRC_EXEC) -e -f -o $*.bc $<
-endif
+% : %.s testing.s
+ @$(ECHO) "Linking $*"
+ $(VERB)$(CC) -ggdb -L$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) testing.s -lstkr_runtime -o $* $*.s
%.ll : %.bc
@$(ECHO) "Disassembling $< to $*.ll"
- $(VERB)$(LLVMDIS_EXEC) -dis -o $*.ll $<
+ $(VERB)$(LDIS) -dis -o $*.ll $<
TESTS_LL = $(TESTS:%=%.ll)
TESTS_BC = $(TESTS:%=%.bc)