summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-01-19 01:54:14 -0500
committerGriffinR <griffin.g.richards@gmail.com>2021-01-19 01:54:14 -0500
commit9d20f55a58064cb5a33e460985c82ed6c5fb3ca8 (patch)
tree23331c1138a4e945c6286819d22277474481635a
parent9350e2d33891424ebaf4f6d70c0305f099ace9d0 (diff)
Move 'source' asm files to src
-rw-r--r--.gitignore1
-rw-r--r--Makefile8
-rw-r--r--ld_script.txt8
-rw-r--r--src/crt0.s (renamed from asm/crt0.s)0
-rw-r--r--src/libagbsyscall.s (renamed from asm/libagbsyscall.s)0
-rw-r--r--src/libgcnmultiboot.s (renamed from asm/libgcnmultiboot.s)0
-rw-r--r--src/m4a_1.s (renamed from asm/m4a_1.s)0
-rw-r--r--sym_bss.txt2
8 files changed, 10 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 50910379c..af2644ade 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,7 +44,6 @@ ld_script_ruby.txt
ld_script_sapphire.txt
sound/**/*.bin
sound/songs/midi/*.s
-src/*.s
src/data/items.h
src/data/wild_encounters.h
tags
diff --git a/Makefile b/Makefile
index 3ff8f9914..37241192a 100644
--- a/Makefile
+++ b/Makefile
@@ -117,6 +117,9 @@ endif
C_SRCS := $(wildcard $(C_SUBDIR)/*.c)
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
+C_ASM_SRCS += $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
+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))
@@ -132,7 +135,7 @@ SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
-OBJS := $(C_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
+OBJS := $(C_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
TOOLDIRS := $(filter-out tools/agbcc tools/binutils tools/analyze_source,$(wildcard tools/*))
@@ -249,8 +252,7 @@ else
$(C_BUILDDIR)/%.o: c_asm_dep = $(shell [[ -f $(C_SUBDIR)/$*.s ]] && $(SCANINC) -I "" $(C_SUBDIR)/$*.s)
endif
-
-$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
+$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s $$(c_asm_dep)
$(AS) $(ASFLAGS) -o $@ $<
ifeq ($(NODEP),1)
diff --git a/ld_script.txt b/ld_script.txt
index d22e7459a..2c599535d 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -44,7 +44,7 @@ SECTIONS {
.text :
ALIGN(4)
{
- asm/crt0.o(.text);
+ src/crt0.o(.text);
src/main.o(.text);
src/gpu_regs.o(.text);
src/dma3_manager.o(.text);
@@ -331,8 +331,8 @@ SECTIONS {
lib_text :
ALIGN(4)
{
- asm/libgcnmultiboot.o(.text);
- asm/m4a_1.o(.text);
+ src/libgcnmultiboot.o(.text);
+ src/m4a_1.o(.text);
src/m4a.o(.text);
src/agb_flash.o(.text);
src/agb_flash_1m.o(.text);
@@ -343,7 +343,7 @@ SECTIONS {
src/librfu_rfu.o(.text);
src/librfu_sio32id.o(.text);
src/isagbprn.o(.text);
- asm/libagbsyscall.o(.text);
+ src/libagbsyscall.o(.text);
*libgcc.a:_call_via_rX.o(.text);
*libgcc.a:_divdi3.o(.text);
*libgcc.a:_divsi3.o(.text);
diff --git a/asm/crt0.s b/src/crt0.s
index 0d891141e..0d891141e 100644
--- a/asm/crt0.s
+++ b/src/crt0.s
diff --git a/asm/libagbsyscall.s b/src/libagbsyscall.s
index 360a43e67..360a43e67 100644
--- a/asm/libagbsyscall.s
+++ b/src/libagbsyscall.s
diff --git a/asm/libgcnmultiboot.s b/src/libgcnmultiboot.s
index 91bc1890c..91bc1890c 100644
--- a/asm/libgcnmultiboot.s
+++ b/src/libgcnmultiboot.s
diff --git a/asm/m4a_1.s b/src/m4a_1.s
index 7cb36580f..7cb36580f 100644
--- a/asm/m4a_1.s
+++ b/src/m4a_1.s
diff --git a/sym_bss.txt b/sym_bss.txt
index 3c3e98c58..6fdd7d3fd 100644
--- a/sym_bss.txt
+++ b/sym_bss.txt
@@ -57,7 +57,7 @@
.align 3
.include "src/digit_obj_util.o"
.align 3
- .include "asm/m4a_1.o"
+ .include "src/m4a_1.o"
.align 3
.include "src/agb_flash.o"
.align 3