uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 5bcbb072621256f3ffe20976d9da51db349b7e9f
parent e31612f0af2a29511b856197eef4f5a367d79fa1
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:   Tue, 18 May 2021 12:40:12 +0000

update mkfile to be more in line with build.sh

Diffstat:
Mmkfile | 45+++++++++++++++++++++++++--------------------
1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/mkfile b/mkfile @@ -1,10 +1,9 @@ </$objtype/mkfile -TARG=assembler debugger emulator -USM=`{walk -f projects/ | grep '\.usm$' | grep -v blank.usm | grep -v asma.usm} +TARG=bin/debugger bin/uxnasm bin/uxnemu +USM=`{walk -f projects/ | grep '\.usm$' | grep -v blank.usm} ROM=${USM:%.usm=%.rom} CFLAGS=$CFLAGS -I/sys/include/npe -BIN=/$objtype/bin/uxn HFILES=\ /sys/include/npe/stdio.h\ src/devices/apu.h\ @@ -12,13 +11,14 @@ HFILES=\ src/devices/ppu.h\ src/uxn.h\ -CLEANFILES=${TARG:%=bin/%} `{echo $ROM | sed 's,([^ /]+/)+,bin/,g'} +CLEANFILES=$TARG $ROM default:V: all -all:V: ${TARG:%=bin/%} $ROM +all:V: bin $TARG $ROM -</sys/src/cmd/mkmany +bin: + mkdir -p bin /sys/include/npe/stdio.h: hget https://git.sr.ht/~ft/npe/archive/master.tar.gz | tar xz && @@ -26,26 +26,31 @@ all:V: ${TARG:%=bin/%} $ROM mk install && rm -r npe-master -%.rom: %.usm bin/assembler - bin/assembler $stem.usm $target && cp $target bin/ +%.rom:Q: %.usm bin/uxnasm + bin/uxnasm $stem.usm $target >/dev/null -bin/assembler:Q: $O.assembler - mkdir -p bin && cp $prereq $target +bin/debugger: debugger.$O uxn.$O + $LD -o $target $prereq -bin/debugger:Q: $O.debugger - mkdir -p bin && cp $prereq $target +bin/uxnasm: assembler.$O + $LD -o $target $prereq -bin/emulator:Q: $O.emulator - mkdir -p bin && cp $prereq $target - -$O.assembler: assembler.$O - -$O.debugger: debugger.$O uxn.$O - -$O.emulator: emulator.$O apu.$O mpu.$O ppu.$O uxn.$O +bin/uxnemu: emulator.$O apu.$O mpu.$O ppu.$O uxn.$O + $LD -o $target $prereq (assembler|debugger|emulator|uxn)\.$O:R: src/\1.c $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 + +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'