From 7c1ba3af4d55bd8004d3cfab3276bd60e455cab3 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 10 Jan 2021 20:58:15 +0100 Subject: Many improvements for A-stack implementation --- Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 27a0c15..6dd3894 100644 --- a/Makefile +++ b/Makefile @@ -5,26 +5,31 @@ ASM:=$(addsuffix .s,$(BIN)) BC:=$(addsuffix .bc,$(BIN)) DEPS:=rts.ll +OPT:=opt-11 +AS:=llvm-as-11 +LLC:=~/projects/llvm-project/build/bin/llc +CLANG:=clang-11 + all: $(BIN) $(BIN): %: %.o - clang-11 $^ -o $@ + $(CLANG) $^ -o $@ $(OBJ): %.o: %.bc - llc-11 -filetype=obj $^ -o $@ + $(LLC) -relocation-model=static -filetype=obj $^ -o $@ $(ASM): %.s: %.bc - llc-11 $^ -o $@ + $(LLC) -relocation-model=static $^ -o $@ $(BC): %.bc: %.opt.ll - llvm-as-11 $^ -o $@ + $(AS) $^ -o $@ $(OPTLL): %.opt.ll: $(DEPS) %.ll cat $^ \ - | opt-11 -S -always-inline \ - | opt-11 -S -O3 \ + | $(OPT) -S -always-inline \ + | $(OPT) -S -O3 \ | sed 's/noinline nounwind optnone/nounwind/' \ - | opt-11 -S -O3 \ + | $(OPT) -S -O3 \ -o $@ clean: -- cgit v1.2.3