git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit a2f4ed758312adefe771a5c38ad545e2a8651be5
parent 2af6990063f63b81b70d130844f503fd61ba6484
Author: Toxa <56631470+untoxa@users.noreply.github.com>
Date:   Wed, 17 Feb 2021 22:07:56 +0300

Merge pull request #143 from bbbbbr/develop_autobank_example_rel_fix1

Examples: Bankpack: Interim fix for build failure
Diffstat:
Mgbdk-lib/examples/gb/banks_autobank/Makefile27++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/gbdk-lib/examples/gb/banks_autobank/Makefile b/gbdk-lib/examples/gb/banks_autobank/Makefile @@ -1,4 +1,5 @@ -CC = ../../../bin/lcc -Wa-l -Wl-m +LCC = ../../../bin/lcc -Wa-l -Wl-m +BANKPACK = ../../../bin/bankpack # CFLAGS = @@ -11,7 +12,7 @@ OBJS = $(CSOURCES:%.c=%.o) $(ASMSOURCES:%.c=%.o) # Process: .c and .s files -> .o -> (bankpack) -> .rel -> (linker) ... -> .gb # -# In this makefile autobanked .o files get saved as .rel files (-Wb-ext=.rel) +# In this makefile autobanked .o files get converted to .rel files (-ext=.rel) # which will be passed to the linker instead of .o files. # # This allows correct packing every time, even @@ -25,27 +26,31 @@ make.bat: Makefile @make -sn | sed y/\\//\\\\/ | grep -v make >> make.bat %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< + $(LCC) $(CFLAGS) -c -o $@ $< %.o: %.s - $(CC) $(CFLAGS) -c -o $@ $< + $(LCC) $(CFLAGS) -c -o $@ $< %.s: %.c - $(CC) $(CFLAGS) -S -o $@ $< + $(LCC) $(CFLAGS) -S -o $@ $< -# Link the compiled object files into a autobanks.gb ROM file -# -autobank : turns on auto banking -# -Wb-v : prints out assigned bank info -# -Wb-ext=.rel : set output extension for autobanked files to .rel +# Auto-bank the .o files into .rel files +# (called with $(OBJS), which is .o files) +# -v : prints out assigned bank info +# -ext=.rel : set output extension for autobanked files to .rel +# +# Link the compiled object files into a autobanks.gb ROM file +# (called with $(OBJS_AUTOBANKED), which is .rel files) # -Wl-yo4 : Use 4 ROM banks # -Wl-ya4 : Use 4 RAM banks # -Wl-yt19 : Use MBC5 cartridge type $(BINS): $(OBJS) - $(CC) $(CFLAGS) -autobank -Wb-ext=.rel -Wb-v -Wl-yt19 -Wl-yo4 -Wl-ya4 -o $(BINS) $(OBJS_AUTOBANKED) + $(BANKPACK) -ext=.rel -v -yt19 $(OBJS) + $(LCC) $(CFLAGS) -Wl-yt19 -Wl-yo4 -Wl-ya4 -o $(BINS) $(OBJS_AUTOBANKED) # ./romusage autobanks.map -g clean: - rm -f *.o *.lst *.map *.gb *.ihx *.sym *.cdb *.adb *.asm + rm -f *.o *.lst *.map *.gb *.ihx *.sym *.cdb *.adb *.asm *.rel # For lcc linker option: -Wl-ytN where N is one of the numbers below

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.