2021-04-13 14:38:22 -04:00
|
|
|
</$objtype/mkfile
|
|
|
|
|
2021-06-23 13:45:13 -04:00
|
|
|
TARG=bin/uxncli bin/uxnasm bin/uxnemu
|
2021-05-31 17:50:36 -04:00
|
|
|
USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal}
|
|
|
|
ROM=${USM:%.tal=%.rom}
|
2021-06-26 04:22:10 -04:00
|
|
|
CFLAGS=$CFLAGS -D__plan9__ -DNO_PORTMIDI -I/sys/include/npe -I/sys/include/npe/SDL2
|
2021-04-13 14:38:22 -04:00
|
|
|
HFILES=\
|
|
|
|
/sys/include/npe/stdio.h\
|
2021-05-17 17:55:13 -04:00
|
|
|
src/devices/apu.h\
|
|
|
|
src/devices/mpu.h\
|
|
|
|
src/devices/ppu.h\
|
2021-04-13 14:38:22 -04:00
|
|
|
src/uxn.h\
|
|
|
|
|
2021-05-18 08:40:12 -04:00
|
|
|
CLEANFILES=$TARG $ROM
|
2021-04-13 14:38:22 -04:00
|
|
|
|
|
|
|
default:V: all
|
|
|
|
|
2021-05-18 08:40:12 -04:00
|
|
|
all:V: bin $TARG $ROM
|
2021-04-13 14:38:22 -04:00
|
|
|
|
2021-05-18 08:40:12 -04:00
|
|
|
bin:
|
|
|
|
mkdir -p bin
|
2021-04-13 14:38:22 -04:00
|
|
|
|
|
|
|
/sys/include/npe/stdio.h:
|
|
|
|
hget https://git.sr.ht/~ft/npe/archive/master.tar.gz | tar xz &&
|
|
|
|
cd npe-master &&
|
|
|
|
mk install &&
|
|
|
|
rm -r npe-master
|
|
|
|
|
2021-05-31 17:50:36 -04:00
|
|
|
%.rom:Q: %.tal bin/uxnasm
|
|
|
|
bin/uxnasm $stem.tal $target >/dev/null
|
2021-04-13 14:38:22 -04:00
|
|
|
|
2021-05-26 13:02:13 -04:00
|
|
|
bin/uxncli: uxncli.$O uxn.$O
|
2021-05-19 03:29:23 -04:00
|
|
|
$LD $LDFLAGS -o $target $prereq
|
2021-04-13 14:38:22 -04:00
|
|
|
|
2021-05-26 13:02:13 -04:00
|
|
|
bin/uxnasm: uxnasm.$O
|
2021-05-19 03:29:23 -04:00
|
|
|
$LD $LDFLAGS -o $target $prereq
|
2021-04-13 14:38:22 -04:00
|
|
|
|
2021-05-26 13:02:13 -04:00
|
|
|
bin/uxnemu: uxnemu.$O apu.$O mpu.$O ppu.$O uxn.$O
|
2021-05-19 03:29:23 -04:00
|
|
|
$LD $LDFLAGS -o $target $prereq
|
2021-04-13 14:38:22 -04:00
|
|
|
|
2021-06-23 13:45:13 -04:00
|
|
|
(uxnasm|uxncli|uxnemu|uxn)\.$O:R: src/\1.c
|
2021-05-17 17:55:13 -04:00
|
|
|
$CC $CFLAGS -Isrc -o $target src/$stem1.c
|
|
|
|
|
|
|
|
(apu|mpu|ppu)\.$O:R: src/devices/\1.c
|
|
|
|
$CC $CFLAGS -Isrc -o $target src/devices/$stem1.c
|
2021-05-18 08:40:12 -04:00
|
|
|
|
|
|
|
nuke:V: clean
|
|
|
|
|
|
|
|
clean:V:
|
|
|
|
rm -f *.[$OS] [$OS].??* $TARG $CLEANFILES
|
|
|
|
|
|
|
|
%.clean:V:
|
|
|
|
rm -f $stem.[$OS] [$OS].$stem $stem
|
|
|
|
|
|
|
|
install:QV: all
|
|
|
|
exit 'Sorry, there is no install rule yet'
|
2021-05-19 03:29:23 -04:00
|
|
|
|
|
|
|
#LDFLAGS=-p
|