mirror of
https://github.com/gbdk-2020/gbdk-2020.git
synced 2026-03-03 05:54:33 +01:00
Changes to gbdk-lib/include library headers: * Make NONBANKED / BANKED macros in asm/mos6502/types.h expand to respective keywords instead of being no-ops * Remove force-zero-bank version of INCBIN macros in gbdk/incbin.h in favour of regular version * Make BANK / BANKREF macros in nes/nes.h use appropriate implementation instead of stubs * Add SWITCH_ROM_UNROM macro, and make SWITCH_ROM use it in place of SWITCH_ROM_DUMMY in nes.h * Add stubbed no-op versions for SWITCH_RAM / ENABLE_RAM / DISABLE_RAM in nes.h, to support cross-platform tests changes to gbdk-support tools: * Remove CODEFIXED segment at 0xE000 in lcc/targets.c, relying only on _CODE at 0xC000 * Make ld command use -a nes, to use virtual address translation from sdld_virtual_address_translation.patch * Update bankpack to support "nes" as option (uses GB platform) * Update makebin to perform NES specific bank fix (rotates ROM by one bank, putting first bank as last) * Update png2asset to initialize bank to -1 and write #pragma bank for banks = 0, to remove assumption on bank 0 being the fixed bank Changes to gbdk-lib/libc implementations: * Add implementation of to_far_ptr and call__banked in targets/mos6502/far_ptr.s * Add UNROM bank switching macros in targets/mos6502/nes/mapper_macros.s, and __swith_prg0 function in targets/mos6502/nes/mapper.s * Add banked call support routine ___sdcc_bcall in targets/mos6502/nes/sdcc_bcall.s * Add code to initialize switchable bank to 0 at reset in crt0 Depends on sdcc_mos6502_underscored_areas.patch, sdcc_mos6502_bank_support.patch and sdld_virtual_address_translation.patch applied to SDCC
32 lines
527 B
Makefile
32 lines
527 B
Makefile
# makebin makefile
|
|
|
|
ifndef TARGETDIR
|
|
TARGETDIR = /opt/gbdk
|
|
endif
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
BUILD_OS := Windows_NT
|
|
else
|
|
BUILD_OS := $(shell uname -s)
|
|
endif
|
|
|
|
# Target older macOS version than whatever build OS is for better compatibility
|
|
ifeq ($(BUILD_OS),Darwin)
|
|
export MACOSX_DEPLOYMENT_TARGET=10.10
|
|
endif
|
|
|
|
CC = $(TOOLSPREFIX)gcc
|
|
CFLAGS = -g3 -O0 -Wno-incompatible-pointer-types -DGBDKLIBDIR=\"$(TARGETDIR)\"
|
|
LDFLAGS = -g3
|
|
OBJ = makebin.o
|
|
BIN = makebin
|
|
|
|
all: $(BIN)
|
|
|
|
$(BIN): $(OBJ)
|
|
|
|
clean:
|
|
rm -f *.o $(BIN) *~
|
|
rm -f *.exe
|
|
|