forked from PDP-10/its
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
160 lines (128 loc) · 4.84 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
EMULATOR ?= simh
include conf/network
# The directores listed in SRC, DOC, and BIN are put on the sources tape.
SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \
midas _teco_ emacs emacs1 rms klh syshst sra mrc ksc eak gren \
bawden _mail_ l lisp libdoc comlap lspsrc nilcom rwk chprog rg \
inquir acount gz sys decsys ecc alan sail kcc kcc_sy c games archy dcp \
spcwar rwg libmax rat z emaxim rz maxtul aljabr cffk das ell ellen \
jim jm jpg macrak maxdoc maxsrc mrg munfas paulw reh rlb rlb% share \
tensor transl wgd zz graphs lmlib pratt quux scheme gsb ejs mudsys \
draw wl taa tj6 budd sharem ucode rvb kldcp math as imsrc gls demo \
macsym lmcons dmcg hack hibou agb
DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc \
chprog sail draw wl pc tj6 share _glpr_ _xgpr_ inquir mudman system \
xfont maxout ucode moon acount alan channa fonts games graphs humor \
kldcp libdoc lisp _mail_ midas quux scheme manual
BIN = sys2 emacs _teco_ lisp liblsp alan inquir sail comlap c decsys moon \
graphs draw datdrw fonts fonts1 fonts2 games macsym maxer1 maint imlac \
_www_
SUBMODULES = dasm itstar klh10 mldev simh sims supdup tapeutils
# These files are used to create bootable tape images.
RAM = bin/ks10/boot/ram.262
NSALV = bin/ks10/boot/salv.rp06
DSKDMP = bin/ks10/boot/dskdmp.rp06
KLH10=${PWD}/tools/klh10/tmp/bld-ks-its/kn10-ks-its
SIMH=${PWD}/tools/simh/BIN/pdp10
KA10=${PWD}/tools/sims/BIN/ka10
ITSTAR=${PWD}/tools/itstar/itstar
WRITETAPE=${PWD}/tools/tapeutils/tapewrite
MAGFRM=${PWD}/tools/dasm/magfrm
H3TEXT=$(shell cd build; ls h3text.*)
SMF:=$(addprefix tools/,$(addsuffix /.gitignore,$(SUBMODULES)))
OUT=out/$(EMULATOR)
all: $(SMF) $(OUT)/stamp tools/supdup/supdup
out/klh10/stamp out/simh/stamp: $(OUT)/rp0.dsk
touch $@
out/sims/stamp: $(OUT)/rp03.2 $(OUT)/rp03.3
touch $@
$(OUT)/rp0.dsk: build/simh/init $(OUT)/minsys.tape $(OUT)/salv.tape $(OUT)/dskdmp.tape build/build.tcl $(OUT)/sources.tape build/$(EMULATOR)/stamp
PATH=${PWD}/tools/simh/BIN:$$PATH expect -f build/$(EMULATOR)/build.tcl $(IP) $(GW)
$(OUT)/rp03.2 $(OUT)/rp03.3: $(OUT)/ka-minsys.tape $(OUT)/magdmp.tap $(OUT)/sources.tape
expect -f build/$(EMULATOR)/build.tcl $(IP) $(GW)
$(OUT)/magdmp.tap: $(MAGFRM)
cd bin/ka10/boot; $(MAGFRM) @.ddt @.salv > ../../../$@
$(OUT)/minsys.tape: $(ITSTAR)
mkdir -p $(OUT)
cd bin/ks10; $(ITSTAR) -cf ../../$@ _ sys
cd bin; $(ITSTAR) -rf ../$@ sys
$(OUT)/ka-minsys.tape: $(ITSTAR)
mkdir -p $(OUT)
cd bin/ka10; $(ITSTAR) -cf ../../$@ _ sys
cd bin; $(ITSTAR) -rf ../$@ sys
$(OUT)/sources.tape: $(ITSTAR) build/$(EMULATOR)/stamp $(OUT)/syshst/$(H3TEXT)
mkdir -p $(OUT)
rm -f src/*/*~
touch -d 1981-10-06T19:03:37 'bin/emacs/einit.:ej'
touch -d 1981-09-19T21:42:56 'bin/emacs/[pure].162'
touch -d 1981-03-31T20:41:45 'bin/emacs/[prfy].173'
cd src; $(ITSTAR) -cf ../$@ $(SRC)
cd doc; $(ITSTAR) -rf ../$@ $(DOC)
cd bin; $(ITSTAR) -rf ../$@ $(BIN)
cd $(OUT); $(ITSTAR) -rf ../../$@ system syshst
-cd user; $(ITSTAR) -rf ../$@ *
$(OUT)/salv.tape: $(WRITETAPE) $(RAM) $(NSALV)
mkdir -p $(OUT)
$(WRITETAPE) -n 2560 $@ $(RAM) $(NSALV)
$(OUT)/dskdmp.tape: $(WRITETAPE) $(RAM) $(DSKDMP)
mkdir -p $(OUT)
$(WRITETAPE) -n 2560 $@ $(RAM) $(DSKDMP)
start: build/$(EMULATOR)/start
ln -s $< $*
build/klh10/stamp: $(KLH10) start build/klh10/dskdmp.ini
mkdir -p $(OUT)/system
cp=0; ca=0; \
test $(CHAOS) != no && cp=1 && ca=$(CHAOS); \
x=`echo $(IP) | tr . ,`; \
sed -e "s/%IP%/$$x/" \
-e 's/%NETMASK%/$(NETMASK)/' \
-e "s/%CHAOSP%/$$cp/" \
-e "s/%CHAOSA%/$$ca/" < build/klh10/config.203 > $(OUT)/system/config.203
touch $@
build/simh/stamp: $(SIMH) start
mkdir -p $(OUT)/system
cp build/simh/config.* $(OUT)/system
touch $@
build/sims/stamp: $(KA10) start
mkdir -p $(OUT)/system
cp build/sims/config.* $(OUT)/system
touch $@
build/klh10/dskdmp.ini: build/klh10/dskdmp.txt Makefile
cp=';'; ca=''; \
test $(CHAOS) != no && cp='' && ca='myaddr=$(CHAOS) $(CHAFRIENDS)'; \
sed -e 's/%IP%/$(IP)/' \
-e 's/%GW%/$(GW)/' \
-e "s/%CHAOSP%/$$cp/" \
-e "s|%CHAOSA%|$$ca|" < $< > $@
$(OUT)/syshst/$(H3TEXT): build/$(H3TEXT)
mkdir -p $(OUT)/syshst
test $(CHAOS) != no && c="CHAOS $(CHAOS), "; \
sed -e 's/%IP%/$(IP)/' \
-e 's/%HOSTNAME%/$(HOSTNAME)/' \
-e "s/%CHAOS%/$$c/" < $< > $@
cat conf/hosts >> $@
$(KLH10):
cd tools/klh10; \
./autogen.sh; \
mkdir tmp; \
cd tmp; \
export CONFFLAGS_USR=-DKLH10_DEV_DPTM03=0; \
../configure --bindir=${PWD}/build/klh10; \
make base-ks-its; \
make -C bld-ks-its install
$(SIMH):
cd tools/simh; make pdp10
$(KA10):
cd tools/sims; make ka10 TYPE340=y
$(ITSTAR):
cd tools/itstar; make
$(WRITETAPE):
cd tools/tapeutils; make
$(MAGFRM):
cd tools/dasm; make
tools/supdup/supdup:
cd tools/supdup; make
$(SMF):
git submodule update --init `dirname $@`
clean:
rm -rf out start build/*/stamp