mirror of
https://github.com/pret/pokeruby.git
synced 2024-11-23 13:09:40 +00:00
Revert Makefile changes [for now] to avoid conflict with PikalaxALT:modern_gcc
This commit is contained in:
parent
3203e4f2f4
commit
5829e033ee
27
Makefile
27
Makefile
@ -1,8 +1,4 @@
|
||||
ifneq (,$(DEVKITARM))
|
||||
include $(DEVKITARM)/base_tools
|
||||
else
|
||||
PREFIX := $(CURDIR)/tools/binutils/bin/arm-none-eabi-
|
||||
endif
|
||||
include config.mk
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
@ -17,7 +13,7 @@ endif
|
||||
SHELL := /bin/bash -o pipefail
|
||||
AS := $(PREFIX)as
|
||||
CC1 := tools/agbcc/bin/agbcc$(EXE)
|
||||
CPP := $(CC) -E -std=gnu99
|
||||
CPP := $(PREFIX)cpp
|
||||
LD := $(PREFIX)ld
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
SHA1SUM := sha1sum -c
|
||||
@ -35,16 +31,6 @@ ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(GAME_VERSION)=1 --defsym REVISI
|
||||
CC1FLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm
|
||||
CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef -Werror -Wno-trigraphs -D $(GAME_VERSION) -D REVISION=$(GAME_REVISION) -D $(GAME_LANGUAGE) -DDEBUG_TRANSLATE=$(DEBUG_TRANSLATE) -D DEBUG=$(DEBUG)
|
||||
|
||||
CPPVERSION := $(shell $(CPP) --version 2>/dev/null || true)
|
||||
|
||||
# Clang's cpp has some issues.
|
||||
ifneq (,$(filter $(CPPVERSION),clang llvm LLVM Clang))
|
||||
override CPP += -Wno-unicode
|
||||
CLANG_CPP := 1
|
||||
else
|
||||
CLANG_CPP :=
|
||||
endif
|
||||
|
||||
#### Files ####
|
||||
|
||||
ROM := poke$(BUILD_NAME).gba
|
||||
@ -75,7 +61,6 @@ LD_SCRIPT := $(BUILD_DIR)/ld_script.ld
|
||||
%src/libs/m4a.o: CC1 := tools/agbcc/bin/old_agbcc$(EXE)
|
||||
%src/libs/libisagbprn.o: CC1 := tools/agbcc/bin/old_agbcc$(EXE)
|
||||
%src/libs/libisagbprn.o: CC1FLAGS := -mthumb-interwork
|
||||
$(BUILD_DIR)/data/%.o: data/%.s
|
||||
|
||||
|
||||
#### Main Rules ####
|
||||
@ -103,10 +88,6 @@ ifeq ($(NODEP),)
|
||||
$(BUILD_DIR)/data/%.o: ASM_DEP = $(shell $(SCANINC) data/$(*F).s)
|
||||
endif
|
||||
|
||||
ifneq (,$(CLANG_CPP))
|
||||
$(BUILD_DIR)/data/%.o: override CPP += -P
|
||||
endif
|
||||
|
||||
MAKEFLAGS += --no-print-directory
|
||||
# Secondary expansion is required for dependency variables in object rules.
|
||||
.SECONDEXPANSION:
|
||||
@ -168,7 +149,7 @@ $(ROM): %.gba: %.elf
|
||||
$(LD_SCRIPT): ld_script.txt $(BUILD_DIR)/sym_common.ld $(BUILD_DIR)/sym_ewram.ld $(BUILD_DIR)/sym_bss.ld
|
||||
cd $(BUILD_DIR) && sed -e "s#tools/#../../tools/#g" ../../ld_script.txt >ld_script.ld
|
||||
$(BUILD_DIR)/sym_%.ld: sym_%.txt
|
||||
$(CPP) -P -xc $(CPPFLAGS) $< | sed -e "s#tools/#../../tools/#g" > $@
|
||||
$(CPP) -P $(CPPFLAGS) $< | sed -e "s#tools/#../../tools/#g" > $@
|
||||
|
||||
$(C_OBJECTS): $(BUILD_DIR)/%.o: %.c $$(C_DEP)
|
||||
$(CPP) $(CPPFLAGS) $< -o $(BUILD_DIR)/$*.i
|
||||
@ -178,9 +159,7 @@ $(C_OBJECTS): $(BUILD_DIR)/%.o: %.c $$(C_DEP)
|
||||
|
||||
# Only .s files in data need preproc
|
||||
$(BUILD_DIR)/data/%.o: data/%.s $$(ASM_DEP)
|
||||
$(PREPROC) $< charmap.txt | $(CPP) - -I include | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
$(BUILD_DIR)/%.o: %.s $$(ASM_DEP)
|
||||
$(AS) $(ASFLAGS) $< -o $@
|
||||
|
@ -9,9 +9,9 @@ MAP_EVENTS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/events.inc,$(MAP_DIRS))
|
||||
MAP_HEADERS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/header.inc,$(MAP_DIRS))
|
||||
|
||||
$(BUILD_DIR)/data/maps.o: data/maps.s $(LAYOUTS_DIR)/layouts.inc $(LAYOUTS_DIR)/layouts_table.inc $(MAPS_DIR)/headers.inc $(MAPS_DIR)/groups.inc $(MAPS_DIR)/connections.inc $(MAP_CONNECTIONS) $(MAP_HEADERS)
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -P - -I include | $(AS) $(ASFLAGS) -o $@
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@
|
||||
$(BUILD_DIR)/data/map_events.o: data/map_events.s $(MAPS_DIR)/events.inc $(MAP_EVENTS)
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -P - -I include | $(AS) $(ASFLAGS) -o $@
|
||||
$(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
$(MAPS_DIR)/%/header.inc: $(MAPS_DIR)/%/map.json
|
||||
$(MAPJSON) map ruby $< $(LAYOUTS_DIR)/layouts.json
|
||||
|
Loading…
Reference in New Issue
Block a user