From 7dc95a0103af08c95c9093b6efa6c77af77a2538 Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Sun, 13 Sep 2020 04:22:50 -0300 Subject: Undo PokeCodec's PRs This commit undoes most of PokeCodec's PRs after the debate in chat. Some harmless or completely superseded PRs have been left alone, as there is not much benefit in attempting to undo them. Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136, #1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179, #1180, #1181, #1182 and #1183. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ca282d07e..99a93718b 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ OBJ_DIR := build/emerald LIBPATH := -L ../../tools/agbcc/lib else CC1 = $(shell $(CC) --print-prog-name=cc1) -quiet -override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mcpu=arm7tdmi -fno-toplevel-reorder -Wno-pointer-to-int-cast +override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast ROM := pokeemerald_modern.gba OBJ_DIR := build/modern LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))" -- cgit v1.2.3 From 8f7e212967827d5ae2cedb8e711ee1e233b25439 Mon Sep 17 00:00:00 2001 From: ExpoSeed <> Date: Mon, 5 Oct 2020 23:33:55 -0500 Subject: Remove *.rl in make clean --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ca282d07e..b21ac0fa4 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ mostlyclean: tidy rm -f $(SAMPLE_SUBDIR)/*.bin rm -f $(CRY_SUBDIR)/*.bin rm -f $(MID_SUBDIR)/*.s - find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} + + find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} + rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} + -- cgit v1.2.3 From 5029c909797ec6a8b89124c76b3c6d34440d099d Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Thu, 12 Nov 2020 11:04:38 -0500 Subject: Missing inc files in asm/*.s and data/*.s will raise an actual error message. --- Makefile | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0035eb626..1d16a7f29 100644 --- a/Makefile +++ b/Makefile @@ -136,6 +136,10 @@ C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS)) ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s) ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS)) +# get all the data/*.s files EXCEPT the ones with specific rules +REGULAR_DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s) +REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(REGULAR_DATA_ASM_SRCS)) + DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s) DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS)) @@ -275,23 +279,32 @@ endif $(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s $$(c_asm_dep) $(AS) $(ASFLAGS) -o $@ $< -ifeq ($(NODEP),1) -$(ASM_BUILDDIR)/%.o: asm_dep := -else -$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I "" $(ASM_SUBDIR)/$*.s) -endif +# The dep rules have to be explicit or else missing files won't be reported. +# As a side effect, they're evaluated immediately instead of when the rule is invoked. +# It doesn't look like $(shell) can be deferred so there might not be a better way. -$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep) - $(AS) $(ASFLAGS) -o $@ $< ifeq ($(NODEP),1) -$(DATA_ASM_BUILDDIR)/%.o: data_dep := +$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s + $(AS) $(ASFLAGS) -o $@ $< else -$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I include -I "" $(DATA_ASM_SUBDIR)/$*.s) +define ASM_DEP +$1: $2 $$(shell $(SCANINC) -I include -I "" $2) + $$(AS) $$(ASFLAGS) -o $$@ $$< +endef +$(foreach src, $(ASM_SRCS), $(eval $(call ASM_DEP,$(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o, $(src)),$(src)))) endif -$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep) +ifeq ($(NODEP),1) +$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@ +else +define DATA_ASM_DEP +$1: $2 $$(shell $(SCANINC) -I include -I "" $2) + $$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) -o $$@ +endef +$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call DATA_ASM_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src)))) +endif $(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s $(AS) $(ASFLAGS) -I sound -o $@ $< -- cgit v1.2.3 From 68b53c743770ae34428b29a5eb988e3e58c82285 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Wed, 18 Nov 2020 20:53:42 -0500 Subject: Optimize Makefile, also add *.sna to gitignore. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1d16a7f29..cf569de80 100644 --- a/Makefile +++ b/Makefile @@ -137,8 +137,7 @@ ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s) ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS)) # get all the data/*.s files EXCEPT the ones with specific rules -REGULAR_DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s) -REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(REGULAR_DATA_ASM_SRCS)) +REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(wildcard $(DATA_ASM_SUBDIR)/*.s)) DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s) DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS)) @@ -301,6 +300,7 @@ $(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s else define DATA_ASM_DEP $1: $2 $$(shell $(SCANINC) -I include -I "" $2) + #echo "hello" $$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) -o $$@ endef $(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call DATA_ASM_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src)))) -- cgit v1.2.3 From 70b6e05a47fc2e38d4f90cc2145f4d3d23a92793 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Wed, 18 Nov 2020 21:31:04 -0500 Subject: Remove useless comment. --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cf569de80..07143e4ad 100644 --- a/Makefile +++ b/Makefile @@ -300,7 +300,6 @@ $(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s else define DATA_ASM_DEP $1: $2 $$(shell $(SCANINC) -I include -I "" $2) - #echo "hello" $$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) -o $$@ endef $(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call DATA_ASM_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src)))) -- cgit v1.2.3