2021-04-13 18:38:22 +00:00
|
|
|
</$objtype/mkfile
|
|
|
|
|
2021-06-23 17:45:13 +00:00
|
|
|
TARG=bin/uxncli bin/uxnasm bin/uxnemu
|
2021-12-09 21:52:34 +00:00
|
|
|
USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal | grep -v /assets/ | grep -v /library/}
|
2021-05-31 21:50:36 +00:00
|
|
|
ROM=${USM:%.tal=%.rom}
|
2021-09-17 18:20:37 +00:00
|
|
|
CFLAGS=$CFLAGS -D__plan9__ -I/sys/include/npe -I/sys/include/npe/SDL2
|
2021-04-13 18:38:22 +00:00
|
|
|
HFILES=\
|
|
|
|
/sys/include/npe/stdio.h\
|
2021-12-28 21:47:35 +00:00
|
|
|
src/devices/audio.h\
|
2021-12-29 17:07:28 +00:00
|
|
|
src/devices/controller.h\
|
2021-11-06 23:12:11 +00:00
|
|
|
src/devices/file.h\
|
2021-12-29 17:07:28 +00:00
|
|
|
src/devices/mouse.h\
|
2021-12-28 21:37:26 +00:00
|
|
|
src/devices/screen.h\
|
2022-01-07 16:19:01 +00:00
|
|
|
src/devices/system.h\
|
2021-04-13 18:38:22 +00:00
|
|
|
src/uxn.h\
|
|
|
|
|
2021-05-18 12:40:12 +00:00
|
|
|
CLEANFILES=$TARG $ROM
|
2021-04-13 18:38:22 +00:00
|
|
|
|
|
|
|
default:V: all
|
|
|
|
|
2021-05-18 12:40:12 +00:00
|
|
|
all:V: bin $TARG $ROM
|
2021-04-13 18:38:22 +00:00
|
|
|
|
2021-05-18 12:40:12 +00:00
|
|
|
bin:
|
|
|
|
mkdir -p bin
|
2021-04-13 18:38:22 +00: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 21:50:36 +00:00
|
|
|
%.rom:Q: %.tal bin/uxnasm
|
|
|
|
bin/uxnasm $stem.tal $target >/dev/null
|
2021-04-13 18:38:22 +00:00
|
|
|
|
2022-01-07 16:19:01 +00:00
|
|
|
bin/uxncli: file.$O system.$O uxncli.$O uxn.$O
|
2021-05-19 07:29:23 +00:00
|
|
|
$LD $LDFLAGS -o $target $prereq
|
2021-04-13 18:38:22 +00:00
|
|
|
|
2021-05-26 17:02:13 +00:00
|
|
|
bin/uxnasm: uxnasm.$O
|
2021-05-19 07:29:23 +00:00
|
|
|
$LD $LDFLAGS -o $target $prereq
|
2021-04-13 18:38:22 +00:00
|
|
|
|
2022-01-07 16:19:50 +00:00
|
|
|
bin/uxnemu: audio.$O controller.$O file.$O mouse.$O screen.$O system.$O uxn.$O uxnemu.$O
|
2021-05-19 07:29:23 +00:00
|
|
|
$LD $LDFLAGS -o $target $prereq
|
2021-04-13 18:38:22 +00:00
|
|
|
|
2021-06-23 17:45:13 +00:00
|
|
|
(uxnasm|uxncli|uxnemu|uxn)\.$O:R: src/\1.c
|
2021-05-17 21:55:13 +00:00
|
|
|
$CC $CFLAGS -Isrc -o $target src/$stem1.c
|
|
|
|
|
2022-01-07 16:19:01 +00:00
|
|
|
(audio|controller|file|mouse|screen|system)\.$O:R: src/devices/\1.c
|
2021-05-17 21:55:13 +00:00
|
|
|
$CC $CFLAGS -Isrc -o $target src/devices/$stem1.c
|
2021-05-18 12:40:12 +00: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 07:29:23 +00:00
|
|
|
|
|
|
|
#LDFLAGS=-p
|