Makefile: tidy and prepare for 0x8000 build
authorAlan <etchedpixels@gmail.com>
Mon, 28 May 2018 16:06:02 +0000 (17:06 +0100)
committerAlan <etchedpixels@gmail.com>
Mon, 28 May 2018 16:06:02 +0000 (17:06 +0100)
Applications/as09/Makefile.z80
Applications/cave/Makefile.z80
Applications/cpm/Makefile.z80
Applications/cursesgames/Makefile.z80
Applications/flashrom/Makefile.z80
Applications/ld09/Makefile.z80
Applications/levee/Makefile.z80

index 5efd6ad..1435969 100644 (file)
@@ -1,7 +1,7 @@
 .SUFFIXES: .c .rel
 
 PLATFORM = 6809
-CC = fcc -m$(USERCPU)
+CC = fcc -m$(USERCPU) $(Z80_PLATFORM)
 CFLAGS = -c
 COPT = -O2
 
index a971616..52bc73c 100644 (file)
@@ -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
index 645fd88..8ea07ed 100644 (file)
@@ -1,4 +1,6 @@
 #
+#      We can't build this for platforms other than 0 based so don't bother
+# with Z80_PLATFORM
 #
 BASE=49152
 #
index 9d225ee..2ddf22a 100644 (file)
@@ -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
index 788ef16..194e321 100644 (file)
@@ -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=)
index 56ee8d1..4f9dfd6 100644 (file)
@@ -1,6 +1,6 @@
 .SUFFIXES: .c .rel
 
-CC = fcc -m$(USERCPU)
+CC = fcc -m$(USERCPU) $(Z80_PLATFORM)
 CFLAGS = -c -O2
 
 DEFS   =
index a0fc37f..f5314da 100644 (file)
@@ -1,4 +1,4 @@
-CC = fcc -m $(USERCPU)
+CC = fcc -m $(USERCPU) $(Z80_PLATFORM)
 
 .SUFFIXES: .c -vt52.rel -ansi.rel -termcap.rel