diff --git a/023.slideshow/Makefile b/023.slideshow/Makefile index f6fab87..77e694b 100644 --- a/023.slideshow/Makefile +++ b/023.slideshow/Makefile @@ -43,8 +43,7 @@ FLAGS=--height=256 endif SYMBOL_INFO=-M -#LINK_COMMANDLINE=vlink -T link.script.x -brawbin1 $< $(OBJS) $(SYMBOL_INFO) -osec=out/main && cat out/main.load out/main.photo > out/main.bin -LINK_COMMANDLINE=vlink -T link.script.x -brawbin1 $< $(OBJS) $(SYMBOL_INFO) -o out/main.bin +LINKER_OPTIONS=-T link.script.x include ../shared/base.mk diff --git a/024.simple_text/Makefile b/024.simple_text/Makefile index 5e2cad3..5cbd9aa 100644 --- a/024.simple_text/Makefile +++ b/024.simple_text/Makefile @@ -1,8 +1,10 @@ EXAMPLE_NAME=simple_text -USERSTACK_ADDRESS=7fffc # userstack used by bootblock -BASE_ADDRESS=4000 # if you change this you must also change link.script.x - # note: this must be high enough not to conflict with MFMbufE +# userstack used by bootblock +USERSTACK_ADDRESS=7fffc +# if you change this you must also change link.script.x +BASE_ADDRESS=4000 +# note: this must be high enough not to conflict with MFMbufE BOOTBLOCK_ASM=alpine_bootblock.s OBJS=out/init.o out/utils.o out/image.o out/blittext.o out/cpu.o out/blit.o @@ -12,14 +14,14 @@ IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin)) VASM_EXTRA_ARGS= #SYMBOL_INFO=-M -LINK_COMMANDLINE=vlink -T link.script.x -brawbin1 $< $(OBJS) $(SYMBOL_INFO) -o out/main.bin +LINKER_OPTIONS=-T link.script.x include ../shared/base.mk - out/%.bin: ../assets/%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/$* --colors=16 --use-palette palette.pal --full-color-palette-file --output-mask --transparent-color=0,0,0 --output-png + out/simple_image.o: constants.i macros.i out/blittext.o: constants.i macros.i out/blit.o: constants.i macros.i diff --git a/shared/base.mk b/shared/base.mk index f16bcb2..47d738f 100644 --- a/shared/base.mk +++ b/shared/base.mk @@ -57,8 +57,8 @@ PROGRAM_BIN=out/main.bin VASM_EXTRA_BOOTBLOCK_ARGS=-DSHRINKLER=$(SHRINKLER) endif -ifndef LINK_COMMANDLINE -LINK_COMMANDLINE=vlink -Ttext 0x$(BASE_ADDRESS) -brawbin1 $< $(OBJS) -o $@ +ifndef LINKER_OPTIONS +LINKER_OPTIONS=-Ttext 0x$(BASE_ADDRESS) endif all: bin out $(MAKEADF) $(IMAGECON) $(RESIZE) $(DOYNAMITE68K) $(FLOPPY) @@ -124,8 +124,9 @@ out/%.o: %.c -@vc -O0 -S $< -o out/$*-noopt.s > /dev/null 2> /dev/null out/main.bin: out/main.o $(OBJS) - @#-T ../link.script - $(LINK_COMMANDLINE) + vlink $(LINKER_OPTIONS) -brawbin1 $< $(OBJS) -o $@ + @vlink $(LINKER_OPTIONS) -brawbin1 $< $(OBJS) -M -o /tmp/main.bin | grep ", value " | cut -d " " -f3,7 | cut -d "," -f1 > ~/Projects/amiga/debugger.syms + out/shrunk.bin: $(SHRINKLER_EXE) out/main.bin $(SHRINKLEREXE) -d out/main.bin out/shrunk.bin