mirror of
https://github.com/zladx/LADX-Disassembly.git
synced 2024-12-03 18:31:30 +00:00
Merge pull request #554 from Rangi42/rgbasm-version
Fix some unusual build conditions (different RGBDS version, different Bash location)
This commit is contained in:
commit
bd0a04f869
@ -8,7 +8,7 @@ RUN apt-get install -y git curl ssh tar gzip ca-certificates
|
||||
RUN apt-get install -y build-essential bison pkg-config libpng-dev
|
||||
|
||||
# Retrieve rgbds
|
||||
RUN git clone https://github.com/rednex/rgbds.git && \
|
||||
RUN git clone https://github.com/gbdev/rgbds.git && \
|
||||
cd rgbds && \
|
||||
git fetch --tags && git checkout v0.6.0
|
||||
|
||||
|
21
Makefile
21
Makefile
@ -1,7 +1,7 @@
|
||||
.POSIX:
|
||||
.SUFFIXES:
|
||||
.PRECIOUS: %.2bpp oam_%.2bpp
|
||||
.PHONY: default build build-all test test-all all clean
|
||||
.PHONY: default build build-all test test-all all clean tidy
|
||||
|
||||
#
|
||||
# Dev tools binaries and options
|
||||
@ -17,21 +17,6 @@ ASFLAGS := \
|
||||
--halt-without-nop\
|
||||
--preserve-ld
|
||||
|
||||
# Get assembler version
|
||||
ASMVER := $(shell $(ASM) --version | cut -f2 -dv)
|
||||
ASMVERMAJ := $(shell echo $(ASMVER) | cut -f1 -d.)
|
||||
ASMVERMIN := $(shell echo $(ASMVER) | cut -f2 -d.)
|
||||
|
||||
# Abort if RGBDS version is too low and 'clean' is not the only target
|
||||
ifneq ($(MAKECMDGOALS), "clean")
|
||||
ifeq ($(shell expr \
|
||||
\( $(ASMVERMAJ) = 0 \) \&\
|
||||
\( $(ASMVERMIN) \< 5 \)\
|
||||
), 1)
|
||||
$(error Requires RGBDS version >= 0.5.0)
|
||||
endif
|
||||
endif
|
||||
|
||||
LD := $(RGBDS)rgblink
|
||||
LDFLAGS :=
|
||||
|
||||
@ -189,11 +174,13 @@ test-all: build-all
|
||||
|
||||
all: build-all test-all
|
||||
|
||||
clean:
|
||||
tidy:
|
||||
rm -f $(games)
|
||||
rm -f $(games:%.gbc=src/main.%.o)
|
||||
rm -f $(games:.gbc=.map)
|
||||
rm -f $(games:.gbc=.sym)
|
||||
|
||||
clean: tidy
|
||||
rm -f $(gfx_files:.png=.2bpp)
|
||||
rm -f $(azlj_gfx:.png=.2bpp)
|
||||
rm -f $(azlg_gfx:.png=.2bpp)
|
||||
|
@ -29,7 +29,7 @@ Additionally, a wiki includes a [high-level overview of the game engine](https:/
|
||||
|
||||
## Usage
|
||||
|
||||
1. Install Python 3 and [rgbds](https://github.com/rednex/rgbds#1-installing-rgbds) (version >= 0.5.0 required);
|
||||
1. Install Python 3 and [rgbds](https://github.com/gbdev/rgbds#1-installing-rgbds) (version >= 0.5.1 required);
|
||||
2. `make all`.
|
||||
|
||||
This will build both the games and their debug symbols. Once built, use [BGB](https://github.com/zladx/LADX-Disassembly/wiki/Tooling-for-reverse-engineering#bgb) to load the debug symbols into the debugger.
|
||||
|
@ -1,5 +1,8 @@
|
||||
; Root source file for the game.
|
||||
|
||||
; RGBDS version check
|
||||
include "rgbdscheck.asm"
|
||||
|
||||
; Build options
|
||||
include "options.asm"
|
||||
|
||||
|
7
src/rgbdscheck.asm
Normal file
7
src/rgbdscheck.asm
Normal file
@ -0,0 +1,7 @@
|
||||
; Abort if RGBDS version is too low
|
||||
IF(!DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__))
|
||||
FAIL "Requires RGBDS version >= 0.5.1"
|
||||
ENDC
|
||||
IF((__RGBDS_MAJOR__ == 0 && __RGBDS_MINOR__ < 5) || (__RGBDS_MAJOR__ == 0 && __RGBDS_MINOR__ == 5 && __RGBDS_PATCH__ < 1))
|
||||
FAIL "Requires RGBDS version >= 0.5.1, not {d:__RGBDS_MAJOR__}.{d:__RGBDS_MINOR__}.{d:__RGBDS_PATCH__}"
|
||||
ENDC
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash -eu
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Compare the given files to their reference md5 checksum.
|
||||
# The SUMFILE is expected to be in the `checksum` format.
|
||||
@ -6,6 +6,8 @@
|
||||
# Usage:
|
||||
# md5sum.sh SUMFILE FILE [, FILE…]
|
||||
|
||||
set -eu
|
||||
|
||||
# Parse arguments
|
||||
if [[ "$#" -lt 2 ]]; then
|
||||
echo "Invalid number of arguments."
|
||||
|
@ -1,9 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Output statistics about the project progression.
|
||||
# Usage:
|
||||
# tools/stats [--verbose]
|
||||
|
||||
set -e
|
||||
|
||||
VERBOSE=${1:-"disabled"}
|
||||
SOURCE_DIR="src/code"
|
||||
SYM_FILE="azle.sym"
|
||||
|
Loading…
Reference in New Issue
Block a user