aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-23 23:59:43 +0200
committerBad Diode <bd@badd10de.dev>2021-05-23 23:59:43 +0200
commitf4d0f4f9e3563644129e672081c97c589103cf5a (patch)
tree3ee06a137b33e7f0e346271a5e38ed097e915c02 /Makefile
parent596ef772d75b6ec50f196c1f9288d3dc5391b8d6 (diff)
downloaduxngba-f4d0f4f9e3563644129e672081c97c589103cf5a.tar.gz
uxngba-f4d0f4f9e3563644129e672081c97c589103cf5a.zip
Fix warnings and compilation issues on macOS
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 427861c..100c861 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ SRC_MAIN := $(SRC_DIR)/main.c
18ROM := $(BUILD_DIR)/rom.c 18ROM := $(BUILD_DIR)/rom.c
19ROM_SRC := roms/dvd.rom 19ROM_SRC := roms/dvd.rom
20ASM_FILES := $(wildcard $(SRC_DIR)/*.s) 20ASM_FILES := $(wildcard $(SRC_DIR)/*.s)
21WATCH_SRC := $(shell find $(SRC_DIRS) -name *.c -or -name *.s -or -name *.h) 21WATCH_SRC := $(shell find $(SRC_DIR) -name *.c -or -name *.s -or -name *.h)
22INC_DIRS := $(shell find $(SRC_DIR) -type d) 22INC_DIRS := $(shell find $(SRC_DIR) -type d)
23INC_DIRS += $(BUILD_DIR) 23INC_DIRS += $(BUILD_DIR)
24INC_FLAGS := $(addprefix -I,$(INC_DIRS)) 24INC_FLAGS := $(addprefix -I,$(INC_DIRS))
@@ -29,6 +29,9 @@ TARGET := uxngba
29ELF := $(BUILD_DIR)/$(TARGET).elf 29ELF := $(BUILD_DIR)/$(TARGET).elf
30BIN := $(BUILD_DIR)/$(TARGET).gba 30BIN := $(BUILD_DIR)/$(TARGET).gba
31 31
32# Target tools.
33TOOLS_BIN2CARR := tools/bin2carr/build/bin2carr
34
32# Compiler and linker configuration. 35# Compiler and linker configuration.
33CC := $(DEVKITBIN)/arm-none-eabi-gcc 36CC := $(DEVKITBIN)/arm-none-eabi-gcc
34OBJCOPY := $(DEVKITBIN)/arm-none-eabi-objcopy 37OBJCOPY := $(DEVKITBIN)/arm-none-eabi-objcopy
@@ -57,9 +60,9 @@ else
57 CFLAGS += $(RELEASE_CFLAGS) 60 CFLAGS += $(RELEASE_CFLAGS)
58endif 61endif
59 62
60main: tools $(BUILD_DIR) $(ROM) $(BIN) 63main: $(BUILD_DIR) $(ROM) $(BIN)
61 64
62$(ROM): 65$(ROM): $(TOOLS_BIN2CARR)
63 ./tools/bin2carr/build/bin2carr -n uxn_rom -e u16 -o $(ROM) $(ROM_SRC) 66 ./tools/bin2carr/build/bin2carr -n uxn_rom -e u16 -o $(ROM) $(ROM_SRC)
64 67
65# Strip and fix header to create final .gba file. 68# Strip and fix header to create final .gba file.
@@ -83,5 +86,5 @@ run: main
83clean: 86clean:
84 rm -rf $(BUILD_DIR) 87 rm -rf $(BUILD_DIR)
85 88
86tools: 89$(TOOLS_BIN2CARR):
87 make -C tools/bin2carr 90 make -C tools/bin2carr