From 0465b68ab5da0f3df8ab2d7e2e397f831d43f78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Sun, 7 Nov 2021 00:12:11 +0100 Subject: [PATCH] add file device build dep to mkfile; fix file_delete prototype --- mkfile | 7 ++++--- src/devices/file.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mkfile b/mkfile index e614173..6581927 100644 --- a/mkfile +++ b/mkfile @@ -7,6 +7,7 @@ CFLAGS=$CFLAGS -D__plan9__ -I/sys/include/npe -I/sys/include/npe/SDL2 HFILES=\ /sys/include/npe/stdio.h\ src/devices/apu.h\ + src/devices/file.h\ src/devices/ppu.h\ src/uxn.h\ @@ -28,19 +29,19 @@ bin: %.rom:Q: %.tal bin/uxnasm bin/uxnasm $stem.tal $target >/dev/null -bin/uxncli: uxncli.$O uxn.$O +bin/uxncli: file.$O uxncli.$O uxn.$O $LD $LDFLAGS -o $target $prereq bin/uxnasm: uxnasm.$O $LD $LDFLAGS -o $target $prereq -bin/uxnemu: uxnemu.$O apu.$O ppu.$O uxn.$O +bin/uxnemu: uxnemu.$O apu.$O file.$O ppu.$O uxn.$O $LD $LDFLAGS -o $target $prereq (uxnasm|uxncli|uxnemu|uxn)\.$O:R: src/\1.c $CC $CFLAGS -Isrc -o $target src/$stem1.c -(apu|ppu)\.$O:R: src/devices/\1.c +(apu|file|ppu)\.$O:R: src/devices/\1.c $CC $CFLAGS -Isrc -o $target src/devices/$stem1.c nuke:V: clean diff --git a/src/devices/file.h b/src/devices/file.h index ce45c1c..846398b 100644 --- a/src/devices/file.h +++ b/src/devices/file.h @@ -14,4 +14,4 @@ void file_prepare(void *filename); Uint16 file_read(void *dest, Uint16 len); Uint16 file_write(void *src, Uint16 len, Uint8 flags); Uint16 file_stat(void *dest, Uint16 len); -Uint16 file_delete(); +Uint16 file_delete(void);