mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Port symfile implementation from Ruby, FireRed
This commit is contained in:
parent
69fb670955
commit
5ccac26f26
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
@ -7,11 +7,29 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
GAME_VERSION: EMERALD
|
||||||
|
GAME_REVISION: 0
|
||||||
|
GAME_LANGUAGE: ENGLISH
|
||||||
|
MODERN: 0
|
||||||
|
COMPARE: 1
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Checkout syms
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
path: symbols
|
||||||
|
ref: symbols
|
||||||
|
|
||||||
|
- name: Checkout agbcc
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
path: agbcc
|
||||||
|
repository: pret/agbcc
|
||||||
|
|
||||||
- name: Install binutils
|
- name: Install binutils
|
||||||
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
|
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
|
||||||
# build-essential, git, and libpng-dev are already installed
|
# build-essential, git, and libpng-dev are already installed
|
||||||
@ -20,16 +38,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Install agbcc
|
- name: Install agbcc
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/pret/agbcc.git
|
|
||||||
cd agbcc
|
|
||||||
./build.sh
|
./build.sh
|
||||||
./install.sh ../
|
./install.sh ../
|
||||||
|
working-directory: agbcc
|
||||||
|
|
||||||
- name: Compare
|
- name: Compare
|
||||||
run: make -j${nproc} compare
|
run: make -j${nproc} all syms
|
||||||
|
|
||||||
- name: Modern
|
- name: Modern
|
||||||
run: make -j${nproc} modern
|
env:
|
||||||
|
MODERN: 1
|
||||||
|
COMPARE: 0
|
||||||
|
run: make -j${nproc} all
|
||||||
|
|
||||||
- name: Webhook
|
- name: Webhook
|
||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
@ -38,3 +58,17 @@ jobs:
|
|||||||
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: https://i.imgur.com/38BQHdd.png
|
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: https://i.imgur.com/38BQHdd.png
|
||||||
CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }}
|
CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }}
|
||||||
run: sh .github/calcrom/webhook.sh pokeemerald
|
run: sh .github/calcrom/webhook.sh pokeemerald
|
||||||
|
|
||||||
|
- name: Move symfiles
|
||||||
|
if: ${{ github.event_name == 'push' }}
|
||||||
|
run: |
|
||||||
|
cp -v *.sym symbols/
|
||||||
|
|
||||||
|
- name: Update symfiles
|
||||||
|
if: ${{ github.event_name == 'push' }}
|
||||||
|
uses: EndBug/add-and-commit@v7
|
||||||
|
with:
|
||||||
|
branch: symbols
|
||||||
|
cwd: "./symbols"
|
||||||
|
add: "*.sym"
|
||||||
|
message: ${{ github.event.commits[0].message }}
|
||||||
|
13
Makefile
13
Makefile
@ -20,6 +20,7 @@ endif
|
|||||||
|
|
||||||
PREFIX := arm-none-eabi-
|
PREFIX := arm-none-eabi-
|
||||||
OBJCOPY := $(PREFIX)objcopy
|
OBJCOPY := $(PREFIX)objcopy
|
||||||
|
OBJDUMP := $(PREFIX)objdump
|
||||||
AS := $(PREFIX)as
|
AS := $(PREFIX)as
|
||||||
|
|
||||||
LD := $(PREFIX)ld
|
LD := $(PREFIX)ld
|
||||||
@ -75,6 +76,7 @@ SHELL := /bin/bash -o pipefail
|
|||||||
|
|
||||||
ELF = $(ROM:.gba=.elf)
|
ELF = $(ROM:.gba=.elf)
|
||||||
MAP = $(ROM:.gba=.map)
|
MAP = $(ROM:.gba=.map)
|
||||||
|
SYM = $(ROM:.gba=.sym)
|
||||||
|
|
||||||
C_SUBDIR = src
|
C_SUBDIR = src
|
||||||
GFLIB_SUBDIR = gflib
|
GFLIB_SUBDIR = gflib
|
||||||
@ -153,7 +155,7 @@ infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst
|
|||||||
# Disable dependency scanning for clean/tidy/tools
|
# Disable dependency scanning for clean/tidy/tools
|
||||||
# Use a separate minimal makefile for speed
|
# Use a separate minimal makefile for speed
|
||||||
# Since we don't need to reload most of this makefile
|
# Since we don't need to reload most of this makefile
|
||||||
ifeq (,$(filter-out all rom compare modern berry_fix libagbsyscall,$(MAKECMDGOALS)))
|
ifeq (,$(filter-out all rom compare modern berry_fix libagbsyscall syms,$(MAKECMDGOALS)))
|
||||||
$(call infoshell, $(MAKE) -f make_tools.mk)
|
$(call infoshell, $(MAKE) -f make_tools.mk)
|
||||||
else
|
else
|
||||||
NODEP ?= 1
|
NODEP ?= 1
|
||||||
@ -211,6 +213,8 @@ all: rom
|
|||||||
|
|
||||||
tools: $(TOOLDIRS)
|
tools: $(TOOLDIRS)
|
||||||
|
|
||||||
|
syms: $(SYM)
|
||||||
|
|
||||||
$(TOOLDIRS):
|
$(TOOLDIRS):
|
||||||
@$(MAKE) -C $@
|
@$(MAKE) -C $@
|
||||||
|
|
||||||
@ -428,3 +432,10 @@ berry_fix:
|
|||||||
|
|
||||||
libagbsyscall:
|
libagbsyscall:
|
||||||
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN)
|
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN)
|
||||||
|
|
||||||
|
###################
|
||||||
|
### Symbol file ###
|
||||||
|
###################
|
||||||
|
|
||||||
|
$(SYM): $(ELF)
|
||||||
|
$(OBJDUMP) -t $< | sort -u | grep -E "^0[2389]" > $@
|
||||||
|
Loading…
Reference in New Issue
Block a user