summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorgonzo <gonzo@toniatuh.com>2024-11-03 21:43:37 +0100
committergonzo <gonzo@toniatuh.com>2024-11-03 21:48:36 +0100
commit42d46d324715a27b763d39cc6bf34bb40a594f22 (patch)
tree04b9286c56e13998c2fa3fbb46aad7536436879d /makefile
parent9bb2bf304e47fe74952f88ffcacabb25ae4b5014 (diff)
downloadgambit-snek-42d46d324715a27b763d39cc6bf34bb40a594f22.tar.gz
now has separation between compiled and interpreted contexts
- use cond-expand to load raylib if the snek.scm is interpreted - .gambini added to automatically add gambit-raylib to search order - game now starts in background when interpreted - this makes it easier to incrementally develop in emacs - game starts in foreground when compiled
Diffstat (limited to 'makefile')
-rw-r--r--makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/makefile b/makefile
index 57f22e8..8ce15c8 100644
--- a/makefile
+++ b/makefile
@@ -1,10 +1,19 @@
-all: snek
+all: snek loadable
.PHONY: all
+# dynamic library
+loadable: ./gambit-raylib/raylib.sld ./gambit-raylib/*.scm
+ make -C gambit-raylib
+
+# static library
lib: ./gambit-raylib/raylib.sld
gsc -:s -c -module-ref raylib -o gambit-raylib.c ./gambit-raylib/raylib.sld
+# executable
snek: lib snek.scm
gsc -:s -exe -ld-options "-lm -lraylib" -o snek gambit-raylib.c snek.scm
+clean:
+ make -C gambit-raylib clean
+ rm snek gambit-raylib.c