BCPL: move Makefile to Makefile.z80 as per pattern, tidy
authorAlan <etchedpixels@gmail.com>
Mon, 28 May 2018 16:02:24 +0000 (17:02 +0100)
committerAlan <etchedpixels@gmail.com>
Mon, 28 May 2018 16:02:24 +0000 (17:02 +0100)
Applications/BCPL/Makefile.z80 [moved from Applications/BCPL/Makefile with 72% similarity]
Applications/dw/Makefile.z80 [new file with mode: 0644]

similarity index 72%
rename from Applications/BCPL/Makefile
rename to Applications/BCPL/Makefile.z80
index 19e3d55..dfe5fe5 100644 (file)
@@ -4,7 +4,6 @@
 
 FCC = fcc
 FCCOPTS = -O2 #--nostdio
-PLATFORM =
 
 SRC = icint.c iclink.c icex.c blib.c icintv.c blibv.c
 OBJ = $(SRC:.c=.rel) blibv.o icintv.o
@@ -20,19 +19,19 @@ blibv.rel:blib.rel
 icintv.rel:icint.rel
 
 .c.rel:
-       $(FCC) $(PLATFORM) $(FCCOPTS) -c $<
+       $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -c $<
 
 icint:  icint.rel blib.rel
-       $(FCC) $(PLATFORM) $(FCCOPTS) -o $@ icint.rel  blib.rel
+       $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -o $@ icint.rel  blib.rel
 
 icintv: icintv.rel blibv.rel
-       $(FCC) $(PLATFORM) $(FCCOPTS) -o $@ icintv.rel blibv.rel
+       $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -o $@ icintv.rel blibv.rel
 
 iclink:        iclink.rel blib.rel
-       $(FCC) $(PLATFORM) $(FCCOPTS) -o $@ icex.rel  blib.rel
+       $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -o $@ icex.rel  blib.rel
 
 icex:  icex.rel blib.rel
-       $(FCC) --nostdio $(PLATFORM) $(FCCOPTS) -o $@ icex.rel  blib.rel
+       $(FCC) --nostdio $(Z80_PLATFORM) $(FCCOPTS) -o $@ icex.rel  blib.rel
 
 sizes: $(APPS)
        ls -l $(APPS) > size.report
diff --git a/Applications/dw/Makefile.z80 b/Applications/dw/Makefile.z80
new file mode 100644 (file)
index 0000000..96732cb
--- /dev/null
@@ -0,0 +1,48 @@
+FCC = ../../Library/tools/fcc
+FCCOPTS = -O2
+
+.SUFFIXES: .c .rel
+
+SRCSNS =
+
+SRCS  = dw.c dwgetty.c dwterm.c
+
+SRCSBAD = 
+
+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=)
+
+all: $(APPS) sizes
+
+
+$(APPSNS): OPTS = --nostdio
+
+$(OBJS): %.rel: %.c
+
+$(OBJSNS): %.rel: %.c
+
+$(OBJSBAD): %.rel: %.c
+       $(FCC) $(Z80_PLATFORM) -c $<
+
+.c.rel:
+       $(FCC) $(Z80_PLATFORM) $(FCCOPTS) -c $<
+
+%: %.rel
+       $(FCC) $(Z80_PLATFORM) $(OPTS) $< -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
+
+rmbak:
+       rm -f *~ core
+