diff options
author | Camil Staps | 2021-01-07 13:49:59 +0100 |
---|---|---|
committer | Camil Staps | 2021-01-07 13:49:59 +0100 |
commit | 5e0696355c0022693e09e4e329f60cca6eba82a9 (patch) | |
tree | b7a85aa6826e0049dc34bbc8c465ca5d997124da /Makefile |
Initial commit: fib (eqI_b and ltI version); nfib
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fee742d --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +BIN:=fib_eqI_b fib_ltI nfib +OPTLL:=$(addsuffix .opt.ll,$(BIN)) +OBJ:=$(addsuffix .o,$(BIN)) +ASM:=$(addsuffix .s,$(BIN)) +BC:=$(addsuffix .bc,$(BIN)) + +all: $(BIN) + +$(BIN): %: %.o + clang-11 $^ -o $@ + +$(OBJ): %.o: %.bc + llc-11 -filetype=obj $^ -o $@ + +$(ASM): %.s: %.bc + llc-11 $^ -o $@ + +$(BC): %.bc: %.opt.ll + llvm-as-11 $^ -o $@ + +$(OPTLL): %.opt.ll: %.ll + opt-11 -S -always-inline $^ -o $@ + opt-11 -S -instcombine $@ -o $@ + opt-11 -S -O3 $@ -o $@ + opt-11 -S -O3 $@ -o $@ + +clean: + $(RM) $(BIN) $(OBJ) $(ASM) $(BC) + +.PHONY: all clean |