diff options
Diffstat (limited to 'scripts/makefile')
-rw-r--r-- | scripts/makefile | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/scripts/makefile b/scripts/makefile index 3f1e119..3a4f200 100644 --- a/scripts/makefile +++ b/scripts/makefile @@ -20,7 +20,7 @@ PREPROCESS := -E LLVM ?= 0 BUILD := build -all: ejit.o +all: libejit.a # default values, overwrite if/when needed CROSS_COMPILE := @@ -35,8 +35,7 @@ COMPILER != [ "$(LLVM)" != "0" ] \ OBFLAGS := -g -# interpreter is allowed to have uninitialized values -WARNFLAGS := -Wall -Wextra -Wno-maybe-uninitialized +WARNFLAGS := -Wall -Wextra COMPILE_FLAGS := $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(LTOFLAGS) \ $(OBFLAGS) $(ASSERTFLAGS) $(DEBUGFLAGS) @@ -58,19 +57,19 @@ COMPILE_EJIT = $(COMPILE) $(EJIT_FLAGS) -include deps.mk -ejit.o: $(EJIT_OBJS) - ld -relocatable $(EJIT_OBJS) -o $@ +libejit.a: $(EJIT_OBJS) + $(CROSS_COMPILE)ar rcs libejit.a $(EJIT_OBJS) examples: examples/loop examples/fib examples/matrix_mult -examples/matrix_mult: examples/matrix_mult.c ejit.o - $(COMPILE_EJIT) examples/matrix_mult.c ejit.o -o $@ +examples/matrix_mult: examples/matrix_mult.c libejit.a + $(COMPILE_EJIT) examples/matrix_mult.c libejit.a -o $@ -examples/loop: examples/loop.c ejit.o - $(COMPILE_EJIT) examples/loop.c ejit.o -o $@ +examples/loop: examples/loop.c libejit.a + $(COMPILE_EJIT) examples/loop.c libejit.a -o $@ -examples/fib: examples/fib.c ejit.o - $(COMPILE_EJIT) examples/fib.c ejit.o -o $@ +examples/fib: examples/fib.c libejit.a + $(COMPILE_EJIT) examples/fib.c libejit.a -o $@ # might lint some common things twice .PHONY: |