aboutsummaryrefslogtreecommitdiff
path: root/builder
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-11-05 11:22:55 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-11-05 11:31:28 +0000
commit2fbdf974338bde8576efdae40a819a76b2391033 (patch)
tree64d41a37470143f142344f9a439d96de3e7918c2 /builder
downloadkitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.tar.gz
kitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.zip
Initial import of the open source release
Diffstat (limited to 'builder')
-rwxr-xr-xbuilder27
1 files changed, 27 insertions, 0 deletions
diff --git a/builder b/builder
new file mode 100755
index 0000000..7e3db11
--- /dev/null
+++ b/builder
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+PARALLEL=8
+
+set -e
+
+export PATH=`readlink -f ./tools`:$PATH
+
+# required when starting from scratch
+mkdir -p generated build
+
+echo "BUILDING (parallel=$PARALLEL)..."
+
+# requirements
+make -C tools -j $PARALLEL
+make -C lib -j $PARALLEL
+
+# data first so we build the dependencies
+make -C data -j $PARALLEL
+cd src
+rm -f Makefile.deps && touch Makefile.deps
+find . -name "*.c" | xargs -n1 sdcc -I../generated -I../lib -MM | sed -r 's/([^:]+):/..\/build\/\1:/' >> Makefile.deps
+cd -
+
+# the actual build
+make -C src -j $PARALLEL $@
+