Changes to Makefile.in.
︙ | | |
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
|
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
|
+
-
-
-
+
+
+
-
-
-
-
-
+
+
-
+
|
# Some *.py files are generated by Autosetup, so they need different
# handling than the other libraries for the out-of-tree build case.
PIDP8I_DIRS := lib/pidp8i/dirs.py
PIDP8I_DIN := @srcdir@/$(PIDP8I_DIRS).in
GENNED_PY := \
lib/pidp8i/__init__.py \
lib/pidp8i/ips.py \
lib/pidp8i/os8opts.py \
$(PIDP8I_DIRS)
SIMH_PY := lib/simh.py
SIMH_PY_SRC := @srcdir@/$(SIMH_PY)
MKOS8 := @srcdir@/libexec/mkos8
MKOS8_LIB := @srcdir@/lib/mkos8
MKOS8_PY := \
OS8RUN = bin/os8-run
OS8SCRIPT := lib/os8script.py
OS8CP := bin/os8-cp
$(MKOS8_LIB)/__init__.py \
$(MKOS8_LIB)/argparser.py \
lib/mkos8/opts.py
MKOS8_PY_ALL := $(GENNED_PY) $(MKOS8_PY) $(SIMH_PY_SRC)
MKOS8_SRCS := $(MKOS8) $(MKOS8_PY_ALL) $(PIDP8I_DIN)
OS8RUN_PY_ALL := $(GENNED_PY) $(OS8SCRIPT) $(SIMH_PY_SRC)
OS8RUN_SRCS := $(OS8RUN) $(OS8RUN_PY_ALL) $(PIDP8I_DIN)
# If you edit this directory list, you should probably also edit
# the argument list to the mkadrules call in auto.def!
BUILDDIRS := \
bin \
libexec \
obj/cc8/cross \
obj/d8tape \
obj/misc \
obj/palbart \
obj/pidp8i \
obj/SIMH \
obj/SIMH/PDP8
INSTDIRS := bin etc lib/mkos8 lib/pidp8i libexec share/boot share/media share/include share/man/man1
INSTDIRS := bin etc lib/pidp8i libexec share/boot share/media share/include share/man/man1
SIM_OBJS := \
obj/pidp8i/gpio-common.o \
obj/pidp8i/main.o \
obj/SIMH/PDP8/pdp8_df.o \
obj/SIMH/PDP8/pdp8_cpu.o \
obj/SIMH/PDP8/pdp8_clk.o \
|
︙ | | |
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
+
+
|
PALBART_OBJS := obj/palbart/palbart.o
ifeq (@BUILD_DEEPER_THOUGHT@, 1)
BINS += bin/deeper
endif
TEST_TMP_BINS = bin/ptp2txt bin/pidp8i-sim bin/os8-run
LIBS = -lm -ldl -lpthread
ASM_PTS := $(wildcard @srcdir@/src/asm/*.pal)
ASM_PTS := $(subst @srcdir@/src/asm,bin,$(ASM_PTS))
ASM_PTS := $(ASM_PTS:.pal=-pal.pt)
FC_EX_PTS := $(wildcard @srcdir@/examples/*.fc)
FC_EX_PTS := $(subst @srcdir@/examples,bin,$(FC_EX_PTS))
|
︙ | | |
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
-
+
-
+
+
+
+
-
-
-
+
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
-
-
+
+
+
-
+
|
boot/1.script \
boot/5.script
# List of *.in files from auto.def file, except for this present file
# (Makefile.in) which is handled separately. This list should only
# change when the list of "make-template" calls in auto.def changes.
#
# The MKOS8_INFILES set of files are those which, if changed, require
# The OS8RUN_INFILES set of files are those which, if changed, require
# rebuilding the OS/8 media. Touching the combined set merely causes
# a reconfig and build.
#
# The PRECIOUS set are those whose outfiles we want make(1) to treat as
# "precious", meaning it won't delete files generated by a target if the
# rule being processed to create that target fails.
#
# The rest have no special treatment.
MKOS8_INFILES = \
OS8RUN_INFILES = \
@srcdir@/lib/pidp8i/__init__.py.in \
@srcdir@/lib/pidp8i/ips.py.in \
@srcdir@/media/os8/init.tx.in \
@srcdir@/media/os8/3finit.tx.in \
@srcdir@/src/pidp8i/main.c.in \
$(PIDP8I_DIN)
PRECIOUS_INFILES = \
@srcdir@/Makefile.in \
@srcdir@/examples/Makefile.in \
@srcdir@/src/Makefile.in \
@srcdir@/src/cc8/Makefile.in \
@srcdir@/src/SIMH/Makefile.in \
@srcdir@/src/SIMH/PDP8/Makefile.in
INFILES = \
@srcdir@/bin/pidp8i.in \
@srcdir@/boot/0.script.in \
@srcdir@/boot/2.script.in \
@srcdir@/boot/3.script.in \
@srcdir@/boot/4.script.in \
@srcdir@/boot/6.script.in \
@srcdir@/boot/7.script.in \
@srcdir@/boot/run.script.in \
@srcdir@/boot/run-v3f.script.in \
@srcdir@/etc/pidp8i.service.in \
@srcdir@/etc/sudoers.in \
@srcdir@/etc/usb-mount@.service.in \
@srcdir@/src/pidp8i/gpio-common.c.in \
@srcdir@/tools/simh-update.in \
$(OS8CP) \
$(MKOS8_INFILES)
MKOS8_OUTFILES := $(subst @srcdir@/,,$(MKOS8_INFILES))
MKOS8_OUTFILES := $(subst .in,,$(MKOS8_OUTFILES))
$(OS8RUN_INFILES)
OS8RUN_OUTFILES := $(subst @srcdir@/,,$(OS8RUN_INFILES))
OS8RUN_OUTFILES := $(subst .in,,$(OS8RUN_OUTFILES))
PRECIOUS_OUTFILES := $(subst @srcdir@/,,$(PRECIOUS_INFILES))
PRECIOUS_OUTFILES := $(subst .in,,$(PRECIOUS_OUTFILES))
OUTFILES := $(subst @srcdir@/,,$(INFILES))
OUTFILES := $(subst .in,,$(OUTFILES))
OS8_BIN_RK05 = bin/os8v3d-bin.rk05
OS8_DIST_RK05 = bin/v3d-dist.rk05
OS8_SRC_RK05 = @OS8_SRC_RK05@
OS8_BOOT_DISK = bin/@OS8_BOOT_DISK@
OS8_RK05S = $(OS8_BIN_RK05) $(OS8_SRC_RK05)
OS8_RK05S = $(OS8_DIST_RK05) $(OS8_BOOT_DISK) $(OS8_SRC_RK05)
OS8_SCRIPTS_DIR = @srcdir@/media/os8/scripts
V3D_DIST_SCRIPT = $(OS8_SCRIPTS_DIR)/v3d-dist-rk05.os8
V3D_SRC_SCRIPT = $(OS8_SCRIPTS_DIR)/v3d-src-rk05.os8
V3D_RK05_SCRIPT = $(OS8_SCRIPTS_DIR)/v3d-rk05.os8
OS8CP := bin/os8-cp
V3F_SRCDIR = @srcdir@/src/os8/v3f
V3F_BUILD_RK05 = obj/v3f-build.rk05
V3F_MANIFEST = actions.txt
V3F_MADE_RK05 = bin/v3f-made.rk05
V3F_MAKER = $(OS8_SCRIPTS_DIR)/v3f-control.os8
ALL_TU56_SCRIPT = $(OS8_SCRIPTS_DIR)/all-tu56.os8
CUSP_COPYIN_SCRIPT = $(OS8_SCRIPTS_DIR)/cusp-copyin.os8
OS8_BOOT_TAPE = bin/@OS8_BOOT_TAPE@
V3D_TC08_TU56 = bin/v3d-tc08.tu56
V3D_TD12K_TU56 = bin/v3d-td12k.tu56
V3F_TC08_TU56 = bin/v3f-tc08.tu56
V3F_TD12K_TU56 = bin/v3f-td12k.tu56
V3F_BOOT_TAPE= bin/v3f-@OS8_TAPE_DEVICE@.tu56
CLTXT = /boot/cmdline.txt
ADF := adrules.mk
#### TARGETS ###########################################################
.PHONY: all tags
.PRECIOUS: $(PRECIOUS_OUTFILES)
all: \
$(OUTFILES) $(PRECIOUS_OUTFILES) \
$(BUILDDIRS) $(BINS) $(BOOTSCRIPTS) $(LISTINGS) \
$(ASM_PTS) $(FC_EX_PTS) $(PAL_EX_PTS) \
$(OS8_RK05S)
$(OS8_RK05S) $(V3F_MADE_RK05) $(V3D_TC08_TU56) \
$(V3D_TD12K_TU56) $(V3F_TC08_TU56) $(V3F_TD12K_TU56)
clean:
@rm -f $(BINS) $(BOOTSCRIPTS) $(ASM_PTS) $(PAL_EX_PTS) $(LISTINGS) \
$(OUTFILES) $(ADF) \
$(OS8_RK05S) $(V3F_MADE_RK05) $(V3F_BUILD_RK05) $(V3D_TC08_TU56) \
$(V3D_TD12K_TU56) $(V3F_TC08_TU56) $(V3F_TD12K_TU56) \
config.log cscope.out tags \
bin/*.pt bin/*.rk05 bin/*.save bin/txt2ptp \
lib/*.pyc lib/*/*.pyc lib/mkos8/opts.py \
obj/*.log obj/*.pt obj/mkos8.opts \
bin/*.pt bin/*.save bin/txt2ptp \
lib/*.pyc lib/*/*.pyc lib/pidp8i/dirs.py lib/pidp8i/ips.py \
obj/*.log obj/*.pt obj/os8.opts \
src/config.h \
@srcdir@/examples/*.err
@find obj \( -name \*.o -o -name \*.d \) -delete
@-rmdir -p $(BUILDDIRS) 2> /dev/null || true
distclean: clean
@rm -f \
$(PRECIOUS_OUTFILES) \
config.log \
autosetup/jimsh0 \
src/config.h
ctags tags:
ctags -R @srcdir@/src @srcdir@/lib @srcdir@/libexec/mkos8
ctags -R @srcdir@/src @srcdir@/lib
ifeq (@HAVE_PROG_CSCOPE@, 1)
@cscope -bR -s@srcdir@
endif
install: all instdirs
@echo Installing to @prefix@...
|
︙ | | |
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
|
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
-
+
|
)
@(test -x /sbin/setcap && \
for f in @prefix@/bin/pidp8i-* ; do \
echo "Setting real-time priority capabilities on $$(basename $$f)..." ; \
/sbin/setcap 'cap_sys_nice=eip' $$f ; \
done \
) || true
@test -e @MEDIADIR@/os8/os8.tu56 && \
@test -e @MEDIADIR@/os8/local.tu56 && \
echo "Skipping media image and SIMH boot script reinstall." || \
$(MAKE) mediainstall
@# If this is a Debian-type system, install needed helper programs
@test -x /usr/bin/apt-get -a ! -x /usr/bin/screen && apt-get -y install screen || true
@# Remove usbmount: we've replaced that with bin/usb-mount and friends.
|
︙ | | |
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
|
-
-
-
-
+
+
+
+
|
@INSTALL@ -m 755 bin/cc8 @prefix@/bin && \
@INSTALL@ -m 644 @srcdir@/src/cc8/include/* @prefix@/share/include
@# Install palbart stuff
@@INSTALL@ -m 755 bin/palbart @prefix@/bin
@@INSTALL@ -m 644 @srcdir@/src/palbart/palbart.1 @prefix@/share/man/man1
@# Install mkos8 and its dependencies
@echo "Installing mkos8..."
@@INSTALL@ -m 775 -g @INSTGRP@ $(MKOS8) @prefix@/libexec
@( for src in $(MKOS8_PY_ALL) ; do \
@# Install os8-run and its dependencies
@echo "Installing os8run..."
@@INSTALL@ -m 775 -g @INSTGRP@ $(OS8RUN) @prefix@/bin
@( for src in $(OS8RUN_PY_ALL) ; do \
test -e $$src || src=@srcdir@/$$src ; \
dest=@prefix@/$$(echo $$src | sed -e 's_^@srcdir@/__') ; \
echo "Installing $$src to $$dest..." ; \
@INSTALL@ -m 644 -g @INSTGRP@ -D $${src} $${dest} ; \
@INSTALL@ -m 644 -g @INSTGRP@ -D $${src}c $${dest}c ; \
done \
)
|
︙ | | |
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
|
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
|
+
-
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
@echo "Creating installation directory tree..."
@for d in $(INSTDIRS) ; do @INSTALL@ -m 755 -d @prefix@/$$d ; done
mediainstall: instdirs
@echo "[Re]installing OS and program media..."
@cd @srcdir@ ; \
find media \( \
-name \*.os8 -o \
-name \*.bin -o \
-name \*.dsk -o \
-name \*.rk05 -o \
-name \*.tu56 \
\) -exec @INSTALL@ -D -m 664 -o @INSTUSR@ -g @INSTGRP@ {} @ABSPREFIX@/share/{} \;
@@INSTALL@ -m 644 -o @INSTUSR@ -g @INSTGRP@ bin/os8v3d-*.rk05 @ABSPREFIX@/share/media/os8
@@INSTALL@ -m 644 -o @INSTUSR@ -g @INSTGRP@ bin/*.rk05 @ABSPREFIX@/share/media/os8
@@INSTALL@ -m 644 -o @INSTUSR@ -g @INSTGRP@ bin/*.tu56 @ABSPREFIX@/share/media/os8
@@INSTALL@ -m 664 -o @INSTUSR@ -g @INSTGRP@ boot/*.script @BOOTDIR@
# No-dependencies versions of the bin/os8v3d-*.rk05 targets used by
# tools/test-mkos8, because there's no point rebuilding the simulator
# For reasons I do not understand, the two runs of os8-run create new
# log files rather than appending the second run to the first file.
# on each iteration.
os8-bin:
$(MKOS8)@MKOS8_OPTS@ bin
os8-patched:
$(MKOS8)@MKOS8_OPTS@ bin patch
# We need both logs, so we take steps to get them with mv, and cat.
os8-sys: test-tmp-tools
$(OS8RUN)@OS8_OPTS@ $(V3D_DIST_SCRIPT)
mv obj/os8-run.log obj/os8-run1.log
$(OS8RUN)@OS8_OPTS@ $(V3D_RK05_SCRIPT)
mv obj/os8-run.log obj/os8-run2.log
cat obj/os8-run1.log obj/os8-run2.log >obj/os8-run.log
reconfig:
@AUTOREMAKE@
release: all
@srcdir@/tools/mkrel
run: $(SIM)
$(SIM) boot/run.script
runf run-v3f: $(SIM) $(V3F_BOOT_TAPE)
$(SIM) boot/run-v3f.script
run-tss8: $(SIM)
$(SIM) boot/tss8.script
simh-update simh-update-f:
@@srcdir@/tools/simh-update $(subst simh-update,,$@)
# Enable this target only if all of the test-os8-run prereqs
# were installed at configure time.
ifeq (@CAN_TEST_OS8_RUN@, 1)
test-mkos8:
tools/test-mkos8
test-os8-run:
tools/test-os8-run
endif
test-tmp-tools:
@echo "Installing os8run dependencies..."
@( for src in $(OS8RUN_PY_ALL) ; do \
test -e $$src || src=@srcdir@/$$src ; \
dest=./$$(echo $$src | sed -e 's_^@srcdir@/__') ; \
echo "Installing $$src to $$dest..." ; \
@INSTALL@ -m 644 -g @INSTGRP@ -D $${src} $${dest} ; \
@INSTALL@ -m 644 -g @INSTGRP@ -D $${src}c $${dest}c ; \
done \
)
@( for src in $(TEST_TMP_BINS) ; do \
test -e $$src || src=@srcdir@/$$src ; \
dest=./$$(echo $$src | sed -e 's_^@srcdir@/__') ; \
echo "Installing $$src to $$dest..." ; \
@INSTALL@ -m 755 -g @INSTGRP@ -D $${src} $${dest} ; \
done \
)
@( cd ./bin ; \
echo "Installing txt2ptp symlink..." ; \
ln -f ptp2txt txt2ptp ; \
)
# Build the OS/8 binary media needed by 0.script.
#
# We use order-only prerequisites for the simulator here because we only
# care that it *exists*, not whether it is newer than the previously
# built RK05 media or not.
#
# Also notice that the init.tx file is not a prerequisite: we purposely
# do not rebiuld the RK05 media just because the configure script was
# re-run, which *always* regenerates the init.tx file because the
# timestamp always changes from one run to the next. (Until computers
# get fast enough to do a complete re-configure in under a second,
# anyway!) The thing is, we only want the RK05 bin media rebuilt when
# the configure --*-os8-* options change. *That* is when we care about
# the updated init.tx file, not before. We needn't even make it an
# order-only prereq because configure and the INFILES rules above ensure
# that it always exists.
OS8_BIN_SRCS := \
$(MKOS8) $(PIDP8I_DIN) \
V3D_DIST_SRCS := \
$(OS8RUN) $(PIDP8I_DIN) \
lib/pidp8i/dirs.py \
$(V3D_DIST_SCRIPT) \
@srcdir@/media/os8/al-*-ba-*.tu56 \
@srcdir@/media/os8/subsys/*.tu56
# Temporary: We depend on ALL the patches, but really we've picked them over.
ifneq (@MKOS8_BIN_PATCHES@,)
OS8_BIN_SRCS += @srcdir@/media/os8/patches/patch_list.txt
endif
$(OS8_BIN_RK05): $(OS8_BIN_SRCS) | $(SIM) $(MKOS8_OUTFILES)
$(MKOS8)@MKOS8_OPTS@ bin @MKOS8_BIN_PATCHES@
V3D_PATCHES := \
@srcdir@/media/os8/patches/*.patch8
# Dependency on the contents of the v3f source directory.
V3F_SOURCES := \
@srcdir@/src/os8/v3f/*.PA \
@srcdir@/src/os8/v3f/*.MA \
@srcdir@/src/os8/v3f/*.BI
$(OS8_DIST_RK05): $(V3D_DIST_SRCS) | $(SIM) $(OS8RUN_OUTFILES)
$(OS8RUN)@OS8_OPTS@ $(V3D_DIST_SCRIPT)
$(OS8_BOOT_DISK): $(V3D_RK05_SCRIPT) $(OS8_DIST_RK05) $(V3D_PATCHES) | $(SIM) $(OS8RUN_OUTFILES)
$(OS8RUN)@OS8_OPTS@ $(V3D_RK05_SCRIPT)
# Also build an OS/8 source disk, as a convenience to avoid the
# need to mount up the 7 source tapes in succession.
#
# Using an order-only dependency for the simulator and the bin disk: we
# only need *a* version of each, they don't have to be recent!
OS8_SRC_SRCS = \
$(MKOS8) $(PIDP8I_DIN) \
$(OS8RUN) $(PIDP8I_DIN) \
lib/pidp8i/dirs.py \
$(V3D_SRC_SCRIPT) \
@srcdir@/media/os8/al-*-sa-*.tu56
$(OS8_SRC_RK05): $(OS8_SRC_SRCS) | $(SIM) $(OS8_BIN_RK05)
$(MKOS8)@MKOS8_OPTS@ src
$(OS8_SRC_RK05): $(OS8_DIST_RK05) $(OS8_SRC_SRCS) | $(SIM) $(OS8_BOOT_DISK)
$(OS8RUN)@OS8_OPTS@ $(V3D_SRC_SCRIPT)
# Build the source disk for OS/8 V3F
$(V3F_BUILD_RK05): $(V3F_SRCDIR)/$(V3F_MANIFEST) $(V3F_SOURCES) | $(OS8_BOOT_DISK)
cd $(V3F_SRCDIR); @builddir@/$(OS8CP) -v --action-file $(V3F_MANIFEST)
# Make a disk with binaries assembled from the V3F source disk
$(V3F_MADE_RK05): $(V3F_BUILD_RK05) $(V3F_MAKER)
$(OS8RUN) $(V3F_MAKER)
# Make a bootable OS/8 v3f TCO8 DECtape image
$(V3F_TC08_TU56): $(V3F_MADE_RK05) $(ALL_TU56_SCRIPT) $(CUSP_COPYIN_SCRIPT)
$(OS8RUN) $(ALL_TU56_SCRIPT) --enable v3f
# Make a bootable OS/8 v3f TD8E 12K DECtape image
$(V3F_TD12K_TU56): $(V3F_MADE_RK05) $(ALL_TU56_SCRIPT) $(CUSP_COPYIN_SCRIPT)
$(OS8RUN) $(ALL_TU56_SCRIPT) --enable v3f --enable td12k
# Make a bootable OS/8 v3d TCO8 DECtape image
$(V3D_TC08_TU56): $(ALL_TU56_SCRIPT) $(CUSP_COPYIN_SCRIPT) | $(OS8_BOOT_DISK)
$(OS8RUN) $(ALL_TU56_SCRIPT)
# Make a bootable OS/8 v3d TD8E 12K DECtape image
$(V3D_TD12K_TU56): $(ALL_TU56_SCRIPT) $(CUSP_COPYIN_SCRIPT) | $(OS8_BOOT_DISK)
$(OS8RUN) $(ALL_TU56_SCRIPT) --enable td12k
# Rule for building PAL assembly language programs in src/asm/*.pal.
obj/%.lst bin/%-pal.pt: @srcdir@/src/asm/%.pal bin/palbart
bin/palbart -lr $< || cat obj/$*.err
mv @srcdir@/src/asm/$*.lst obj
mv @srcdir@/src/asm/$*.rim bin/$*-pal.pt
|
︙ | | |
569
570
571
572
573
574
575
576
577
578
579
580
581
582
|
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
|
+
+
|
# We purposely list only one of the OUTFILES on the left hand side
# because to list them all is to invite Make to run N copies of the
# configure script in parallel up to the limit of -j or the number of
# files in INFILES, whichever is lower. Order-only prerequisites can't
# help here (|) as that only affects the right hand side.
ifeq ($(findstring clean,$(MAKECMDGOALS)),)
media/os8/init.tx: $(INFILES) $(PRECIOUS_INFILES) @AUTODEPS@
@AUTOREMAKE@ && $(MAKE)
media/os8/3finit.tx: $(INFILES) $(PRECIOUS_INFILES) @AUTODEPS@
@AUTOREMAKE@ && $(MAKE)
# Also do it if the autodep tool is newer than its output, suggesting
# that if re-run, it would generate different output.
$(ADF): @srcdir@/tools/mkadrules
@AUTOREMAKE@ && $(MAKE)
endif
|
︙ | | |
Changes to README.md.
Changes to auto.def.
︙ | | |
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
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
|
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
alt-serial-mod => "use GPIO drive scheme suitable for James L-W's serial mod method"
cc8-cross=1 => "do not build the cc8 cross-compiler on the host"
debug-mode => "create a debug build (default is release)"
lowercase: => "select how lowercase input is to be handled"
no-lamp-simulator => "use simple LED driver instead of incandescent lamp simulator"
os8-focal=1 => "leave FOCAL 69 and U/W FOCAL off the built OS/8 RK05 image"
os8-minimal => "set all --disable-os8-* options, giving minimal OS/8 bin disk"
os8-patches=1 => "do not apply DEC patches to the built OS/8 RK05 bin image"
os8-src=1 => "do not build os8v3d-src.rk05 from OS/8 source tapes"
os8-src=1 => "do not build v3d-src.rk05 from OS/8 source tapes"
serial-mod => "use GPIO drive scheme suitable for Oscar Vermeulen's serial mod method"
throttle: => "override the throttle values in the boot scripts"
usb-automount=1 => "do not automatically mount USB drives for SING_STEP + DF"
boot-tape-config: => "Boot tape configuration: tc08, or td12k"
boot-tape-version: => "OS/8 version for boot tape, either v3d or v3f"
}
options $alloptions
# use btc and btv to set defaults because I can't get the documented
# syntax of <name>:=<value> to work.
# Default boot-tape-config is tc08
set btc [opt-val boot-tape-config]
if {$btc eq ""} {set btc "tc08"}
# Default boot-tape-version is v3d
set btv [opt-val boot-tape-version]
if {$btv eq ""} {set btv "v3d"}
define USB_AUTOMOUNT [opt-bool usb-automount]
# Make our own array of os8 options so we can apply the meta options
foreach {opt def desc} $os8opts {
set os8bool($opt) [opt-bool os8-$opt]
}
set os8bool(src) [opt-bool os8-src]
|
︙ | | |
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# Handle interdependent options
if {$os8bool(cc8) && !$os8bool(fortran-ii)} {
set $os8bool(fortran-ii) 1
msg-result "WARNING: Re-enabling OS/8 FORTRAN II: OS/8 CC8 requires it."
}
# Now build the options to mkos8
set mkos8_opts ""
set os8_opts ""
foreach {opt def desc} $os8opts {
set val $os8bool($opt)
if {$os8min} {
# Minimal mode disables everything optional.
#
# We can't have "except for" logic because we can't tell
# explicitly-given options from implicit ones.
set act " not"
if {$def} { append mkos8_opts " --disable-$opt" }
if {$def} { append os8_opts " --disable $opt" }
} elseif {$val} {
set act ""
if {!$def} {
# User is enabling a normally-disabled option, so pass it along
# to mkos8 explicitly.
append mkos8_opts " --enable-$opt"
append os8_opts " --enable $opt"
}
} else {
set act " not"
if {$def} {
append mkos8_opts " --disable-$opt"
append os8_opts " --disable $opt"
}
}
msg-result "Will$act add $desc to the built OS/8 RK05 image"
}
# And generate mkos8/opts.py
# And generate lib/pidp8i/os8opts.py
set os "# GENERATED BY auto.def; DO NOT MODIFY.\n\nopts = {\n"
foreach {opt def desc} $os8opts {
set act [expr {$def ? "Leave $desc off" : "Add $desc to"}]
append os "\t\"" $opt "\": \[ $def,\
\"$act the built OS/8 RK05 image\" \],\n"
}
append os "}\n" ; # saved later!
# Handle the OS/8 options not passed to mkos8 generically by above.
if {$os8src} {
msg-result "Building os8v3d-src.rk05 from OS/8 source tapes."
define OS8_SRC_RK05 bin/os8v3d-src.rk05
msg-result "Building v3d-src.rk05 from OS/8 source tapes."
define OS8_SRC_RK05 bin/v3d-src.rk05
} else {
msg-result "Will not build os8v3d-src.rk05 from OS/8 source tapes."
msg-result "Will not build v3d-src.rk05 from OS/8 source tapes."
define OS8_SRC_RK05 {}
}
if {$os8min || ![opt-bool os8-patches]} {
# Define our boot image. (Note, we ALWAYS apply patches.)
msg-result "Will not patch OS/8 on the RK05 bin disk."
define OS8_BOOT_DISK "os8v3d-bin.rk05"
define MKOS8_BIN_PATCHES {}
} else {
msg-result "Will apply OS/8 V3D patches to the RK05 bin disk."
define OS8_BOOT_DISK "os8v3d-patched.rk05"
define MKOS8_BIN_PATCHES patch
}
define OS8_BOOT_DISK "v3d.rk05"
# Compose our boot tape image name from boot-tape-config and boot-tape-version
# Pull defaults from $btc for boot-tape-config, and $btv for boot-tape-version.
set btn "$btv-$btc.tu56"
msg-result "Boot tape name: $btn"
define OS8_BOOT_TAPE $btn
define OS8_TAPE_DEVICE $btc
if {$btc eq "tc08"} {
define SIMH_TAPE_DEVICE "dt"
} else {
define SIMH_TAPE_DEVICE "td"
}
# React to remaining chosen command line options
if {[opt-bool alt-serial-mod]} {
if {[opt-bool serial-mod]} {
user-error "You cannot request both --alt-serial-mod and --serial-mod!"
}
|
︙ | | |
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
-
+
-
+
-
-
-
+
+
+
+
+
-
-
-
+
+
+
|
set lv [opt-val lowercase]
if {$lv == ""} { set lv "auto" }
if {$lv == "auto"} {
define SIMH_PASS_LOWERCASE
} elseif {$lv == "pass"} {
define SIMH_PASS_LOWERCASE
append mkos8_opts " --disable-lcmod"
append os8_opts " --disable lcmod"
} elseif {$lv == "upper"} {
append mkos8_opts " --disable-lcmod"
append os8_opts " --disable lcmod"
} else {
user-error "Legal values for --lowercase are {auto,pass,upper}."
}
msg-result "Lowercase handling set to '$lv' mode."
# We've purposely held off exporting the mkos8 option set until now
# because some of the configuration options can affect the option set.
define MKOS8_OPTS $mkos8_opts
if {![file exists "lib/mkos8"]} { file mkdir "lib/mkos8" }
write-if-changed "lib/mkos8/opts.py" $os
define OS8_OPTS $os8_opts
if {![file exists "lib/pidp8i"]} { file mkdir "lib/pidp8i" }
if {![file exists "obj/pidp8i"]} { file mkdir "obj/pidp8i" }
if {![file exists "obj/SIMH/PDP8"]} { file mkdir "obj/SIMH/PDP8" }
write-if-changed "lib/pidp8i/os8opts.py" $os
# Force a rebuild of the OS/8 media if the option set changed.
if {![file exists "obj"]} { file mkdir "obj" }
write-if-changed "obj/mkos8.opts" $mkos8_opts {
file delete -force bin/os8v3d-bin.rk05
msg-result "mkos8 options changed; will rebuild OS/8 disk images."
write-if-changed "obj/os8.opts" $os8_opts {
file delete -force bin/v3d-dist.rk05
msg-result "os8 options changed; will rebuild OS/8 disk images."
}
# High-level definitions
set builddir [get-define builddir]
set srcdir [get-define srcdir]
set cores [exec $srcdir/tools/corecount]
|
︙ | | |
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
|
-
+
|
# Get host, user, and date info for use by media/os8/init.tx.
catch {exec hostname} host
set user $::env(USER)
define BUILDUSER "$user@$host"
define BUILDTS [clock format [clock seconds] -format "%Y.%m.%d at %T %Z"]
# The mkos8 script requires Python and some non-core modules.
# The os8-run script requires Python and some non-core modules.
set status [catch {exec python -c exit} result]
if {$status != 0} {
user-error "Python does not appear to be installed here. It is required."
}
msg-result "Python is installed here."
set status [catch {exec python -c "import pexpect" 2> /dev/null} result]
if {$status != 0} {
|
︙ | | |
422
423
424
425
426
427
428
429
430
431
432
433
434
435
|
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
append msg "\nOR:\n"
append msg "\n sudo easy_install pkg_resources\n"
append msg "\nOR:\n"
append msg "\n sudo apt install python-pkg-resources\n"
user-error $msg
}
msg-result "Python module pkg_resources is installed here."
# Check for Perl and that it can run the test corpus builder. Not fatal
# if it can't, since only developers and deep testers need it.
set status [catch {exec perl -e exit} result]
if {$status == 0} {
set status [catch {exec perl -c "[get-define srcdir]/tools/test-os8-run" 2> /dev/null} result]
if {$status == 0} {
set status [catch {exec lz4 -h 2> /dev/null} result]
if {$status == 0} {
msg-result "All test-os8-run prereqs available here."
define CAN_TEST_OS8_RUN 1
} else {
msg-result "Cannot test-os8-run without lz4; try apt install liblz4-tool."
}
} else {
msg-result "Cannot test-os8-run: fix with 'sudo cpanm --installdeps .'"
}
} else {
msg-result "Cannot test-os8-run: Perl is not available."
}
# Build Deeper Thought if we find it here
if {[file exists "[get-define srcdir]/src/misc/deeper.c"]} {
set ls [string toupper "[get-define LED_DRIVER_MODULE]ls"]
msg-result "Found Deeper Thought; building it against $ls GPIO module"
define BUILD_DEEPER_THOUGHT 1
}
|
︙ | | |
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
|
+
+
+
-
+
|
# NOTE: If you change the list of files here, change INFILES in
# Makefile.in, too.
make-config-header src/config.h \
-auto {ENABLE_* HAVE_* PACKAGE_* SIZEOF_*} \
-bare {ILS_MODE PCB_*}
make-template Makefile.in
make-template bin/pidp8i.in
make-template bin/os8-cp.in
make-template boot/0.script.in
make-template boot/2.script.in
make-template boot/3.script.in
make-template boot/4.script.in
make-template boot/6.script.in
make-template boot/7.script.in
make-template boot/run.script.in
make-template boot/run-v3f.script.in
make-template boot/tss8.script.in
make-template etc/pidp8i.service.in
make-template etc/sudoers.in
make-template etc/usb-mount@.service.in
make-template examples/Makefile.in
make-template lib/pidp8i/__init__.py.in
make-template lib/pidp8i/dirs.py.in
make-template lib/pidp8i/ips.py.in
make-template media/os8/init.tx.in
make-template media/os8/3finit.tx.in
make-template src/Makefile.in
make-template src/cc8/Makefile.in
make-template src/cc8/os8/Makefile.in
make-template src/pidp8i/gpio-common.c.in
make-template src/pidp8i/main.c.in
make-template src/SIMH/Makefile.in
make-template src/SIMH/PDP8/Makefile.in
make-template tools/simh-update.in
exec chmod +x "$builddir/bin/pidp8i" "$builddir/tools/simh-update"
exec chmod +x "$builddir/bin/pidp8i" "$builddir/tools/simh-update" "$builddir/bin/os8-cp"
|
Added bin/os8-cp.in.