From 33a55eefa00c363b946892ba8606d18cc6d75db9 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 29 Apr 2018 23:06:47 +0100 Subject: [PATCH] z80: Add support for Rabbit as well as Z80 processors --- Applications/MWC/cmd/Makefile.z80 | 6 +----- Applications/MWC/cmd/asz80/Makefile.z80 | 3 +-- Applications/SmallC/Makefile.z80 | 2 +- Applications/V7/cmd/Makefile.z80 | 5 +---- Applications/V7/cmd/sh/Makefile.z80 | 3 +-- Applications/V7/games/Makefile.z80 | 6 +----- Applications/as09/Makefile.z80 | 2 +- Applications/cave/Makefile.z80 | 2 +- Applications/flashrom/Makefile.z80 | 2 +- Applications/games/Makefile.z80 | 7 ++----- Applications/ld09/Makefile.z80 | 2 +- Applications/netd/Makefile.z80 | 4 ++-- Applications/util/Makefile.z80 | 6 +----- 13 files changed, 15 insertions(+), 35 deletions(-) diff --git a/Applications/MWC/cmd/Makefile.z80 b/Applications/MWC/cmd/Makefile.z80 index 206cf4d5..0398e4a6 100644 --- a/Applications/MWC/cmd/Makefile.z80 +++ b/Applications/MWC/cmd/Makefile.z80 @@ -1,8 +1,4 @@ -CC = sdcc -ASM = sdasz80 -AR = sdar -LINKER = sdcc -FCC = ../../../Library/tools/fcc +FCC = ../../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 PLATFORM = #PLATFORM = -tzx128 diff --git a/Applications/MWC/cmd/asz80/Makefile.z80 b/Applications/MWC/cmd/asz80/Makefile.z80 index 7dd39d17..b3c73545 100644 --- a/Applications/MWC/cmd/asz80/Makefile.z80 +++ b/Applications/MWC/cmd/asz80/Makefile.z80 @@ -1,5 +1,4 @@ -LINKER = sdcc -FCC = ../../../../Library/tools/fcc -O2 -DTARGET_Z80 +FCC = ../../../../Library/tools/fcc -m($USERCPU) -O2 -DTARGET_Z80 PLATFORM = #PLATFORM = -tzx128 diff --git a/Applications/SmallC/Makefile.z80 b/Applications/SmallC/Makefile.z80 index aa79af99..fcde4099 100644 --- a/Applications/SmallC/Makefile.z80 +++ b/Applications/SmallC/Makefile.z80 @@ -1,6 +1,6 @@ .SUFFIXES: .c .rel -CC = fcc +CC = fcc -m$(USERCPU) CFLAGS = -DTINY COPT = -O2 diff --git a/Applications/V7/cmd/Makefile.z80 b/Applications/V7/cmd/Makefile.z80 index e19e33e7..05a7d3c5 100644 --- a/Applications/V7/cmd/Makefile.z80 +++ b/Applications/V7/cmd/Makefile.z80 @@ -1,7 +1,4 @@ -CC = fcc -ASM = sdasz80 -LINKER = ../../../Library/tools/fcc -FCC = ../../../Library/tools/fcc +FCC = ../../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 PLATFORM = #PLATFORM = -tzx128 diff --git a/Applications/V7/cmd/sh/Makefile.z80 b/Applications/V7/cmd/sh/Makefile.z80 index 7e7973b4..2f403b5a 100644 --- a/Applications/V7/cmd/sh/Makefile.z80 +++ b/Applications/V7/cmd/sh/Makefile.z80 @@ -1,5 +1,4 @@ -LINKER = sdcc -FCC = ../../../../Library/tools/fcc -O2 -fsigned-char +FCC = ../../../../Library/tools/fcc -m $(USERCPU) -O2 -fsigned-char PLATFORM = #PLATFORM = -tzx128 diff --git a/Applications/V7/games/Makefile.z80 b/Applications/V7/games/Makefile.z80 index fa19f1c8..1d6d0722 100644 --- a/Applications/V7/games/Makefile.z80 +++ b/Applications/V7/games/Makefile.z80 @@ -1,8 +1,4 @@ -CC = sdcc -ASM = sdasz80 -AR = sdar -LINKER = sdcc -FCC = ../../../Library/tools/fcc +FCC = ../../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 PLATFORM = #PLATFORM = -tzx128 diff --git a/Applications/as09/Makefile.z80 b/Applications/as09/Makefile.z80 index 0f11185f..5efd6ad7 100644 --- a/Applications/as09/Makefile.z80 +++ b/Applications/as09/Makefile.z80 @@ -1,7 +1,7 @@ .SUFFIXES: .c .rel PLATFORM = 6809 -CC = fcc +CC = fcc -m$(USERCPU) CFLAGS = -c COPT = -O2 diff --git a/Applications/cave/Makefile.z80 b/Applications/cave/Makefile.z80 index 2527e85d..a9716162 100644 --- a/Applications/cave/Makefile.z80 +++ b/Applications/cave/Makefile.z80 @@ -3,7 +3,7 @@ # do endian swapping if building on PC for 6809 # -FCC = fcc +FCC = fcc -m$(USERCPU) FCCOPTS = -O2 --nostdio PLATFORM = diff --git a/Applications/flashrom/Makefile.z80 b/Applications/flashrom/Makefile.z80 index 69f02ffd..788ef168 100644 --- a/Applications/flashrom/Makefile.z80 +++ b/Applications/flashrom/Makefile.z80 @@ -1,6 +1,6 @@ .SUFFIXES: .c .rel -FCC = ../../Library/tools/fcc +FCC = ../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 SRCS = flashrom.c OBJS = $(SRCS:.c=.rel) diff --git a/Applications/games/Makefile.z80 b/Applications/games/Makefile.z80 index d47f5ef4..c62c0aa2 100644 --- a/Applications/games/Makefile.z80 +++ b/Applications/games/Makefile.z80 @@ -1,15 +1,12 @@ CC = sdcc -ASM = sdasz80 -AR = sdar -LINKER = sdcc -FCC = ../../Library/tools/fcc -O2 +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 -CC_CRAP = -mz80 --std-c99 -c --opt-code-size --max-allocs-per-node 1000 -I../../Library/include +CC_CRAP = -m$(USERCPU) --std-c99 -c --opt-code-size --max-allocs-per-node 1000 -I../../Library/include ASM_OPT = -l -o -s LINKER_OPT = -mz80 --nostdlib --no-std-crt0 --code-loc $(PROGLOAD) --data-loc 0 BINMAN = ../../Library/tools/binman diff --git a/Applications/ld09/Makefile.z80 b/Applications/ld09/Makefile.z80 index f859d4d7..56ee8d18 100644 --- a/Applications/ld09/Makefile.z80 +++ b/Applications/ld09/Makefile.z80 @@ -1,6 +1,6 @@ .SUFFIXES: .c .rel -CC = fcc +CC = fcc -m$(USERCPU) CFLAGS = -c -O2 DEFS = diff --git a/Applications/netd/Makefile.z80 b/Applications/netd/Makefile.z80 index 7c2da1e1..02699e9a 100644 --- a/Applications/netd/Makefile.z80 +++ b/Applications/netd/Makefile.z80 @@ -13,13 +13,13 @@ OPTS = -DNETD_LITTLE_ENDIAN all: $(APPS) netd-slip: $(OBJS) - fcc -o netd netd.rel uip.rel uiplib.rel timer.rel clock-arch.rel \ + fcc -m$(USERCPU) -o netd netd.rel uip.rel uiplib.rel timer.rel clock-arch.rel \ uip_arp.rel slip.rel $(OBJS): %.rel: %.c .c.rel: - fcc $(PLATFORM) $(OPTS) -c $< + fcc -m$(USERCPU) $(PLATFORM) $(OPTS) -c $< telnet: telnet.rel gethostbyname.rel fcc -o $@ $^ diff --git a/Applications/util/Makefile.z80 b/Applications/util/Makefile.z80 index 481772b2..bf8adf49 100644 --- a/Applications/util/Makefile.z80 +++ b/Applications/util/Makefile.z80 @@ -1,8 +1,4 @@ -CC = sdcc -ASM = sdasz80 -AR = sdar -LINKER = sdcc -FCC = ../../Library/tools/fcc +FCC = ../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 PLATFORM = #PLATFORM = -tzx128 -- 2.34.1