shithub: cstory

Download patch

ref: e218b68df7d26a9394f27252ff34c1d96c38e35f
parent: b652bc842bf596d5f2d9ffa6bca911df8014c1b6
author: Jacob Moody <[email protected]>
date: Sun Jul 21 14:57:33 EDT 2024

make cross compilation work (thanks cinap)

--- a/mkfile
+++ b/mkfile
@@ -155,7 +155,8 @@
 
 CLEANFILES=\
 	$OFILES\
-	$O.bin2h\
+	$cputype.bin2h\
+	bin2h.$cputype\
 	bin2h/bin2h.$O\
 	$ASSETS\
 
@@ -167,12 +168,16 @@
 %.$O:	%.c
 	$CC $CFLAGS -o $stem.$O $stem.c
 
-$O.bin2h:	bin2h/bin2h.$O
+bin2h.$objtype:	bin2h/bin2h.$O
 	$LD $LDFLAGS -o $target $prereq
 	mkdir -p src/Resource/^(BITMAP CURSOR ICON ORG WAVE)
 
-src/Resource/%.h:	$O.bin2h assets/resources/$stem
-	$O.bin2h assets/resources/$stem $target
+$cputype.bin2h:
+	objtype=$cputype mk bin2h.$cputype
+	cp bin2h.$cputype $target
+
+src/Resource/%.h:	$cputype.bin2h assets/resources/$stem
+	$cputype.bin2h assets/resources/$stem $target
 
 src/Resource.$O:	$ASSETS