From f30c0aa619a6d24376412d174b756a1f7a71041d Mon Sep 17 00:00:00 2001 From: curt mayer Date: Thu, 13 Feb 2020 18:40:48 -0800 Subject: [PATCH] clean build try --- Binary/Makefile | 6 +++ Source/Apps/Makefile | 9 ---- Source/BL/Makefile | 8 +++ Source/CPM3/Makefile | 109 ++++++++++++++++------------------------ Source/Images/Makefile | 2 + Source/Makefile | 14 ++++-- Source/ZPM3/Makefile | 34 +++++++++++++ Source/ZPM3/zinstal.zpm | Bin 1536 -> 0 bytes Tools/Makefile.inc | 3 +- 9 files changed, 104 insertions(+), 81 deletions(-) create mode 100644 Binary/Makefile create mode 100644 Source/BL/Makefile create mode 100644 Source/ZPM3/Makefile delete mode 100644 Source/ZPM3/zinstal.zpm diff --git a/Binary/Makefile b/Binary/Makefile new file mode 100644 index 00000000..8602cf74 --- /dev/null +++ b/Binary/Makefile @@ -0,0 +1,6 @@ +clean: + +clobber: + rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom + +all: diff --git a/Source/Apps/Makefile b/Source/Apps/Makefile index d71516fc..15f43c62 100644 --- a/Source/Apps/Makefile +++ b/Source/Apps/Makefile @@ -13,12 +13,3 @@ include $(TOOLS)/Makefile.inc %.COM: %.asm $(TASM) $< $@ -foo: - echo treeroot: $(TREEROOT) here: $(HERE) relpath: $(RELPATH1) - -#diff:: -# -for i in $(OBJECTS) ; do \ -# sf=$$($(CASEFN) $$i) ; df=$$($(CASEFN) $(DIFFTO)/$(RELPATH)/$$i) ; \ -# echo diffing $$sf and $$df ; \ -# diff $$sf $$df ; \ -# done diff --git a/Source/BL/Makefile b/Source/BL/Makefile new file mode 100644 index 00000000..121a1051 --- /dev/null +++ b/Source/BL/Makefile @@ -0,0 +1,8 @@ +OBJECTS = bl.bin +DEST = ../../Binary/Apps +TOOLS =../../Tools + +include $(TOOLS)/Makefile.inc + +#%.COM: %.asm +# $(TASM) $< $@ diff --git a/Source/CPM3/Makefile b/Source/CPM3/Makefile index cad1b902..cc6a4d41 100644 --- a/Source/CPM3/Makefile +++ b/Source/CPM3/Makefile @@ -1,85 +1,60 @@ -OBJECTS = cpmldr.com cpm3res.sys cpm3bnk.sys -BIOS = bios3.spr bnkbios3.spr -BIOSOBJS = bioskrnl.rel scb.rel boot.rel chario.rel \ - move.rel drvtbl.rel diskio.rel +# +# this makefile does double duty. it serves as the top level make +# and as the invoked make for the different ways that the cpm3 is built +# +# it does this by overriding OBJECTS in an invoked sub-make +# +OBJECTS = cpmldr.com cpm3res cpm3bnk zpmbios3 +OTHERS = cpmldr.rel biosldr.rel cpm3res.sys cpm3bnk.sys zpmbios3.spr + +TOOLS = ../../Tools +include $(TOOLS)/Makefile.inc + +BIOSOBJS = bioskrnl.rel scb.rel boot.rel chario.rel +BIOSOBJS += move.rel drvtbl.rel diskio.rel COMMA := , NULL := SPACE := $(NULL) $(NULL) BIOSNAMES := $(subst $(SPACE),$(COMMA),$(basename $(BIOSOBJS))) -CONFS = options.lib gencpm.dat -OTHERS = $(CONFS) $(BIOS) $(BIOSOBJS) cpm3.sys biosldr.rel cpmldr.rel -TOOLS=../../Tools -include $(TOOLS)/Makefile.inc +clean:: biosclean + rm -f bios3.spr bnkbios3.spr zpmbios3.spr cpmldr.com gencpm.dat options.lib -cpmldr.com: cpmldr.rel biosldr.rel - $(ZXCC) $(TOOLS)/cpm/bin/LINK -cpmldr[L100]=cpmldr,biosldr - #rm -f biosldr.rel cpmldr.rel - rm -f cpmldr.sym +biosclean: + rm -f $(BIOSOBJS) -cpm3res.sys: - rm *.rel +cpm3res: + make biosclean cp optres.lib options.lib cp genres.dat gencpm.dat - make bios3.spr + make OBJECTS=bios3.spr $(ZXCC) gencpm -auto -display mv cpm3.sys cpm3res.sys - -cpm3bnk.sys: - rm *.rel - cp optres.lib options.lib - cp genres.dat gencpm.dat - make bnkbios3.spr + +cpm3bnk: + make biosclean + cp optbnk.lib options.lib + cp genbnk.dat gencpm.dat + make OBJECTS=bnkbios3.spr $(ZXCC) gencpm -auto -display mv cpm3.sys cpm3bnk.sys +zpmbios3: + make biosclean + cp optzpm.lib options.lib + cp genbnk.dat gencpm.dat + make OBJECTS=zpmbios3.spr + bios3.spr: $(BIOSOBJS) - $(ZXCC) $(TOOLS)/cpm/bin/LINK -bios3[OS]=$(BIOSNAMES) + $(ZXCC) $(CPM)/LINK -bios3[OS]=$(BIOSNAMES) bnkbios3.spr: $(BIOSOBJS) - $(ZXCC) $(TOOLS)/cpm/bin/LINK -bnkbios3[B]=$(BIOSNAMES) + $(ZXCC) $(CPM)/LINK -bnkbios3[B]=$(BIOSNAMES) + +zpmbios3.spr: $(BIOSOBJS) + $(ZXCC) $(TOOLS)/cpm/bin/LINK -zpmbios3[B]=$(BIOSNAMES) + +cpmldr.com: cpmldr.rel biosldr.rel + $(ZXCC) $(TOOLS)/cpm/bin/LINK -cpmldr[L100]=cpmldr,biosldr + rm -f cpmldr.sym -# -# rem Update cpm_hd.img -# echo. -# echo. -# echo *** Update Disk Image *** -# echo. -# for %%f in ( -# cpmldr.com -# ccp.com -# gencpm.com -# genres.dat -# genbnk.dat -# bios3.spr -# bnkbios3.spr -# bdos3.spr -# bnkbdos3.spr -# resbdos3.spr -# cpm3res.sys -# cpm3bnk.sys -# gencpm.dat -# cpm3.sys -# readme.1st -# cpm3fix.pat -# ) do call :upd_img %%f -# -# goto :eof -# -# :upd_img -# echo %1... -# cpmrm.exe -f wbw_hd0 ../../Binary/hd_cpm3.img 0:%1 -# cpmcp.exe -f wbw_hd0 ../../Binary/hd_cpm3.img %1 0:%1 -# goto :eof@echo off -# setlocal -# -# if exist bios3.spr del bios3.spr -# if exist bnkbios3.spr del bnkbios3.spr -# if exist *.rel del *.rel -# if exist cpmldr.com del cpmldr.com -# if exist *.err del *.err -# if exist *.lst del *.lst -# if exist *.sym del *.sym -# if exist *.sys del *.sys -# if exist gencpm.dat del gencpm.dat -# if exist options.lib del options.lib diff --git a/Source/Images/Makefile b/Source/Images/Makefile index 09f5b616..a00615a5 100644 --- a/Source/Images/Makefile +++ b/Source/Images/Makefile @@ -5,6 +5,8 @@ SYSTEMS = cpm_wbw.sys cpm_una.sys zsys_wbw.sys zsys_una.sys FDIMGS = fd_cpm22.img fd_zsdos.img fd_nzcom.img fd_cpm3.img fd_zpm3.img fd_ws4.img HDIMGS = hd_cpm22.img hd_zsdos.img hd_nzcom.img hd_cpm3.img hd_zpm3.img hd_ws4.img OBJECTS = $(FDIMGS) $(HDIMGS) +OTHERS = $(SYSTEMS) + DEST=../../Binary TOOLS = ../../Tools diff --git a/Source/Makefile b/Source/Makefile index 7bbab6e9..8c22dd8f 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -1,6 +1,12 @@ -NOTDONE = \ - Doc CPNET ZCCP ZPM3 -SUBDIRS = \ - Prop Apps CPM22 ZCPR ZCPR-DJ ZSDOS CBIOS CPM3 Forth BPBIOS HBIOS Images +NOTDONE = Doc +SUBDIRS = Prop +SUBDIRS += Apps CPM22 ZCPR ZCPR-DJ ZSDOS CBIOS CPM3 +SUBDIRS += ZPM3 +SUBDIRS += Forth +NOTDONE += Fonts +SUBDIRS += BL +SUBDIRS += Images +SUBDIRS += BPBIOS +SUBDIRS += HBIOS TOOLS = ../Tools include $(TOOLS)/Makefile.inc diff --git a/Source/ZPM3/Makefile b/Source/ZPM3/Makefile new file mode 100644 index 00000000..b58790f9 --- /dev/null +++ b/Source/ZPM3/Makefile @@ -0,0 +1,34 @@ +OBJECTS = ZPMLDR.COM cpm3.sys zinstal.zpm startzpm.com zccp.com +OTHERS = biosldr.rel gencpm.com gencpm.dat bnkbios3.spr +TOOLS =../../Tools +RELPATH = Source/ZPM3 + +include $(TOOLS)/Makefile.inc + +ZPMLDR.COM: zpm3ldr.rel biosldr.rel + $(ZXCC) $(CPM)/LINK -ZPMLDR[L100]=ZPM3LDR,BIOSLDR + +cpm3.sys: gencpm.com gencpm.dat bnkbios3.spr + $(ZXCC) gencpm -auto -display + +bnkbios3.spr: ../CPM3/zpmbios3.spr + cp $< $@ + +gencpm.dat: ../CPM3/genbnk.dat + cp $< $@ + +gencpm.com: ../CPM3/gencpm.com + cp $< $@ + +biosldr.rel: ../CPM3/biosldr.rel + cp $< $@ + +zccp.com: ../ZCCP/ccp.com + cp $< $@ + +zinstal.zpm: ../ZCCP/zinstal.zpm + cp $< $@ + +startzpm.com: ../ZCCP/startzpm.com + cp $< $@ + diff --git a/Source/ZPM3/zinstal.zpm b/Source/ZPM3/zinstal.zpm deleted file mode 100644 index 1a6b2c4c135c490834b26ced0b91b7879c4d4570..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1536 zcmeHG&ubGw6n-q-;DA*8b_-c_tA&C=Wacj|dgabp&gJ|HrV|BYQVl`$aI zxLdWs|J!y`X#u`iCjeh;;x!f3F60tm;)?Q40uuRu)m)WJ>f(-`7=+*Z+-g#xJ%lz Mh16{+*Zm#)33l$uwEzGB diff --git a/Tools/Makefile.inc b/Tools/Makefile.inc index f4e2db96..6815b8fa 100644 --- a/Tools/Makefile.inc +++ b/Tools/Makefile.inc @@ -37,6 +37,7 @@ ZXCC=$(TOOLS)/$(UNAME)/zx TASM=$(TOOLS)/$(UNAME)/uz80as OPENSPIN=$(TOOLS)/$(UNAME)/openspin BSTC=$(TOOLS)/$(UNAME)/bstc +CPMCP=$(TOOLS)/$(UNAME)/cpmcp # # directory containing cpm binaries @@ -102,7 +103,7 @@ all:: $(OBJECTS) done clean:: - -rm -f $$($(CASEFN) *.sym *.lst *.prn $(OTHERS) $(filter-out $(NODELETE),$(OBJECTS))) + -rm -f $$($(CASEFN) make.out *.sym *.lst *.prn *.diff *.dump $(OTHERS) $(filter-out $(NODELETE),$(OBJECTS))) @for dir in $(SUBDIRS) ; do \ ( echo "cleaning in `pwd`/$$dir" ; cd "$$dir" ; make clean ) ; \ done