-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
91 lines (70 loc) · 2.38 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
PHONY: all clean cleanbin installbin check_dirs all_chipkit all_beeb all_matchbox all_flex all_sbc09
all: check_dirs all_beeb all_chipkit all_flex all_matchbox all_sbc09
$(MAKE) -C other-tests all
all_chipkit:
# NOTE: MOS/UTILS needs noice to be reinstated for chipkit somehow
# taken out to make room in MOS and moved into UTIL for beeb but
# utils rom doesn't work yet for CHIPKIT
$(MAKE) -C mos all_chipkit
$(MAKE) -C rom-dev all_chipkit
$(MAKE) -C chipkitmk1-tests all_chipkit
$(MAKE) -C games all_chipkit
$(MAKE) -C demos all_chipkit
$(MAKE) -C ssds all_chipkit
ROMPARTS= CHIPKIT/mos/beeb6809-mos/mosrom.bin \
CHIPKIT/rom-dev/BBCBASIC/6809bas.bin \
CHIPKIT/rom-dev/HOSTFS/HOSTFS-ck.bin
ROM= CHIPKIT/ROMIMAGE.BIN
chipkit_rom:
$(MAKE) -C mos/beeb6809-mos all_chipkit
$(MAKE) -C rom-dev/BBCBASIC all_chipkit
$(MAKE) -C rom-dev/HOSTFS all_chipkit
$(MAKE) $(ROM)
$(ROM): $(ROMPARTS)
$(eval T := $(shell mktemp))
touch $(T)
dd if=CHIPKIT/mos/beeb6809-mos/mosrom.bin of=$(T) bs=16384
dd if=CHIPKIT/rom-dev/BBCBASIC/6809bas.bin of=$(T) bs=16384 seek=1 conv=nocreat
dd if=CHIPKIT/rom-dev/HOSTFS/HOSTFS-ck.bin of=$(T) bs=16384 seek=2 conv=nocreat
mv $(T) $(ROM)
all_beeb:
$(MAKE) -C mos all_beeb
$(MAKE) -C rom-dev all_beeb
$(MAKE) -C games all_beeb
$(MAKE) -C demos all_beeb
$(MAKE) -C ssds_beeb all_beeb
$(MAKE) -C hardware-testing all_beeb
$(MAKE) -C flex-port all_beeb
all_matchbox:
$(MAKE) -C rom-dev all_matchbox
all_flex:
$(MAKE) -C rom-dev all_flex
$(MAKE) -C flex-port all_flex
all_sbc09:
$(MAKE) -C rom-dev all_sbc09
$(MAKE) -C mos all_beeb # we need to build the BEEB folder for dependancies
$(MAKE) -C mos all_sbc09
clean:
$(MAKE) -C rom-dev clean
$(MAKE) -C mos clean
$(MAKE) -C chipkitmk1-tests clean
$(MAKE) -C games clean
$(MAKE) -C demos clean
$(MAKE) -C ssds clean
$(MAKE) -C other-tests clean
$(MAKE) -C ssds_beeb clean
$(MAKE) -C hardware-testing clean
$(MAKE) -C flex-port clean
-rm -f ROMIMAGE.BIN
cleanbin:
-rm -rf BEEB
-rm -rf SBC09
-rm -rf FLEX
-rm -rf MATCHBOX
-rm -rf CHIPKIT
# Move files from ./hostfs to ~/hostfs To keep legacy source projects outside of beeb6809 up to date.
installbin:
@echo "Installing files from ./hostfs to $(DEST)..."
@mkdir -p $(DEST) # Ensure the destination directory exists
@rsync -av --progress hostfs/ $(DEST) # Sync files while preserving structure
@echo "Installation complete!"