ref: 19498499a153f6b7508bad8b300aecf3021d2ee0
parent: e228e0f0dd56baa092726ec092e728e72727bbdd
author: zamfofex <zamfofex@twdb.moe>
date: Sun Mar 2 01:51:29 EST 2025
add mkfile for 9front
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
!/README.md
!/makefile
!/GNUmakefile
+!/mkfile
!/index.html
!/.build.yml
!/moonfish.vcxproj
--- a/README.md
+++ b/README.md
@@ -164,7 +164,7 @@
compiling on 9front
---
-After installing [NPE], each file may be compiled and linked as expected. (Note: A `mkfile` isn’t provided.)
+After installing [NPE], each file may be compiled and linked as expected. (Note: A `mkfile` is also provided for covenience.)
[NPE]: <https://git.sr.ht/~ft/npe>
--- /dev/null
+++ b/mkfile
@@ -1,0 +1,10 @@
+# moonfish is licensed under the AGPL (v3 or later)
+# copyright 2025 zamfofex
+
+</$objtype/mkfile
+
+moonfish: chess.$O search.$O main.$O
+ $LD $LDFLAGS -o $target $prereq
+
+%.$O: %.c moonfish.h
+ $CC $CFLAGS -I/sys/include/npe -Dmoonfish_plan9 $stem.c
--- a/moonfish.h
+++ b/moonfish.h
@@ -94,6 +94,9 @@
/* represents cross-search state */
struct moonfish_root;
+#ifdef moonfish_plan9
+#pragma incomplete struct moonfish_root
+#endif
/* represents options for the search */
struct moonfish_options {--
⑨