Makefiles: tidy and fix up ready for 0x8000 build option
authorAlan <etchedpixels@gmail.com>
Mon, 28 May 2018 16:03:20 +0000 (17:03 +0100)
committerAlan <etchedpixels@gmail.com>
Mon, 28 May 2018 16:03:20 +0000 (17:03 +0100)
Applications/MWC/cmd/Makefile.z80
Applications/MWC/cmd/asz80/Makefile.z80
Applications/SmallC/Makefile.z80
Applications/V7/cmd/Makefile.z80
Applications/V7/cmd/sh/Makefile.z80
Applications/V7/games/Makefile.z80
Applications/netd/Makefile.z80
Applications/ue/Makefile.z80
Applications/util/Makefile.z80

index 0398e4a..5afec63 100644 (file)
@@ -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
index fc39c53..1c5382b 100644 (file)
@@ -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
index fcde409..2ed2e95 100644 (file)
@@ -1,6 +1,6 @@
 .SUFFIXES: .c .rel
 
-CC = fcc -m$(USERCPU)
+CC = fcc -m$(USERCPU) $(Z80_PLATFORM)
 CFLAGS = -DTINY
 COPT = -O2
 
index 05a7d3c..cf0c483 100644 (file)
@@ -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
index 2f403b5..aeeaee8 100644 (file)
@@ -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
index 1d6d072..210e413 100644 (file)
@@ -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
index 02699e9..41b9126 100644 (file)
@@ -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 $@ $^
index cf5441f..cbcca14 100644 (file)
@@ -1,6 +1,6 @@
 .SUFFIXES: .c .rel
 
-CC = fcc -m$(USERCPU)
+CC = fcc -m$(USERCPU) $(Z80_PLATFORM)
 CFLAGS = -c
 COPT = -O2
 
index 633e359..9ce3fc6 100644 (file)
@@ -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