diff options
author | easyaspi314 (Devin) <easyaspi314@users.noreply.github.com> | 2019-09-05 13:42:24 -0400 |
---|---|---|
committer | easyaspi314 (Devin) <easyaspi314@users.noreply.github.com> | 2019-09-05 13:42:24 -0400 |
commit | 5829e033ee1ad771ca8ee05eb7b49f0d5b9c9516 (patch) | |
tree | f788cc214fe86df2121c1f3b9dec8322f39aad25 | |
parent | 3203e4f2f444b2264dad4350288912319f0f02a8 (diff) |
Revert Makefile changes [for now] to avoid conflict with PikalaxALT:modern_gcc
-rw-r--r-- | Makefile | 27 | ||||
-rwxr-xr-x | map_data_rules.mk | 4 |
2 files changed, 5 insertions, 26 deletions
@@ -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 $@ diff --git a/map_data_rules.mk b/map_data_rules.mk index a1f5c0e6d..89308fba1 100755 --- a/map_data_rules.mk +++ b/map_data_rules.mk @@ -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 |