shithub: pt2-clone

Download patch

ref: 2fd0e3c541c991a83f21380c9c2a0e969d50fe69
parent: abd9a5425c804261dead29a365ca2e2916ed8c47
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Aug 17 10:08:40 EDT 2023

a better mkfile (thanks qwx)

--- a/mkfile
+++ b/mkfile
@@ -2,7 +2,6 @@
 
 BIN=/$objtype/bin/audio
 TARG=pt2
-CFLAGS=$CFLAGS -p -D__plan9__ -I/sys/include/npe
 
 OFILES=\
 	src/pt2_askbox.$O\
@@ -109,8 +108,13 @@
 	src/modloaders/pt2_pp_unpack.h\
 	src/modloaders/pt2_xpk_unpack.h\
 
-default:V: all
+</sys/src/cmd/mkone
 
+CFLAGS=$CFLAGS -p -D__plan9__ -Isrc -I/sys/include/npe
+
+%.$O: %.c
+	$CC $CFLAGS -o $target $stem.c
+
 /sys/include/npe/stdio.h:
 	hget https://git.sr.ht/~ft/npe/archive/master.tar.gz | tar xz &&
 	cd npe-master &&
@@ -117,23 +121,4 @@
 	mk install &&
 	rm -r npe-master
 
-(.*)\.$O:R: \1.c
-	$CC $CFLAGS -Isrc -o $target $stem1.c
-
-$TARG: $OFILES
-	$LD $LDFLAGS -o $target $prereq
-
-all:V: $TARG
-
-nuke:V: clean
-
-clean:V:
-	rm -f $TARG $OFILES
-
-%.clean:V:
-	rm -f $stem.[$OS] [$OS].$stem $stem
-
-install:V: all
-	cp $TARG $BIN/
-
-#LDFLAGS=-p
+CLEANFILES=$OFILES