Fixed Windows build

This commit is contained in:
Lior Halphon 2020-05-31 21:54:54 +03:00
parent 08efb46d41
commit 9521729e4e
2 changed files with 9 additions and 2 deletions

View File

@ -387,10 +387,10 @@ $(OBJ)/%.2bpp: %.png
rgbgfx -h -u -o $@ $<
$(OBJ)/BootROMs/SameBoyLogo.pb12: $(OBJ)/BootROMs/SameBoyLogo.2bpp $(PB12_COMPRESS)
$(PB12_COMPRESS) < $< > $@
$(realpath $(PB12_COMPRESS)) < $< > $@
$(PB12_COMPRESS): BootROMs/pb12.c
$(CC) -Wall -Werror $< -o $@
$(CC) $(LDFLAGS) $(CFLAGS) -Wall -Werror $< -o $@
$(BIN)/BootROMs/agb_boot.bin: BootROMs/cgb_boot.asm
$(BIN)/BootROMs/cgb_boot_fast.bin: BootROMs/cgb_boot.asm

7
Windows/unistd.h Normal file
View File

@ -0,0 +1,7 @@
#include <io.h>
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#define read(...) _read(__VA_ARGS__)
#define write(...) _write(__VA_ARGS__)