BIN:=fib_eqI_b fib_ltI nfib nfib_nsa OPTLL:=$(addsuffix .opt.ll,$(BIN)) OBJ:=$(addsuffix .o,$(BIN)) ASM:=$(addsuffix .s,$(BIN)) BC:=$(addsuffix .bc,$(BIN)) DEPS:=rts.ll 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: $(DEPS) %.ll cat $^ \ | opt-11 -S -always-inline \ | opt-11 -S -O3 \ | sed 's/noinline nounwind optnone/nounwind/' \ | opt-11 -S -O3 \ -o $@ clean: $(RM) $(BIN) $(OBJ) $(ASM) $(BC) .PHONY: all clean