This commit is contained in:
Henny022p 2025-03-02 15:43:59 +00:00 committed by GitHub
commit ae0209cd28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 4 deletions

View File

@ -0,0 +1,24 @@
FROM debian
RUN apt update && apt upgrade -y && apt install -y --no-install-recommends \
ca-certificates \
cmake \
g++ \
gcc \
gcc-arm-none-eabi \
git \
libpng-dev \
make \
python3 \
python3-pycparser \
ssh-client \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/pret/agbcc.git /agbcc
RUN cd /agbcc && \
./build.sh && \
mkdir -p /agbcc-install && \
./install.sh /agbcc-install
ENV AGBCC_PATH=/agbcc-install/tools/agbcc

View File

@ -0,0 +1,6 @@
{
"name": "zeldaret/tmc-dev",
"build": {
"dockerfile": "Containerfile"
}
}

6
GBA.mk
View File

@ -95,7 +95,7 @@ $(BUILD_DIR)/%.o: %.s $$(deps) $(ENUM_ASM_HEADERS)
$(BUILD_DIR)/enum_include/%.inc: include/%.h
@mkdir -p $(dir $@)
$(ENUM_PROCESSOR) $< $(CC) "-D__attribute__(x)=" "-D$(GAME_VERSION)" "-E" "-nostdinc" "-Itools/agbcc" "-Itools/agbcc/include" "-iquote include" > $@
$(ENUM_PROCESSOR) $< $(CC) "-D__attribute__(x)=" "-D$(GAME_VERSION)" "-E" "-nostdinc" "-I$(AGBCC_PATH)" "-I$(AGBCC_PATH)/include" "-iquote include" > $@
# =============
# build C files
@ -103,7 +103,7 @@ $(BUILD_DIR)/enum_include/%.inc: include/%.h
# agbcc includes are separate because we don't want dependency scanning on them
CINCLUDE := -I include -I $(BUILD_DIR)
CPPFLAGS := -I tools/agbcc -I tools/agbcc/include $(CINCLUDE) -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE)
CPPFLAGS := -I $(AGBCC_PATH) -I $(AGBCC_PATH)/include $(CINCLUDE) -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE)
CFLAGS := -O2 -Wimplicit -Wparentheses -Werror -Wno-multichar -g3
interwork := $(BUILD_DIR)/src/interrupts.o \
@ -131,7 +131,7 @@ $(BUILD_DIR)/%.o : %.c $$(deps)
# ==============
LDFLAGS = -Map ../../$(BUILD_DIR)/$(BUILD_NAME).map
LIB := -L ../../tools/agbcc/lib -lc
LIB := -L $(AGBCC_PATH)/lib -lc
$(ROM): $(ELF)
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@

View File

@ -28,7 +28,9 @@ OBJCOPY := $(TOOLCHAIN_PATH)arm-none-eabi-objcopy
# custom tools
# ============
CC1 := tools/agbcc/bin/agbcc
AGBCC_PATH ?= $(shell pwd)/tools/agbcc
CC1 := $(AGBCC_PATH)/bin/agbcc
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
SCANINC := tools/bin/scaninc