compiler

Unnamed Compiled Systems Language Project
git clone http://frotz.net/git/compiler.git
Log | Files | Refs

Makefile (464B)


      1 
      2 SRCS := hello.c ssa2.c fib.c gcd.c call.c bigfunc.c struct.c
      3 
      4 TARGETS := $(patsubst %.c,%.m2r.ll,$(SRCS)) $(patsubst %.c,%.ll,$(SRCS))
      5 
      6 all: all-targets
      7 
      8 # -O + disable passes avoids tagging with "optnone"
      9 # which interferes with further passes requested by the opt tool
     10 %.bc: %.c
     11 	clang -c -O -Xclang -disable-llvm-passes -emit-llvm $< -o $@
     12 
     13 %.ll: %.bc
     14 	llvm-dis-10 $<
     15 
     16 %.m2r.bc: %.bc
     17 	opt-10 -mem2reg $< -o $@
     18 
     19 all-targets: $(TARGETS)
     20 
     21 clean:
     22 	rm -f *.bc *.ll