forked from z80playground/cpm-fat
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
42 lines (34 loc) · 905 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# The files we wish to generate.
#
all: bdos.bin bios.bin ccp.bin core.bin z80ccp.bin cpm.hex
#
# Cleanup.
#
clean:
rm *.bin *.hex
#
# This is a magic directive which allows GNU Make to perform
# a second expansion of things before running.
#
# In this case we wish to dynamically get the dependencies
# of the given .asm file. We do that by loading a perl-script
# to look for `include "xxx"` references in the input file,
# and processing them recursively.
#
.SECONDEXPANSION:
#
# Convert an .asm file into a .bin file, via pasmo.
#
# The $$(shell ...) part handles file inclusions, so if you
# were to modify "locatoins.asm", for example, all appropriate
# binary files would be rebuilt.
#
%.bin: %.asm $$(shell ./gendep %.asm)
pasmo $< $@
%.hex: %.asm $$(shell ./gendep %.asm)
pasmo $< $@
sync:
cp *.bin dist/CPM/
cp *.hex dist/CPM/
rsync -vazr dist/CPM/ /media/skx/8BITSTACK/CPM/