From 39dcf0e0168ed3c77ddc62c119814e3a2e4c9d74 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sat, 4 Sep 2004 20:13:54 +0000 Subject: 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 --- projects/Stacker/test/Makefile | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) (limited to 'projects') 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) -- cgit v1.2.3