Move asm srcs to src
This commit is contained in:
parent
f08615881e
commit
a4d5624ad6
8 changed files with 22 additions and 11 deletions
14
Makefile
14
Makefile
|
@ -123,6 +123,9 @@ endif
|
||||||
C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
|
C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
|
||||||
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
|
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_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
|
||||||
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
|
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
|
||||||
|
|
||||||
|
@ -135,7 +138,7 @@ SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
|
||||||
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
|
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
|
||||||
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
|
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))
|
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
|
||||||
|
|
||||||
SUBDIRS := $(sort $(dir $(OBJS)))
|
SUBDIRS := $(sort $(dir $(OBJS)))
|
||||||
|
@ -235,6 +238,15 @@ $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
|
||||||
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
|
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
|
||||||
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
|
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
|
||||||
|
|
||||||
|
ifeq ($(NODEP),1)
|
||||||
|
$(C_BUILDDIR)/%.o: c_asm_dep :=
|
||||||
|
else
|
||||||
|
$(C_BUILDDIR)/%.o: c_asm_dep = $(shell $(SCANINC) -I "" $(C_SUBDIR)/$*.s)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s $$(c_asm_dep)
|
||||||
|
$(AS) $(ASFLAGS) -o $@ $<
|
||||||
|
|
||||||
ifeq ($(NODEP),1)
|
ifeq ($(NODEP),1)
|
||||||
$(ASM_BUILDDIR)/%.o: asm_dep :=
|
$(ASM_BUILDDIR)/%.o: asm_dep :=
|
||||||
else
|
else
|
||||||
|
|
|
@ -47,7 +47,7 @@ SECTIONS {
|
||||||
.text :
|
.text :
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
asm/crt0.o(.text);
|
src/crt0.o(.text);
|
||||||
src/main.o(.text);
|
src/main.o(.text);
|
||||||
src/alloc.o(.text);
|
src/alloc.o(.text);
|
||||||
src/dma3_manager.o(.text);
|
src/dma3_manager.o(.text);
|
||||||
|
@ -348,8 +348,8 @@ SECTIONS {
|
||||||
lib_text :
|
lib_text :
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
asm/libgcnmultiboot.o(.text);
|
src/libgcnmultiboot.o(.text);
|
||||||
asm/m4a_1.o(.text);
|
src/m4a_1.o(.text);
|
||||||
src/m4a.o(.text);
|
src/m4a.o(.text);
|
||||||
src/agb_flash.o(.text);
|
src/agb_flash.o(.text);
|
||||||
src/agb_flash_1m.o(.text);
|
src/agb_flash_1m.o(.text);
|
||||||
|
@ -360,7 +360,7 @@ SECTIONS {
|
||||||
asm/librfu_intr.o(.text);
|
asm/librfu_intr.o(.text);
|
||||||
src/librfu_rfu.o(.text);
|
src/librfu_rfu.o(.text);
|
||||||
asm/librfu.o(.text);
|
asm/librfu.o(.text);
|
||||||
asm/libagbsyscall.o(.text);
|
src/libagbsyscall.o(.text);
|
||||||
*libgcc.a:_call_via_rX.o(.text);
|
*libgcc.a:_call_via_rX.o(.text);
|
||||||
*libgcc.a:_divdi3.o(.text);
|
*libgcc.a:_divdi3.o(.text);
|
||||||
*libgcc.a:_divsi3.o(.text);
|
*libgcc.a:_divsi3.o(.text);
|
||||||
|
|
|
@ -25,7 +25,6 @@ SECTIONS {
|
||||||
{
|
{
|
||||||
/* .bss starts at 0x3000000 */
|
/* .bss starts at 0x3000000 */
|
||||||
src/*.o(.bss);
|
src/*.o(.bss);
|
||||||
asm/m4a_1.o(.bss);
|
|
||||||
|
|
||||||
/* .bss.code starts at 0x3001AA8 */
|
/* .bss.code starts at 0x3001AA8 */
|
||||||
src/m4a.o(.bss.code);
|
src/m4a.o(.bss.code);
|
||||||
|
@ -42,7 +41,7 @@ SECTIONS {
|
||||||
.text :
|
.text :
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
asm/crt0.o(.text);
|
src/crt0.o(.text);
|
||||||
src/*.o(.text);
|
src/*.o(.text);
|
||||||
asm/*.o(.text);
|
asm/*.o(.text);
|
||||||
} =0
|
} =0
|
||||||
|
@ -56,8 +55,8 @@ SECTIONS {
|
||||||
lib_text :
|
lib_text :
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
asm/libgcnmultiboot.o(.text);
|
src/libgcnmultiboot.o(.text);
|
||||||
asm/m4a_1.o(.text);
|
src/m4a_1.o(.text);
|
||||||
src/m4a.o(.text);
|
src/m4a.o(.text);
|
||||||
src/agb_flash.o(.text);
|
src/agb_flash.o(.text);
|
||||||
src/agb_flash_1m.o(.text);
|
src/agb_flash_1m.o(.text);
|
||||||
|
@ -68,7 +67,7 @@ SECTIONS {
|
||||||
asm/librfu_intr.o(.text);
|
asm/librfu_intr.o(.text);
|
||||||
src/librfu_rfu.o(.text);
|
src/librfu_rfu.o(.text);
|
||||||
asm/librfu.o(.text);
|
asm/librfu.o(.text);
|
||||||
asm/libagbsyscall.o(.text);
|
src/libagbsyscall.o(.text);
|
||||||
*libgcc.a:*.o(.text*);
|
*libgcc.a:*.o(.text*);
|
||||||
*libc.a:*.o(.text*);
|
*libc.a:*.o(.text*);
|
||||||
src/libisagbprn.o(.text);
|
src/libisagbprn.o(.text);
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
.include "src/pokenav_unk_10.o"
|
.include "src/pokenav_unk_10.o"
|
||||||
.include "src/ereader_helpers.o"
|
.include "src/ereader_helpers.o"
|
||||||
.include "src/faraway_island.o"
|
.include "src/faraway_island.o"
|
||||||
.include "asm/m4a_1.o"
|
.include "src/m4a_1.o"
|
||||||
.include "src/agb_flash.o"
|
.include "src/agb_flash.o"
|
||||||
.include "src/siirtc.o"
|
.include "src/siirtc.o"
|
||||||
.include "*libgcc.a:dp-bit.o"
|
.include "*libgcc.a:dp-bit.o"
|
||||||
|
|
Loading…
Reference in a new issue