From f4d0f4f9e3563644129e672081c97c589103cf5a Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sun, 23 May 2021 23:59:43 +0200 Subject: Fix warnings and compilation issues on macOS --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 427861c..100c861 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ SRC_MAIN := $(SRC_DIR)/main.c ROM := $(BUILD_DIR)/rom.c ROM_SRC := roms/dvd.rom ASM_FILES := $(wildcard $(SRC_DIR)/*.s) -WATCH_SRC := $(shell find $(SRC_DIRS) -name *.c -or -name *.s -or -name *.h) +WATCH_SRC := $(shell find $(SRC_DIR) -name *.c -or -name *.s -or -name *.h) INC_DIRS := $(shell find $(SRC_DIR) -type d) INC_DIRS += $(BUILD_DIR) INC_FLAGS := $(addprefix -I,$(INC_DIRS)) @@ -29,6 +29,9 @@ TARGET := uxngba ELF := $(BUILD_DIR)/$(TARGET).elf BIN := $(BUILD_DIR)/$(TARGET).gba +# Target tools. +TOOLS_BIN2CARR := tools/bin2carr/build/bin2carr + # Compiler and linker configuration. CC := $(DEVKITBIN)/arm-none-eabi-gcc OBJCOPY := $(DEVKITBIN)/arm-none-eabi-objcopy @@ -57,9 +60,9 @@ else CFLAGS += $(RELEASE_CFLAGS) endif -main: tools $(BUILD_DIR) $(ROM) $(BIN) +main: $(BUILD_DIR) $(ROM) $(BIN) -$(ROM): +$(ROM): $(TOOLS_BIN2CARR) ./tools/bin2carr/build/bin2carr -n uxn_rom -e u16 -o $(ROM) $(ROM_SRC) # Strip and fix header to create final .gba file. @@ -83,5 +86,5 @@ run: main clean: rm -rf $(BUILD_DIR) -tools: +$(TOOLS_BIN2CARR): make -C tools/bin2carr -- cgit v1.2.1