-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 cfio.180
+SRC := bioskrnl.180 boot.180 chario.180
+SRC += msgbuf.180 conbuf.180 ascii.180
+SRC += drvtbl.180 sdio.180 cfio.180 stampf.180
+SRC += move.180 time.180 fifo.180 utils.180 misc.180 mm.180
SRC += scb.180
ALLSRC := $(SRC) ldrbios.180
-INC := config.inc z180reg.inc z180.lib
+INC := config.inc z180reg.inc z180.lib ioctl.inc
+EXTRA_DIST := autorevision.cache version.inc
OBJ := $(SRC:.180=.rel)
ALLOBJ := $(ALLSRC:.180=.rel)
VERS := $(shell echo "$(VCS_TAG)" | sed -e 's/hexrel-/0./g' -e 's/^v//g')
ifneq ($(VCS_TICK),0)
- VERS := $(VERS).$(VCS_TICK)
+ VERS := $(VERS)-$(VCS_TICK)
endif
ifneq ($(VCS_BRANCH),master)
VERS := $(VERS)-$(VCS_BRANCH)
SYSFILE = cpm3_$(VERS).sys
MAPFILE = bnkbios3_$(VERS).map
+ASYMFILE = bnkbios3_$(VERS).sym
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
#.suffixes: .180 .rel
.phony: all
-all: sys cpmldr.com
+all: sys
-.phony: sys bios map
+.phony: sys bios map asym ldr
sys: $(SYSFILE)
bios: bnkbios3.spr
map: $(MAPFILE)
-
+asym: $(ASYMFILE)
+ldr: cpmldr.com
cpmldr.com: cpmldr.rel ldrbios.rel
ld80 -P 100 -o $@ $^
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:= ,
$(MAPFILE): $(SYSFILE)
ld80 -o /dev/null -ms $@ -P $(PSEG) -D $(DSEG) $(OBJ)
+$(ASYMFILE): $(SYSFILE)
+ cvtsym -o $@ -b $< bnkbios3.sym
+
$(SYSFILE): bnkbios3.spr gencpm.dat
zxcc gencpm -AUTO
.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) $(ASYMFILE) cpmldr.com
.phony: dist
-dist: $(SYSFILE) $(MAPFILE)
+dist: $(SYSFILE) $(MAPFILE) $(ASYMFILE) 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)
+ @$(CP) -p $(EXTRA_DIST) $(PREFIX)
+ $(ZIP) -r -9 $(DIST_NAME) $(PREFIX) $(SYSFILE) $(MAPFILE) $(ASYMFILE) cpmldr.com
@$(RM) -r $(PREFIX)
.phony: clean realclean
clean:
- $(RM) $(ALLOBJ) $(ALLLST) *.sym version.inc
+ $(RM) $(ALLOBJ) $(ALLLST) *.sym
realclean: clean
$(RM) *.map *.prn *~