Skip to content

Commit

Permalink
Minor improvement to messy 'make world' build
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwinans committed Feb 11, 2023
1 parent a0da09f commit 74dd1cc
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.lst
*.sym
mkfs
2063-Z80-cpm.tar
29 changes: 28 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SUBDIRS=\
CLEAN_DIRS=$(SUBDIRS:%=clean-%)
ALL_DIRS=$(SUBDIRS:%=all-%)

.PHONY: all clean $(CLEAN_DIRS) $(ALL_DIRS)
.PHONY: all clean release $(CLEAN_DIRS) $(ALL_DIRS)

all:: $(ALL_DIRS)

Expand All @@ -23,3 +23,30 @@ $(ALL_DIRS):
$(CLEAN_DIRS):
$(MAKE) -C $(@:clean-%=%) clean


REL_FILES=\
LICENSE \
Makefile \
README-SD.md \
README.md \
boot \
cpm22 \
doc \
hello \
lib \
retro \
tests \
filesystem/Makefile \
filesystem/README.md \
filesystem/diskdefs \
filesystem/retro.img \
filesystem/sid \
filesystem/progs/basic/ \
filesystem/progs/example \
filesystem/progs/tms9118 \
filesystem/progs/tty \
filesystem/progs/README.md

release:
rm -f 2063-Z80-cpm.tar
zip -r 2063-Z80-cpm.tar $(REL_FILES)
Binary file modified doc/retro.pdf
Binary file not shown.
50 changes: 31 additions & 19 deletions filesystem/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,40 @@
# To list the files that are in the created image:
# make lsimg

SUBDIRS=\
progs/tty \
progs/example \
progs/tms9118

all: retro.img
CLEAN_DIRS=$(SUBDIRS:%=clean-%)
ALL_DIRS=$(SUBDIRS:%=all-%)

retro.img: ../retro/retro.bin ../cpm22/filesystem/* adventure/adv-B03
.PHONY: all clean $(CLEAN_DIRS) $(ALL_DIRS)

all:: $(ALL_DIRS)

clean:: $(CLEAN_DIRS)

world:: clean all

$(ALL_DIRS):
$(MAKE) -C $(@:all-%=%) all

$(CLEAN_DIRS):
$(MAKE) -C $(@:clean-%=%) clean




all:: retro.img

retro.img: ../retro/retro.bin
rm -f retro.img
mkfs.cpm -f z80-retro-2k-8m -b ../retro/retro.bin retro.img
cpmcp -f z80-retro-2k-8m retro.img ../cpm22/filesystem/* 0:
cpmcp -f z80-retro-2k-8m retro.img assemblers/sid/*.com 0:
cpmcp -f z80-retro-2k-8m retro.img adventure/adv-B03/* 0:

tms9118: retro.img
if [ `ls -1 progs/tms9118/*.com 2>/dev/null | wc -l` -gt 0 ]; then\
cpmcp -f z80-retro-2k-8m retro.img progs/tms9118/*.com 0: ; \
fi

assemblers: retro.img
if [ `ls -1 assemblers/*/* 2>/dev/null | wc -l` -gt 0 ]; then\
cpmcp -f z80-retro-2k-8m retro.img assemblers/*/* 0: ; \
fi
cpmcp -f z80-retro-2k-8m retro.img progs/tms9118/*.com 0:

local: retro.img
if [ `ls -1 local/*/*/* 2>/dev/null | wc -l` -gt 0 ]; then\
Expand All @@ -41,17 +57,13 @@ local: retro.img
fi


world: clean all

adventure/adv-B03: adventure/cpm-advent.zip
unzip -d adventure adventure/cpm-advent.zip

# this is where the adventure game files came from:
adventure/cpm-advent.zip:
wget -P adventure https://ifarchive.org/if-archive/games/cpm/cpm-advent.zip

clean:

clean::
rm -f retro.img
rm -rf `find adventure/* -name \*.zip -o -print`

burn: retro.img
if [ `hostname` = "raspberrypi" ]; then \
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 74dd1cc

Please sign in to comment.