From fe3d9c7dfbe4190ecf0919abe474e4da4c019566 Mon Sep 17 00:00:00 2001
From: Kimplul <kimi.h.kuparinen@gmail.com>
Date: Mon, 24 Jun 2024 20:33:56 +0300
Subject: add initial compiler framework

---
 scripts/makefile       |  5 -----
 scripts/select-compile | 16 ++++++++++++++++
 2 files changed, 16 insertions(+), 5 deletions(-)
 create mode 100755 scripts/select-compile

(limited to 'scripts')

diff --git a/scripts/makefile b/scripts/makefile
index 484d04f..b8978f6 100644
--- a/scripts/makefile
+++ b/scripts/makefile
@@ -9,11 +9,6 @@ DEBUGFLAGS	!= [ "$(DEBUG)" != "0" ] \
 			&& echo "-DDEBUG=1" \
 			|| echo "-DNDEBUG=1"
 
-ASSERT		?= 1
-ASSERTFLAGS	!= [ "$(ASSERT)" != "0" ] \
-			&& echo "-DASSERT=1" \
-			|| echo
-
 DEPFLAGS	= -MT $@ -MMD -MP -MF $@.d
 LINTFLAGS	:= -fsyntax-only
 PREPROCESS	:= -E
diff --git a/scripts/select-compile b/scripts/select-compile
new file mode 100755
index 0000000..be8b40d
--- /dev/null
+++ b/scripts/select-compile
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+ARCH="$1"
+if [ -z "$ARCH" ]; then
+	ARCH=$(uname -m)
+fi
+
+>&2 echo $ARCH
+
+JIT="src/compile/compile.c"
+NOJIT="src/compile/nocompile.c"
+
+case "$ARCH" in
+	x86_64) echo "$JIT" ;;
+	*) echo "$NOJIT" ;;
+esac
-- 
cgit v1.2.3