OSDN Git Service

Convert makefile to use standard LLVM macros for tool names
authorReid Spencer <rspencer@reidspencer.com>
Sat, 4 Sep 2004 20:13:54 +0000 (20:13 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 4 Sep 2004 20:13:54 +0000 (20:13 +0000)
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

index 64f76cd..f93d211 100644 (file)
@@ -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)