diff options
author | Bad Diode <bd@badd10de.dev> | 2021-05-23 23:59:43 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-05-23 23:59:43 +0200 |
commit | f4d0f4f9e3563644129e672081c97c589103cf5a (patch) | |
tree | 3ee06a137b33e7f0e346271a5e38ed097e915c02 /Makefile | |
parent | 596ef772d75b6ec50f196c1f9288d3dc5391b8d6 (diff) | |
download | uxngba-f4d0f4f9e3563644129e672081c97c589103cf5a.tar.gz uxngba-f4d0f4f9e3563644129e672081c97c589103cf5a.zip |
Fix warnings and compilation issues on macOS
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -18,7 +18,7 @@ SRC_MAIN := $(SRC_DIR)/main.c | |||
18 | ROM := $(BUILD_DIR)/rom.c | 18 | ROM := $(BUILD_DIR)/rom.c |
19 | ROM_SRC := roms/dvd.rom | 19 | ROM_SRC := roms/dvd.rom |
20 | ASM_FILES := $(wildcard $(SRC_DIR)/*.s) | 20 | ASM_FILES := $(wildcard $(SRC_DIR)/*.s) |
21 | WATCH_SRC := $(shell find $(SRC_DIRS) -name *.c -or -name *.s -or -name *.h) | 21 | WATCH_SRC := $(shell find $(SRC_DIR) -name *.c -or -name *.s -or -name *.h) |
22 | INC_DIRS := $(shell find $(SRC_DIR) -type d) | 22 | INC_DIRS := $(shell find $(SRC_DIR) -type d) |
23 | INC_DIRS += $(BUILD_DIR) | 23 | INC_DIRS += $(BUILD_DIR) |
24 | INC_FLAGS := $(addprefix -I,$(INC_DIRS)) | 24 | INC_FLAGS := $(addprefix -I,$(INC_DIRS)) |
@@ -29,6 +29,9 @@ TARGET := uxngba | |||
29 | ELF := $(BUILD_DIR)/$(TARGET).elf | 29 | ELF := $(BUILD_DIR)/$(TARGET).elf |
30 | BIN := $(BUILD_DIR)/$(TARGET).gba | 30 | BIN := $(BUILD_DIR)/$(TARGET).gba |
31 | 31 | ||
32 | # Target tools. | ||
33 | TOOLS_BIN2CARR := tools/bin2carr/build/bin2carr | ||
34 | |||
32 | # Compiler and linker configuration. | 35 | # Compiler and linker configuration. |
33 | CC := $(DEVKITBIN)/arm-none-eabi-gcc | 36 | CC := $(DEVKITBIN)/arm-none-eabi-gcc |
34 | OBJCOPY := $(DEVKITBIN)/arm-none-eabi-objcopy | 37 | OBJCOPY := $(DEVKITBIN)/arm-none-eabi-objcopy |
@@ -57,9 +60,9 @@ else | |||
57 | CFLAGS += $(RELEASE_CFLAGS) | 60 | CFLAGS += $(RELEASE_CFLAGS) |
58 | endif | 61 | endif |
59 | 62 | ||
60 | main: tools $(BUILD_DIR) $(ROM) $(BIN) | 63 | main: $(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 | |||
83 | clean: | 86 | clean: |
84 | rm -rf $(BUILD_DIR) | 87 | rm -rf $(BUILD_DIR) |
85 | 88 | ||
86 | tools: | 89 | $(TOOLS_BIN2CARR): |
87 | make -C tools/bin2carr | 90 | make -C tools/bin2carr |