From 9521729e4e7ae90133d8cdc23b5e82fe837f865d Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sun, 31 May 2020 21:54:54 +0300 Subject: [PATCH] Fixed Windows build --- Makefile | 4 ++-- Windows/unistd.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Windows/unistd.h diff --git a/Makefile b/Makefile index 78978e4..8f96bb6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/Windows/unistd.h b/Windows/unistd.h new file mode 100644 index 0000000..b7aabf2 --- /dev/null +++ b/Windows/unistd.h @@ -0,0 +1,7 @@ +#include +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + +#define read(...) _read(__VA_ARGS__) +#define write(...) _write(__VA_ARGS__)