]> cloudbase.mooo.com Git - z180-stamp-cpm3.git/blobdiff - cbios/Makefile
Make ASCI1 the default console device after cold boot.
[z180-stamp-cpm3.git] / cbios / Makefile
index 39a747a42e874399214860699f4be52247c05f38..0c41e939ffbcc2d94feb81dce58823cabfaf47a1 100644 (file)
@@ -2,13 +2,16 @@
 
 SRC := bioskrnl.180 boot.180 chario.180 drvtbl.180
 SRC += move.180 time.180 mm.180 misc.180 utils.180
-SRC += msgbuf.180 conbuf.180 ascip.180 sdio.180
+SRC += msgbuf.180 conbuf.180 ascip.180 sdio.180 cfio.180
 SRC += scb.180
+ALLSRC := $(SRC) ldrbios.180
 
 INC := config.inc z180reg.inc z180.lib
 
 
 OBJ := $(SRC:.180=.rel)
+ALLOBJ := $(ALLSRC:.180=.rel)
+ALLLST := $(ALLSRC:.180=.lst)
 
 
 $(foreach X,$(subst =,:=,$(subst ",,$(filter VCS_%,\
@@ -33,6 +36,7 @@ DIST_NAME = z180-stamp-cpm3_$(VERS).zip
 DIST_NAME_BIN = z180-stamp-cpm3-bin_$(VERS).zip
 PREFIX = z180-stamp-cpm3_$(VERS)
 
+SHELL = /bin/sh
 CP = cp
 RM = rm -f
 GIT = git
@@ -66,20 +70,23 @@ LN_DATA = F000
 .phony: all
 all: sys
 
-.phony: sys bios map
+.phony: sys bios map ldr
 sys: $(SYSFILE)
 bios: bnkbios3.spr
 map: $(MAPFILE)
+ldr: cpmldr.com
 
+cpmldr.com: cpmldr.rel ldrbios.rel
+       ld80 -P 100 -o $@ $^
 
-$(OBJ):  $(INC)
+$(ALLOBJ):  $(INC)
 boot.rel: version.inc
 
 version.inc: autorevision.cache
        @echo update $@
-       @echo  "defvers macro\r\n\
+       @printf "defvers        macro\r\n\
                db      '$(VERS)'\r\n\
-               endm\r" > $@
+               endm\r\n\032" > $@
 
 
 comma:= ,
@@ -163,21 +170,21 @@ bnkbios3.spr : $(OBJ)
 
 
 .phony: bin-dist
-bin-dist: $(SYSFILE) $(MAPFILE)
-       $(ZIP) -9 $(DIST_NAME_BIN) $(SYSFILE) $(MAPFILE)
+bin-dist: $(SYSFILE) $(MAPFILE) cpmldr.com
+       $(ZIP) -9 $(DIST_NAME_BIN) $(SYSFILE) $(MAPFILE) cpmldr.com
 
 .phony: dist
-dist: $(SYSFILE) $(MAPFILE)
+dist: $(SYSFILE) $(MAPFILE) cpmldr.com
        $(GIT) archive --format=zip --prefix=$(PREFIX)/ -9 -o $(DIST_NAME) HEAD^{tree}
        @mkdir -p $(PREFIX)
        @$(CP) autorevision.cache version.inc $(PREFIX)
-       $(ZIP) -r -9 $(DIST_NAME) $(PREFIX) $(SYSFILE) $(MAPFILE)
+       $(ZIP) -r -9 $(DIST_NAME) $(PREFIX) $(SYSFILE) $(MAPFILE)  cpmldr.com
        @$(RM) -r $(PREFIX)
 
 
 .phony: clean realclean
 clean:
-       $(RM) *.rel *.lst *.sym version.inc
+       $(RM) $(ALLOBJ) $(ALLLST) *.sym
 
 realclean: clean
        $(RM) *.map *.prn *~