aboutsummaryrefslogtreecommitdiff
path: root/scripts/makefile
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-03-14 21:08:01 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-03-14 21:08:01 +0200
commitf5c729ea59d227a507f83bd94d07f4366b46d72b (patch)
tree70d1f242100cea09acd38a71ff8c821836117cfd /scripts/makefile
parent57f6b41047e95374701ee276248f0f8615168450 (diff)
downloadejit-f5c729ea59d227a507f83bd94d07f4366b46d72b.tar.gz
ejit-f5c729ea59d227a507f83bd94d07f4366b46d72b.zip
start supporting 32bit arches
Diffstat (limited to 'scripts/makefile')
-rw-r--r--scripts/makefile21
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: