diff --git a/Makefile b/Makefile index 095c356e..f63a0567 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: - cd Tools/unix ; make install - cd Source ; make install - cd Source/Images ; make all + cd Tools/unix ; make + cd Source ; make + cd Source/Images ; make clean: cd Tools/unix ; make clean diff --git a/Source/Apps/Makefile b/Source/Apps/Makefile index dad2f4ce..bc549c46 100644 --- a/Source/Apps/Makefile +++ b/Source/Apps/Makefile @@ -2,8 +2,7 @@ OBJECTS = SysGen.com Survey.com \ SysCopy.com Assign.com Format.com Talk.com OSLdr.com Mode.com RTC.com \ Timer.com IntTest.com OTHERS = *.hex *.com -SUBDIRS = XM FDU FAT -# Tune - left out for now +SUBDIRS = XM FDU FAT Tune DEST = ../../Binary/Apps TOOLS =../../Tools diff --git a/Source/BPBIOS/Makefile b/Source/BPBIOS/Makefile index ba1e2694..e774faed 100644 --- a/Source/BPBIOS/Makefile +++ b/Source/BPBIOS/Makefile @@ -21,7 +21,7 @@ $(HD0IMG): $(IMGFILES) $(CPMCP) -f wbw_hd0 $(HD0IMG) $(IMGFILES) $(DISTFILES) 0: zcpr33n.rel zcpr33t.rel: - (cd ZCPR33 ; make install) + (cd ZCPR33 ; make) all:: $(HD0IMG) @@ -40,60 +40,3 @@ clobber:: $(ZXCC) ./bpbuild.com -bpsys.dat 0 < bpbld2.rsp mv bpsys.img bp$(VER).img -# -# -# rem cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:*.dat -# rem cpmcp.exe -f wbw_hd0 ../../Binary/hd0.img *.dat 0: -# -# cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:*.zex -# -# cpmrm.exe -f wbw_hd0 ../../Binary/hd0.img 0:myterm.z3t -# -# goto :eof -# -# :makebp -# -# set VER=%1 -# echo. -# echo Building BPBIOS Variant "%VER%"... -# echo. -# -# copy def-ww-z%VER%.lib def-ww.lib -# rem if exist bpbio-ww.rel del bpbio-ww.rel -# zx ZMAC -BPBIO-WW -/P -# if exist bp%VER%.prn del bp%VER%.prn -# ren bpbio-ww.prn bp%VER%.prn -# -# rem pause -# -# rem BPBUILD attempts to rename bpsys.img -> bpsys.bak -# rem while is is still open. Real CP/M does not care, -# rem but zx fails due to host OS. Below, a temp file -# rem is used to avoid the problematic rename. -# -# if exist bpsys.img del bpsys.img -# if exist bpsys.tmp del bpsys.tmp -# copy bp%VER%.dat bpsys.tmp -# rem bpsys.tmp -> bpsys.img -# zx bpbuild -bpsys.tmp bpsys.img -# zx bpbuild -bpsys.tmp /dev/null ; \ fi -install:: diff --git a/Tools/Makefile.inc b/Tools/Makefile.inc index fc006d59..9614238a 100644 --- a/Tools/Makefile.inc +++ b/Tools/Makefile.inc @@ -53,6 +53,9 @@ CPM=$(TOOLS)/cpm/bin rm -f $$($(CASEFN) $*.hex) ; \ fi +%.hex: %.asm + $(ZXCC) $(CPM)/MAC -$< -$$PO ; \ + %.bin: %.ASM $(ZXCC) $(CPM)/MAC -$< -$$PO $(ZXCC) $(CPM)/MLOAD25 -tmp.bin=$*.hex @@ -105,14 +108,6 @@ all:: $(OBJECTS) @for dir in $(SUBDIRS) ; do \ ( echo "building in `pwd`/$$dir" ; cd "$$dir" ; make all ) ; \ done - -clean:: - -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 - -install:: all @if [ "$(DEST)" ] ; then for file in $(OBJECTS) ; do \ mkdir -p $(DEST) ; \ echo copy $$file to $(DEST) ; \ @@ -123,8 +118,11 @@ install:: all echo copy $$file to $(DOCDEST) ; \ cp $$($(CASEFN) $$file) $(DOCDEST) ; \ done ; fi + +clean:: + -rm -f $$($(CASEFN) make.out *.sym *.lst *.prn *.diff *.dump $(OTHERS) $(filter-out $(NODELETE),$(OBJECTS))) @for dir in $(SUBDIRS) ; do \ - ( echo "install in `pwd`/$$dir" ; cd "$$dir" ; make install ) ; \ + ( echo "cleaning in `pwd`/$$dir" ; cd "$$dir" ; make clean ) ; \ done clobber:: clean diff --git a/Tools/unix/Makefile b/Tools/unix/Makefile index 6e46c303..8df479a5 100644 --- a/Tools/unix/Makefile +++ b/Tools/unix/Makefile @@ -16,11 +16,6 @@ all: (cd $$i ; make all ) \ done -install: - @for i in $(SUBDIRS) ; do \ - (cd $$i ; make install ) \ - done - clobber: @for i in $(SUBDIRS) ; do \ (cd $$i ; make clobber ) \ diff --git a/Tools/unix/bst/Makefile b/Tools/unix/bst/Makefile index 64668f4a..6a6978c4 100644 --- a/Tools/unix/bst/Makefile +++ b/Tools/unix/bst/Makefile @@ -12,15 +12,13 @@ endif DEST = ../../$(UNAME) all: $(DEST) - -$(DEST): - mkdir $(DEST) - -install: -for i in *.$(SUFFIX) ; do \ cp $$i $(DEST)/$$(basename $$i .$(SUFFIX)) ; \ done +$(DEST): + mkdir $(DEST) + clobber: -for i in *.$(SUFFIX) ; do \ rm $(DEST)/$$(basename $$i .$(SUFFIX)) ; \ diff --git a/Tools/unix/cpmtools/Makefile b/Tools/unix/cpmtools/Makefile index 0d83e0ad..12c1f508 100644 --- a/Tools/unix/cpmtools/Makefile +++ b/Tools/unix/cpmtools/Makefile @@ -16,7 +16,8 @@ DEVICEOBJ = device_posix.o OBJECTS = cpmls cpmrm cpmcp cpmchmod cpmchattr mkfs.cpm fsck.cpm -all: $(OBJECTS) +all: $(OBJECTS) $(DEST) + cp $(OBJECTS) $(DEST) cpmls: cpmls.o cpmfs.o getopt.o getopt1.o $(DEVICEOBJ) $(CC) $(LDFLAGS) -o $@ cpmls.o cpmfs.o getopt.o getopt1.o $(DEVICEOBJ) @@ -45,9 +46,6 @@ fsed.cpm: fsed.cpm.o cpmfs.o getopt.o getopt1.o $(DEVICEOBJ) $(DEST): mkdir -p $(DEST) -install: all $(DEST) - cp $(OBJECTS) $(DEST) - clean: -rm -f *.o $(OBJECTS) diff --git a/Tools/unix/uz80as/Makefile b/Tools/unix/uz80as/Makefile index 32e4f46d..d158f4dd 100644 --- a/Tools/unix/uz80as/Makefile +++ b/Tools/unix/uz80as/Makefile @@ -43,14 +43,12 @@ SOURCES = \ mos6502.c \ mc6800.c -all: uz80as +all: uz80as $(DEST) + cp uz80as $(DEST) $(DEST): mkdir -p $(DEST) -install: uz80as $(DEST) - cp uz80as $(DEST) - clobber: clean -rm -f uz80as $(DEST)/uz80as diff --git a/Tools/unix/zx/Makefile b/Tools/unix/zx/Makefile index bbffe497..995d1243 100644 --- a/Tools/unix/zx/Makefile +++ b/Tools/unix/zx/Makefile @@ -16,7 +16,8 @@ OBJECTS = zx.o cpmdrv.o cpmglob.o cpmparse.o cpmredir.o \ drdos.o util.o xlt.o zxbdos.o zxcbdos.o zxdbdos.o z80.o UNUSED = dirent.o -all: zx +all: zx $(DEST) + cp bios.bin zx $(DEST) $(DEST): mkdir -p $(DEST) @@ -27,9 +28,6 @@ clean: clobber: clean -rm -f $(DEST)/zx $(DEST)/bios.bin zx -install: zx $(DEST) - cp bios.bin zx $(DEST) - $(OBJECTS): config.h zx: $(OBJECTS)