summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-23 08:51:45 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-23 08:51:45 +0000
commita35b49e654f2ad82c14855b3c36195c2c2e26d10 (patch)
tree0f56a45c62741907a2ac9dbbe315e025af2dcd7c /Makefile
parentdd4ef001caac00050d00f8ae1dfa87da9e95eb7c (diff)
parentdb464d9b4adb87cd4316f59058b6b70f61fbeaa3 (diff)
download1989-dawn-of-freedom-a35b49e654f2ad82c14855b3c36195c2c2e26d10.tar.gz
Merge branch 'work-in-progress'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fc78fed
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+default: rules.js play.js
+
+rules.js: events.txt data.js
+ node tools/gencode.js > /tmp/events.inc
+ node tools/genconst.js > /tmp/const.inc
+ sed -i \
+ -e '/BEGIN CONST/,/END CONST/{//!d}' \
+ -e '/BEGIN CONST/r /tmp/const.inc' \
+ -e '/BEGIN EVENTS/,/END EVENTS/{//!d}' \
+ -e '/BEGIN EVENTS/r /tmp/events.inc' \
+ rules.js
+
+play.js: tools/layout.svg data.js
+ node tools/genlayout.js > /tmp/layout.inc
+ node tools/genconst.js > /tmp/const.inc
+ sed -i \
+ -e '/BEGIN CONST/,/END CONST/{//!d}' \
+ -e '/BEGIN CONST/r /tmp/const.inc' \
+ -e '/BEGIN LAYOUT/,/END LAYOUT/{//!d}' \
+ -e '/BEGIN LAYOUT/r /tmp/layout.inc' \
+ play.js