From dc15ab9154b3b2c7312de2a47518c06f2ff06e71 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 28 May 2018 17:06:02 +0100 Subject: [PATCH] Makefile: tidy and prepare for 0x8000 build --- Applications/as09/Makefile.z80 | 2 +- Applications/cave/Makefile.z80 | 6 +++--- Applications/cpm/Makefile.z80 | 2 ++ Applications/cursesgames/Makefile.z80 | 9 ++------- Applications/flashrom/Makefile.z80 | 2 +- Applications/ld09/Makefile.z80 | 2 +- Applications/levee/Makefile.z80 | 2 +- 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Applications/as09/Makefile.z80 b/Applications/as09/Makefile.z80 index 5efd6ad7..1435969c 100644 --- a/Applications/as09/Makefile.z80 +++ b/Applications/as09/Makefile.z80 @@ -1,7 +1,7 @@ .SUFFIXES: .c .rel PLATFORM = 6809 -CC = fcc -m$(USERCPU) +CC = fcc -m$(USERCPU) $(Z80_PLATFORM) CFLAGS = -c COPT = -O2 diff --git a/Applications/cave/Makefile.z80 b/Applications/cave/Makefile.z80 index a9716162..52bc73c7 100644 --- a/Applications/cave/Makefile.z80 +++ b/Applications/cave/Makefile.z80 @@ -5,7 +5,7 @@ FCC = fcc -m$(USERCPU) FCCOPTS = -O2 --nostdio -PLATFORM = +Z80_PLATFORM = SRC = advent.c adventdb.c database.c english.c itverb.c lib.c saveadv.c \ turn.c verb.c @@ -22,10 +22,10 @@ advgen: advgen.c cc advgen.c -o ./advgen .c.rel: - $(FCC) $(PLATFORM) $(FCCOPTS) -c $< + $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -c $< advent: $(OBJ) - $(FCC) $(PLATFORM) $(FCCOPTS) -o $@ $(OBJ) + $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -o $@ $(OBJ) clean: rm -f advent advent.db advgen *.rel *.asm *.lst core *.sym *.map *.noi *.lk *.ihx *.tmp *.bin diff --git a/Applications/cpm/Makefile.z80 b/Applications/cpm/Makefile.z80 index 645fd888..8ea07ed4 100644 --- a/Applications/cpm/Makefile.z80 +++ b/Applications/cpm/Makefile.z80 @@ -1,4 +1,6 @@ # +# We can't build this for platforms other than 0 based so don't bother +# with Z80_PLATFORM # BASE=49152 # diff --git a/Applications/cursesgames/Makefile.z80 b/Applications/cursesgames/Makefile.z80 index 9d225eea..2ddf22a7 100644 --- a/Applications/cursesgames/Makefile.z80 +++ b/Applications/cursesgames/Makefile.z80 @@ -1,9 +1,4 @@ -CC = sdcc FCC = ../../Library/tools/fcc -O2 -m$(USERCPU) -PLATFORM = -#PLATFORM = -tzx128 -PROGLOAD=`(cat ../../Kernel/platform/config.h; echo PROGLOAD) | cpp -E | tail -n1` -# Used for programs that make sdcc go boom or take hours ASM_OPT = -l -o -s LINKER_OPT = -mz80 --nostdlib --no-std-crt0 --code-loc $(PROGLOAD) --data-loc 0 BINMAN = ../../Library/tools/binman @@ -20,10 +15,10 @@ all: $(APPS) sizes $(OBJS): %.rel: %.c .c.rel: - $(FCC) $(PLATFORM) -c $< + $(FCC) $(Z80_PLATFORM) -c $< %: %.rel - $(FCC) $(PLATFORM) $(LIBS) $< -o $@ + $(FCC) $(Z80_PLATFORM) $(LIBS) $< -o $@ sizes: $(APPS) ls -l $(APPS) >size.report diff --git a/Applications/flashrom/Makefile.z80 b/Applications/flashrom/Makefile.z80 index 788ef168..194e3215 100644 --- a/Applications/flashrom/Makefile.z80 +++ b/Applications/flashrom/Makefile.z80 @@ -1,7 +1,7 @@ .SUFFIXES: .c .rel FCC = ../../Library/tools/fcc -m$(USERCPU) -FCCOPTS = -O2 +FCCOPTS = -O2 $(Z80_PLATFORM) SRCS = flashrom.c OBJS = $(SRCS:.c=.rel) APPS = $(OBJS:.rel=) diff --git a/Applications/ld09/Makefile.z80 b/Applications/ld09/Makefile.z80 index 56ee8d18..4f9dfd64 100644 --- a/Applications/ld09/Makefile.z80 +++ b/Applications/ld09/Makefile.z80 @@ -1,6 +1,6 @@ .SUFFIXES: .c .rel -CC = fcc -m$(USERCPU) +CC = fcc -m$(USERCPU) $(Z80_PLATFORM) CFLAGS = -c -O2 DEFS = diff --git a/Applications/levee/Makefile.z80 b/Applications/levee/Makefile.z80 index a0fc37ff..f5314dae 100644 --- a/Applications/levee/Makefile.z80 +++ b/Applications/levee/Makefile.z80 @@ -1,4 +1,4 @@ -CC = fcc -m $(USERCPU) +CC = fcc -m $(USERCPU) $(Z80_PLATFORM) .SUFFIXES: .c -vt52.rel -ansi.rel -termcap.rel -- 2.34.1