summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile38
-rw-r--r--include/bg.h (renamed from gflib/bg.h)0
-rw-r--r--include/blit.h (renamed from gflib/blit.h)0
-rw-r--r--include/dma3.h (renamed from gflib/dma3.h)0
-rw-r--r--include/gpu_regs.h (renamed from gflib/gpu_regs.h)0
-rw-r--r--include/io_reg.h (renamed from gflib/io_reg.h)0
-rw-r--r--include/malloc.h (renamed from gflib/malloc.h)0
-rw-r--r--include/sprite.h (renamed from gflib/sprite.h)0
-rw-r--r--include/string_util.h (renamed from gflib/string_util.h)0
-rw-r--r--include/text.h (renamed from gflib/text.h)0
-rw-r--r--include/window.h (renamed from gflib/window.h)0
-rw-r--r--ld_script.txt30
-rw-r--r--ld_script_modern.txt5
-rw-r--r--src/bg.c (renamed from gflib/bg.c)0
-rw-r--r--src/blit.c (renamed from gflib/blit.c)0
-rw-r--r--src/dma3_manager.c (renamed from gflib/dma3_manager.c)0
-rw-r--r--src/gpu_regs.c (renamed from gflib/gpu_regs.c)0
-rw-r--r--src/io_reg.c (renamed from gflib/io_reg.c)0
-rw-r--r--src/malloc.c (renamed from gflib/malloc.c)0
-rw-r--r--src/sprite.c (renamed from gflib/sprite.c)0
-rw-r--r--src/string_util.c (renamed from gflib/string_util.c)0
-rw-r--r--src/text.c (renamed from gflib/text.c)0
-rw-r--r--src/window.c (renamed from gflib/window.c)0
-rw-r--r--sym_bss.txt12
-rw-r--r--sym_common.txt8
-rw-r--r--sym_ewram.txt8
26 files changed, 32 insertions, 69 deletions
diff --git a/Makefile b/Makefile
index d7d4b9566..95d6328ef 100644
--- a/Makefile
+++ b/Makefile
@@ -77,7 +77,6 @@ ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
C_SUBDIR = src
-GFLIB_SUBDIR = gflib
ASM_SUBDIR = asm
DATA_SRC_SUBDIR = src/data
DATA_ASM_SUBDIR = data
@@ -87,7 +86,6 @@ SAMPLE_SUBDIR = sound/direct_sound_samples
CRY_SUBDIR = sound/direct_sound_samples/cries
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
-GFLIB_BUILDDIR = $(OBJ_DIR)/$(GFLIB_SUBDIR)
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
@@ -111,7 +109,7 @@ LIBPATH := -L "$(dir $(shell $(MODERNCC) -mthumb -print-file-name=libgcc.a))" -L
LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
endif
-CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN)
+CPPFLAGS := -iquote include -Wno-trigraphs -DMODERN=$(MODERN)
ifneq ($(MODERN),1)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
endif
@@ -177,9 +175,6 @@ C_SRCS_IN := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
-GFLIB_SRCS := $(wildcard $(GFLIB_SUBDIR)/*.c)
-GFLIB_OBJS := $(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o,$(GFLIB_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))
@@ -198,7 +193,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) $(GFLIB_OBJS) $(C_ASM_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))
SUBDIRS := $(sort $(dir $(OBJS)))
@@ -316,7 +311,7 @@ else
endif
else
define C_DEP
-$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
+$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include $2)
ifeq (,$$(KEEP_TEMPS))
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
@@ -331,33 +326,6 @@ $(foreach src, $(C_SRCS), $(eval $(call C_DEP,$(patsubst $(C_SUBDIR)/%.c,$(C_BUI
endif
ifeq ($(NODEP),1)
-$(GFLIB_BUILDDIR)/%.o: $(GFLIB_SUBDIR)/%.c $$(c_dep)
-ifeq (,$(KEEP_TEMPS))
- @echo "$(CC1) <flags> -o $@ $<"
- @$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
-else
- @$(CPP) $(CPPFLAGS) $< -o $(GFLIB_BUILDDIR)/$*.i
- @$(PREPROC) $(GFLIB_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(GFLIB_BUILDDIR)/$*.s
- @echo -e ".text\n\t.align\t2, 0\n" >> $(GFLIB_BUILDDIR)/$*.s
- $(AS) $(ASFLAGS) -o $@ $(GFLIB_BUILDDIR)/$*.s
-endif
-else
-define GFLIB_DEP
-$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
-ifeq (,$$(KEEP_TEMPS))
- @echo "$$(CC1) <flags> -o $$@ $$<"
- @$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
-else
- @$$(CPP) $$(CPPFLAGS) $$< -o $$(GFLIB_BUILDDIR)/$3.i
- @$$(PREPROC) $$(GFLIB_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(GFLIB_BUILDDIR)/$3.s
- @echo -e ".text\n\t.align\t2, 0\n" >> $$(GFLIB_BUILDDIR)/$3.s
- $$(AS) $$(ASFLAGS) -o $$@ $$(GFLIB_BUILDDIR)/$3.s
-endif
-endef
-$(foreach src, $(GFLIB_SRCS), $(eval $(call GFLIB_DEP,$(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o, $(src)),$(src),$(patsubst $(GFLIB_SUBDIR)/%.c,%, $(src)))))
-endif
-
-ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
else
diff --git a/gflib/bg.h b/include/bg.h
index 58fd1282c..58fd1282c 100644
--- a/gflib/bg.h
+++ b/include/bg.h
diff --git a/gflib/blit.h b/include/blit.h
index 78f67766e..78f67766e 100644
--- a/gflib/blit.h
+++ b/include/blit.h
diff --git a/gflib/dma3.h b/include/dma3.h
index 8eff34f55..8eff34f55 100644
--- a/gflib/dma3.h
+++ b/include/dma3.h
diff --git a/gflib/gpu_regs.h b/include/gpu_regs.h
index 89e0cb64b..89e0cb64b 100644
--- a/gflib/gpu_regs.h
+++ b/include/gpu_regs.h
diff --git a/gflib/io_reg.h b/include/io_reg.h
index 82d2fc5ed..82d2fc5ed 100644
--- a/gflib/io_reg.h
+++ b/include/io_reg.h
diff --git a/gflib/malloc.h b/include/malloc.h
index f2dcf6d46..f2dcf6d46 100644
--- a/gflib/malloc.h
+++ b/include/malloc.h
diff --git a/gflib/sprite.h b/include/sprite.h
index 4a3b48225..4a3b48225 100644
--- a/gflib/sprite.h
+++ b/include/sprite.h
diff --git a/gflib/string_util.h b/include/string_util.h
index 229193d52..229193d52 100644
--- a/gflib/string_util.h
+++ b/include/string_util.h
diff --git a/gflib/text.h b/include/text.h
index 3edd0fc62..3edd0fc62 100644
--- a/gflib/text.h
+++ b/include/text.h
diff --git a/gflib/window.h b/include/window.h
index 3eac75a28..3eac75a28 100644
--- a/gflib/window.h
+++ b/include/window.h
diff --git a/ld_script.txt b/ld_script.txt
index 8c8f19015..5770b2cea 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -49,15 +49,15 @@ SECTIONS {
{
src/crt0.o(.text);
src/main.o(.text);
- gflib/malloc.o(.text);
- gflib/dma3_manager.o(.text);
- gflib/gpu_regs.o(.text);
- gflib/bg.o(.text);
- gflib/blit.o(.text);
- gflib/window.o(.text);
- gflib/text.o(.text);
- gflib/sprite.o(.text);
- gflib/string_util.o(.text);
+ src/malloc.o(.text);
+ src/dma3_manager.o(.text);
+ src/gpu_regs.o(.text);
+ src/bg.o(.text);
+ src/blit.o(.text);
+ src/window.o(.text);
+ src/text.o(.text);
+ src/sprite.o(.text);
+ src/string_util.o(.text);
src/link.o(.text);
src/AgbRfu_LinkManager.o(.text);
src/link_rfu_3.o(.text);
@@ -436,12 +436,12 @@ SECTIONS {
ALIGN(4)
{
src/main.o(.rodata);
- gflib/bg.o(.rodata);
- gflib/window.o(.rodata);
- gflib/text.o(.rodata);
- gflib/sprite.o(.rodata);
- gflib/io_reg.o(.rodata);
- gflib/string_util.o(.rodata);
+ src/bg.o(.rodata);
+ src/window.o(.rodata);
+ src/text.o(.rodata);
+ src/sprite.o(.rodata);
+ src/io_reg.o(.rodata);
+ src/string_util.o(.rodata);
src/link.o(.rodata);
src/link.o(.rodata.str1.4);
src/AgbRfu_LinkManager.o(.rodata);
diff --git a/ld_script_modern.txt b/ld_script_modern.txt
index 59d032bb2..72fb4dbc5 100644
--- a/ld_script_modern.txt
+++ b/ld_script_modern.txt
@@ -14,7 +14,6 @@ SECTIONS {
. = 0x1C000;
src/*.o(ewram_data);
- gflib/*.o(ewram_data);
. = 0x40000;
}
@@ -26,7 +25,6 @@ SECTIONS {
{
/* .bss starts at 0x3000000 */
src/*.o(.bss);
- gflib/*.o(.bss);
*libc.a:*.o(.bss*);
*libnosys.a:*.o(.bss*);
@@ -35,7 +33,6 @@ SECTIONS {
/* COMMON starts at 0x30022A8 */
src/*.o(COMMON);
- gflib/*.o(COMMON);
*libc.a:*.o(COMMON);
*libnosys.a:*.o(COMMON);
end = .;
@@ -49,7 +46,6 @@ SECTIONS {
{
src/crt0.o(.text*);
src/*.o(.text*);
- gflib/*.o(.text*);
asm/*.o(.text*);
} =0
@@ -84,7 +80,6 @@ SECTIONS {
ALIGN(4)
{
src/*.o(.rodata*);
- gflib/*.o(.rodata*);
data/*.o(.rodata*);
} =0
diff --git a/gflib/bg.c b/src/bg.c
index ec7c2113b..ec7c2113b 100644
--- a/gflib/bg.c
+++ b/src/bg.c
diff --git a/gflib/blit.c b/src/blit.c
index bdbb2e2fd..bdbb2e2fd 100644
--- a/gflib/blit.c
+++ b/src/blit.c
diff --git a/gflib/dma3_manager.c b/src/dma3_manager.c
index d774efe8c..d774efe8c 100644
--- a/gflib/dma3_manager.c
+++ b/src/dma3_manager.c
diff --git a/gflib/gpu_regs.c b/src/gpu_regs.c
index 3bcc4fd93..3bcc4fd93 100644
--- a/gflib/gpu_regs.c
+++ b/src/gpu_regs.c
diff --git a/gflib/io_reg.c b/src/io_reg.c
index 44364349d..44364349d 100644
--- a/gflib/io_reg.c
+++ b/src/io_reg.c
diff --git a/gflib/malloc.c b/src/malloc.c
index 38fc8939e..38fc8939e 100644
--- a/gflib/malloc.c
+++ b/src/malloc.c
diff --git a/gflib/sprite.c b/src/sprite.c
index f97ecc712..f97ecc712 100644
--- a/gflib/sprite.c
+++ b/src/sprite.c
diff --git a/gflib/string_util.c b/src/string_util.c
index 92f8eea5a..92f8eea5a 100644
--- a/gflib/string_util.c
+++ b/src/string_util.c
diff --git a/gflib/text.c b/src/text.c
index eb993c421..eb993c421 100644
--- a/gflib/text.c
+++ b/src/text.c
diff --git a/gflib/window.c b/src/window.c
index b03b513da..b03b513da 100644
--- a/gflib/window.c
+++ b/src/window.c
diff --git a/sym_bss.txt b/sym_bss.txt
index 3166aee45..7bdf99dd5 100644
--- a/sym_bss.txt
+++ b/sym_bss.txt
@@ -1,10 +1,10 @@
.include "src/main.o"
- .include "gflib/malloc.o"
- .include "gflib/dma3_manager.o"
- .include "gflib/gpu_regs.o"
- .include "gflib/bg.o"
- .include "gflib/text.o"
- .include "gflib/sprite.o"
+ .include "src/malloc.o"
+ .include "src/dma3_manager.o"
+ .include "src/gpu_regs.o"
+ .include "src/bg.o"
+ .include "src/text.o"
+ .include "src/sprite.o"
.include "src/link.o"
.include "src/AgbRfu_LinkManager.o"
.include "src/link_rfu_3.o"
diff --git a/sym_common.txt b/sym_common.txt
index 1525d8aec..23a185e6f 100644
--- a/sym_common.txt
+++ b/sym_common.txt
@@ -1,17 +1,17 @@
.space 0x8
.include "main.o"
- @ ../gflib/bg.o
+ @ bg.o
.align 2
gUnneededFireRedVariable:
.space 4
- @ ../gflib/window.o
+ @ window.o
.align 4
gTransparentTileNumber:
.space 1
.align 4
gWindowBgTilemapBuffers:
.space 16
- @ ../gflib/text.o
+ @ text.o
.align 4
gFonts:
.space 4
@@ -24,7 +24,7 @@ gCurGlyph:
.align 2
gTextFlags:
.space 4
- @ ../gflib/sprite.o
+ @ sprite.o
.align 2
gOamMatrixAllocBitmap:
.space 4
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 88c4461cb..f461cfa10 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -1,9 +1,9 @@
.include "src/decompress.o"
.include "src/main.o"
- .include "gflib/window.o"
- .include "gflib/text.o"
- .include "gflib/sprite.o"
- .include "gflib/string_util.o"
+ .include "src/window.o"
+ .include "src/text.o"
+ .include "src/sprite.o"
+ .include "src/string_util.o"
.include "src/link.o"
.include "src/AgbRfu_LinkManager.o"
.include "src/link_rfu_3.o"