Browse code

add file device build dep to mkfile; fix file_delete prototype

Sigrid Solveig Haflínudóttir authored on 06/11/2021 23:12:11
Showing 2 changed files
... ...
@@ -7,6 +7,7 @@ CFLAGS=$CFLAGS -D__plan9__ -I/sys/include/npe -I/sys/include/npe/SDL2
7 7
 HFILES=\
8 8
 	/sys/include/npe/stdio.h\
9 9
 	src/devices/apu.h\
10
+	src/devices/file.h\
10 11
 	src/devices/ppu.h\
11 12
 	src/uxn.h\
12 13
 
... ...
@@ -28,19 +29,19 @@ bin:
28 29
 %.rom:Q: %.tal bin/uxnasm
29 30
 	bin/uxnasm $stem.tal $target >/dev/null
30 31
 
31
-bin/uxncli: uxncli.$O uxn.$O
32
+bin/uxncli: file.$O uxncli.$O uxn.$O
32 33
 	$LD $LDFLAGS -o $target $prereq
33 34
 
34 35
 bin/uxnasm: uxnasm.$O
35 36
 	$LD $LDFLAGS -o $target $prereq
36 37
 
37
-bin/uxnemu: uxnemu.$O apu.$O ppu.$O uxn.$O
38
+bin/uxnemu: uxnemu.$O apu.$O file.$O ppu.$O uxn.$O
38 39
 	$LD $LDFLAGS -o $target $prereq
39 40
 
40 41
 (uxnasm|uxncli|uxnemu|uxn)\.$O:R: src/\1.c
41 42
 	$CC $CFLAGS -Isrc -o $target src/$stem1.c
42 43
 
43
-(apu|ppu)\.$O:R: src/devices/\1.c
44
+(apu|file|ppu)\.$O:R: src/devices/\1.c
44 45
 	$CC $CFLAGS -Isrc -o $target src/devices/$stem1.c
45 46
 
46 47
 nuke:V: clean
... ...
@@ -14,4 +14,4 @@ void file_prepare(void *filename);
14 14
 Uint16 file_read(void *dest, Uint16 len);
15 15
 Uint16 file_write(void *src, Uint16 len, Uint8 flags);
16 16
 Uint16 file_stat(void *dest, Uint16 len);
17
-Uint16 file_delete();
17
+Uint16 file_delete(void);