diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-08 07:08:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-08 07:08:00 +0000 |
commit | 0c82ee71dc9f99d20e51ae0012973619bcb80194 (patch) | |
tree | 0822d034cfab2caa14fb581a8b6cfe84d336a6fc /projects | |
parent | 296b2e6af23337b06cea4bd40f40c0eebac33c75 (diff) | |
download | external_llvm-0c82ee71dc9f99d20e51ae0012973619bcb80194.zip external_llvm-0c82ee71dc9f99d20e51ae0012973619bcb80194.tar.gz external_llvm-0c82ee71dc9f99d20e51ae0012973619bcb80194.tar.bz2 |
Makefile updates contributed by Reid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'projects')
-rw-r--r-- | projects/Stacker/samples/Makefile | 17 | ||||
-rw-r--r-- | projects/Stacker/test/Makefile | 21 |
2 files changed, 24 insertions, 14 deletions
diff --git a/projects/Stacker/samples/Makefile b/projects/Stacker/samples/Makefile index b6b03c4..d5b9b6e 100644 --- a/projects/Stacker/samples/Makefile +++ b/projects/Stacker/samples/Makefile @@ -16,12 +16,17 @@ DIRS = SAMPLES = fibonacci hello prime +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 :: $(SAMPLES) ifdef OPTIMIZE %.bc : %.st @$(ECHO) "Compiling and Optimizing $< to $*.bc" - $(VERB)stkrc -e -o - $< | opt -stats -q -f -o $*.bc \ + $(VERB)$(STKRC_EXEC) -e -o - $< | opt -stats -q -f -o $*.bc \ -aa-eval -adce -branch-combine -cee -constmerge -constprop -dce -die -ds-aa \ -ds-opt -gcse -globaldce -indvars -inline -instcombine \ -ipconstprop -licm -loopsimplify -mem2reg -pre -sccp -simplifycfg \ @@ -29,22 +34,22 @@ ifdef OPTIMIZE else %.bc : %.st @$(ECHO) "Compiling $< to $*.bc" - $(VERB)stkrc -e -f -o $*.bc $< + $(VERB)$(STKRC_EXEC) -e -f -o $*.bc $< endif %.s : %.bc @$(ECHO) "Compiling $< to $*.s" - $(VERB)llc -f -o $*.s $< + $(VERB)$(LLC_EXEC) -f -o $*.s $< % : %.s @$(ECHO) "Compiling and Linking $< to $*" - $(VERB)gcc -g -L$(BUILD_OBJ_ROOT)/lib/Debug -lstkr_runtime -o $* $*.s + $(VERB)gcc -g -L$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) -lstkr_runtime -o $* $*.s %.ll : %.bc @$(ECHO) "Disassembling $< to $*.ll" - $(VERB)llvm-dis -f -o $*.ll $< + $(VERB)$(LLVMDIS_EXEC) -f -o $*.ll $< -%.bc : $(BUILD_OBJ_ROOT)/tools/Debug/stkrc +%.bc : $(STKRC_EXEC) .PRECIOUS: %.bc %.s %.ll %.st diff --git a/projects/Stacker/test/Makefile b/projects/Stacker/test/Makefile index e4c7d9a..2f7ff8a 100644 --- a/projects/Stacker/test/Makefile +++ b/projects/Stacker/test/Makefile @@ -31,33 +31,38 @@ 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 test_each: $(TESTS) @$(ECHO) "Running Tests..." - $(VERB)$(BUILD_SRC_DIR)/runtests $(BUILD_OBJ_DIR) $(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)gcc -ggdb -L$(BUILD_OBJ_ROOT)/lib/Debug testing.s -lstkr_runtime -o $* $*.s + $(VERB)gcc -ggdb -L$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) testing.s -lstkr_runtime -o $* $*.s %.s : %.bc @$(ECHO) "Compiling $< to $*.s" - $(VERB)llc -f -o $*.s $< + $(VERB)$(LLC_EXEC) -f -o $*.s $< ifdef OPTIMIZE -%.bc : %.st $(BUILD_OBJ_ROOT)/tools/Debug/stkrc +%.bc : %.st $(STKRC_EXEC) @$(ECHO) "Compiling and Optimizing $< to $*.bc" - $(VERB)stkrc -e -o - $< | opt -stats -q -f -o $*.bc -adce -branch-combine -cee -constmerge -constprop -dce -die -gcse -globaldce -instcombine -pre + $(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 $(BUILD_OBJ_ROOT)/tools/Debug/stkrc +%.bc : %.st $(STKRC_EXEC) @$(ECHO) "Compiling $< to $*.bc" - $(VERB)stkrc -e -f -o $*.bc $< + $(VERB)$(STKRC_EXEC) -e -f -o $*.bc $< endif %.ll : %.bc @$(ECHO) "Disassembling $< to $*.ll" - $(VERB)llvm-dis -o $*.ll $< + $(VERB)$(LLVMDIS_EXEC) -dis -o $*.ll $< TESTS_LL = $(TESTS:%=%.ll) TESTS_BC = $(TESTS:%=%.bc) |