0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-27 08:13:01 +00:00
uxn/mkfile

59 lines
1.2 KiB
Text
Raw Normal View History

2021-04-13 18:38:22 +00:00
</$objtype/mkfile
TARG=bin/uxncli bin/uxnasm bin/uxnemu
USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal | grep -v /library/}
2021-05-31 21:50:36 +00:00
ROM=${USM:%.tal=%.rom}
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-05-17 21:55:13 +00:00
src/devices/apu.h\
src/devices/file.h\
2021-05-17 21:55:13 +00:00
src/devices/ppu.h\
2021-04-13 18:38:22 +00:00
src/uxn.h\
CLEANFILES=$TARG $ROM
2021-04-13 18:38:22 +00:00
default:V: all
all:V: bin $TARG $ROM
2021-04-13 18:38:22 +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
bin/uxncli: file.$O uxncli.$O uxn.$O
$LD $LDFLAGS -o $target $prereq
2021-04-13 18:38:22 +00:00
bin/uxnasm: uxnasm.$O
$LD $LDFLAGS -o $target $prereq
2021-04-13 18:38:22 +00:00
bin/uxnemu: uxnemu.$O apu.$O file.$O ppu.$O uxn.$O
$LD $LDFLAGS -o $target $prereq
2021-04-13 18:38:22 +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
(apu|file|ppu)\.$O:R: src/devices/\1.c
2021-05-17 21:55:13 +00:00
$CC $CFLAGS -Isrc -o $target src/devices/$stem1.c
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'
#LDFLAGS=-p