aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2024-01-20 19:26:03 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2024-01-20 19:26:03 +0200
commit857071dd1e7a813924e3e17b77dc2782834bd1a2 (patch)
tree9015370908947efdcaa0ed2377b3ca46f38ffe44 /build.sh
parent7f17974ba5ec82981b609c2b129d4459a42ba269 (diff)
Add build system
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..1f36c6f
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -euxo pipefail
+
+CSC_FLAGS=-O3
+BUILD_DIR=build
+
+mkdir -p ${BUILD_DIR}
+cd ${BUILD_DIR}
+
+modules=$(cat ../modules.list)
+
+for mod in $modules; do
+ csc ${CSC_FLAGS} -c -static -J ../${mod}.scm -unit ${mod} -o ${mod}.o
+done
+
+csc ${CSC_FLAGS} -o desmoctl -static -uses desmo-apply ../desmoctl.scm
+chmod +x desmoctl