From 1bdaf706aa4983f2737c22daf347cb8a9632a040 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 28 May 2018 17:03:20 +0100 Subject: [PATCH] Makefiles: tidy and fix up ready for 0x8000 build option --- Applications/MWC/cmd/Makefile.z80 | 10 +++------- Applications/MWC/cmd/asz80/Makefile.z80 | 12 +++++------- Applications/SmallC/Makefile.z80 | 2 +- Applications/V7/cmd/Makefile.z80 | 10 +++------- Applications/V7/cmd/sh/Makefile.z80 | 10 +++------- Applications/V7/games/Makefile.z80 | 12 +++--------- Applications/netd/Makefile.z80 | 4 ++-- Applications/ue/Makefile.z80 | 2 +- Applications/util/Makefile.z80 | 16 ++++++---------- 9 files changed, 27 insertions(+), 51 deletions(-) diff --git a/Applications/MWC/cmd/Makefile.z80 b/Applications/MWC/cmd/Makefile.z80 index 0398e4a6..5afec636 100644 --- a/Applications/MWC/cmd/Makefile.z80 +++ b/Applications/MWC/cmd/Makefile.z80 @@ -1,9 +1,5 @@ -FCC = ../../../Library/tools/fcc -m$(USERCPU) +FCC = ../../../Library/tools/fcc -m$(USERCPU) $(Z80_PLATFORM) FCCOPTS = -O2 -PLATFORM = -#PLATFORM = -tzx128 - -PROGLOAD=`(cat ../../Kernel/platform/config.h; echo PROGLOAD) | cpp -E | tail -n1` .SUFFIXES: .c .rel .y @@ -43,13 +39,13 @@ find.c: find.y $(FCC) $(PLATFORM) $(FCCOPTS) -c $< %: %.rel - $(FCC) $(PLATFORM) $(OPTS) $< -o $@ + $(FCC) $(PLATFORM) $(FCCOPTS) $< -o $@ sizes: $(APPS) ls -l $(APPS) >size.report clean: - rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report + rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.y *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report rmbak: rm -f *~ core diff --git a/Applications/MWC/cmd/asz80/Makefile.z80 b/Applications/MWC/cmd/asz80/Makefile.z80 index fc39c536..1c5382b9 100644 --- a/Applications/MWC/cmd/asz80/Makefile.z80 +++ b/Applications/MWC/cmd/asz80/Makefile.z80 @@ -1,6 +1,4 @@ FCC = ../../../../Library/tools/fcc -m$(USERCPU) -O2 -DTARGET_Z80 -PLATFORM = -#PLATFORM = -tzx128 .SUFFIXES: .c .rel @@ -15,25 +13,25 @@ LIBS = ../../../../Library/libs/syslib.lib all: as nm ld as: $(OBJS) - $(FCC) $(PLATFORM) $(OBJS) -o $@ + $(FCC) $(Z80_PLATFORM) $(OBJS) -o $@ nm.c: obj.h nm: nm.rel - $(FCC) $(PLATFORM) nm.rel -o $@ + $(FCC) $(Z80_PLATFORM) nm.rel -o $@ ld.c: obj.h ld: ld.rel - $(FCC) $(PLATFORM) ld.rel -o $@ + $(FCC) $(Z80_PLATFORM) ld.rel -o $@ $(OBJS): $(INCS) .c.rel: - $(FCC) $(PLATFORM) -c $< + $(FCC) $(Z80_PLATFORM) -c $< %: %.rel - $(FCC) $(PLATFORM) $< -o $@ + $(FCC) $(Z80_PLATFORM) $< -o $@ clean: rm -f $(OBJS) as $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin diff --git a/Applications/SmallC/Makefile.z80 b/Applications/SmallC/Makefile.z80 index fcde4099..2ed2e956 100644 --- a/Applications/SmallC/Makefile.z80 +++ b/Applications/SmallC/Makefile.z80 @@ -1,6 +1,6 @@ .SUFFIXES: .c .rel -CC = fcc -m$(USERCPU) +CC = fcc -m$(USERCPU) $(Z80_PLATFORM) CFLAGS = -DTINY COPT = -O2 diff --git a/Applications/V7/cmd/Makefile.z80 b/Applications/V7/cmd/Makefile.z80 index 05a7d3c5..cf0c4831 100644 --- a/Applications/V7/cmd/Makefile.z80 +++ b/Applications/V7/cmd/Makefile.z80 @@ -1,9 +1,5 @@ FCC = ../../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 -PLATFORM = -#PLATFORM = -tzx128 - -PROGLOAD=`(cat ../../../Kernel/platform/config.h; echo PROGLOAD) | cpp -E | tail -n1` .SUFFIXES: .c .rel @@ -45,13 +41,13 @@ $(OBJSNS): %.rel: %.c $(OBJSTC): %.rel: %.c $(OBJSBAD): %.rel: %.c - $(FCC) $(PLATFORM) -c $< + $(FCC) $(Z80_PLATFORM) -c $< .c.rel: - $(FCC) $(PLATFORM) $(FCCOPTS) -c $< + $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -c $< %: %.rel - $(FCC) $(PLATFORM) $(OPTS) $< -o $@ + $(FCC) $(Z80_PLATFORM) $(OPTS) $< -o $@ sizes: $(APPS) ls -l $(APPS) >size.report diff --git a/Applications/V7/cmd/sh/Makefile.z80 b/Applications/V7/cmd/sh/Makefile.z80 index 2f403b5a..aeeaee8b 100644 --- a/Applications/V7/cmd/sh/Makefile.z80 +++ b/Applications/V7/cmd/sh/Makefile.z80 @@ -1,6 +1,4 @@ FCC = ../../../../Library/tools/fcc -m $(USERCPU) -O2 -fsigned-char -PLATFORM = -#PLATFORM = -tzx128 .SUFFIXES: .c .rel @@ -12,20 +10,18 @@ INCS = brkincr.h ctype.h defs.h mac.h mode.h name.h stak.h sym.h timeout.h OBJS = $(SRCS:.c=.rel) -LIBS = ../../../../Library/libs/syslib.lib - all: sh sh: $(OBJS) - $(FCC) $(PLATFORM) $(OBJS) -o $@ + $(FCC) $(Z80_PLATFORM) $(OBJS) -o $@ $(OBJS): $(INCS) .c.rel: - $(FCC) $(PLATFORM) -c $< + $(FCC) $(Z80_PLATFORM) -c $< %: %.rel - $(FCC) $(PLATFORM) $< -o $@ + $(FCC) $(Z80_PLATFORM) $< -o $@ clean: rm -f $(OBJS) sh $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin diff --git a/Applications/V7/games/Makefile.z80 b/Applications/V7/games/Makefile.z80 index 1d6d0722..210e4137 100644 --- a/Applications/V7/games/Makefile.z80 +++ b/Applications/V7/games/Makefile.z80 @@ -1,9 +1,5 @@ FCC = ../../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 -PLATFORM = -#PLATFORM = -tzx128 - -PROGLOAD=`(cat ../../../Kernel/platform/config.h; echo PROGLOAD) | cpp -E | tail -n1` .SUFFIXES: .c .rel @@ -15,8 +11,6 @@ OBJS = $(SRCS:.c=.rel) OBJSNS = $(SRCSNS:.c=.rel) OBJSBAD = $(SRCSBAD:.c=.rel) -LIBS = ../../../Library/libs/syslib.lib - APPSNS = $(OBJSNS:.rel=) APPS = $(OBJS:.rel=) $(OBJSBAD:.rel=) $(OBJSNS:.rel=) @@ -31,13 +25,13 @@ $(OBJS): %.rel: %.c $(OBJSNS): %.rel: %.c $(OBJSBAD): %.rel: %.c - $(FCC) $(PLATFORM) -c $< + $(FCC) $(Z80_PLATFORM) -c $< .c.rel: - $(FCC) $(PLATFORM) $(FCCOPTS) -c $< + $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -c $< %: %.rel - $(FCC) $(PLATFORM) $(OPTS) $< -o $@ + $(FCC) $(Z80_PLATFORM) $(OPTS) $< -o $@ sizes: $(APPS) ls -l $(APPS) >size.report diff --git a/Applications/netd/Makefile.z80 b/Applications/netd/Makefile.z80 index 02699e9a..41b91261 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 -m$(USERCPU) -o netd netd.rel uip.rel uiplib.rel timer.rel clock-arch.rel \ + fcc -m$(USERCPU) $(Z80_PLATFORM) -o netd netd.rel uip.rel uiplib.rel timer.rel clock-arch.rel \ uip_arp.rel slip.rel $(OBJS): %.rel: %.c .c.rel: - fcc -m$(USERCPU) $(PLATFORM) $(OPTS) -c $< + fcc -m$(USERCPU) $(Z80_PLATFORM) $(OPTS) -c $< telnet: telnet.rel gethostbyname.rel fcc -o $@ $^ diff --git a/Applications/ue/Makefile.z80 b/Applications/ue/Makefile.z80 index cf5441f0..cbcca14a 100644 --- a/Applications/ue/Makefile.z80 +++ b/Applications/ue/Makefile.z80 @@ -1,6 +1,6 @@ .SUFFIXES: .c .rel -CC = fcc -m$(USERCPU) +CC = fcc -m$(USERCPU) $(Z80_PLATFORM) CFLAGS = -c COPT = -O2 diff --git a/Applications/util/Makefile.z80 b/Applications/util/Makefile.z80 index 633e359d..9ce3fc6c 100644 --- a/Applications/util/Makefile.z80 +++ b/Applications/util/Makefile.z80 @@ -1,9 +1,5 @@ FCC = ../../Library/tools/fcc -m$(USERCPU) FCCOPTS = -O2 -PLATFORM = -#PLATFORM = -tzx128 - -PROGLOAD=`(cat ../../Kernel/platform/config.h; echo PROGLOAD) | cpp -E | tail -n1` .SUFFIXES: .c .rel @@ -131,22 +127,22 @@ $(OBJS): %.rel: %.c $(OBJSNS): %.rel: %.c $(OBJSBAD): %.rel: %.c - $(FCC) $(PLATFORM) -c $< + $(FCC) $(Z80_PLATFORM) -c $< .c.rel: - $(FCC) $(PLATFORM) $(FCCOPTS) -c $< + $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -c $< tchelp: tchelp.rel - $(FCC) $(PLATFORM) $(OPTS) $< -o $@ -ltermcap + $(FCC) $(Z80_PLATFORM) $(OPTS) $< -o $@ -ltermcap tget: tget.rel - $(FCC) $(PLATFORM) $(OPTS) $< -o $@ -ltermcap + $(FCC) $(Z80_PLATFORM) $(OPTS) $< -o $@ -ltermcap vile: vile.rel - $(FCC) $(PLATFORM) $(OPTS) $< -o $@ -lcurses -ltermcap + $(FCC) $(Z80_PLATFORM) $(OPTS) $< -o $@ -lcurses -ltermcap %: %.rel - $(FCC) $(PLATFORM) $(OPTS) $< -o $@ + $(FCC) $(Z80_PLATFORM) $(OPTS) $< -o $@ sizes: $(APPS) ls -l $(APPS) >size.report -- 2.34.1