aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-06-15 09:26:51 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2026-06-15 09:26:51 +0300
commit8ed31461b4b1f357a0d8cefda0b3bcceffb7c93d (patch)
treec81326d068d425e113a0974ba4e094a746ef1e8b
parentdb3809488805fbdcd9d726d9ed45ad7335812bd1 (diff)
downloadfwd-8ed31461b4b1f357a0d8cefda0b3bcceffb7c93d.tar.gz
fwd-8ed31461b4b1f357a0d8cefda0b3bcceffb7c93d.zip
add simple compiler wrapperHEADmaster
-rwxr-xr-xfwdc20
1 files changed, 20 insertions, 0 deletions
diff --git a/fwdc b/fwdc
new file mode 100755
index 0000000..96cfe04
--- /dev/null
+++ b/fwdc
@@ -0,0 +1,20 @@
+#!/bin/sh
+# helper script for compiling a fwd program.
+# assumes it is being run from the root dir of the fwd sources.
+
+if [ "$#" -ne 2 ]; then
+ echo "usage: fwdc <input file> <output binary>"
+ echo "currently also produces <output binary>.c for inspection"
+ exit 1
+fi
+
+SRC="$1"
+DST="$2"
+
+./fwd "$SRC" > "$DST".c
+
+cc -O3 -mno-sse \
+ -L mod -I include -I lib \
+ -Wl,-rpath=$PWD/mod \
+ "$DST".c -o "$DST" \
+ -lfwdio -lfwdmem -lfwdutil