-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (94 loc) · 2.59 KB
/
Makefile
File metadata and controls
96 lines (94 loc) · 2.59 KB
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
# $Id: Makefile 1383 2023-03-20 08:19:14Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2022-2023 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# Revision History:
# Date Rev Version Comment
# 2023-03-19 1382 1.1.1 add header line for %.te11 target
# 2022-08-08 1275 1.1 add auto-dependency rule
# 2022-07-29 1264 1.0 Initial version
#---
#
include ${RETROBASE}/tools/make/generic_asm11.mk
include ${RETROBASE}/tools/make/dontincdep.mk
#
MAC_all += cpu_badinst_nofpp.mac
MAC_all += cpu_basics.mac
MAC_all += cpu_details.mac
MAC_all += cpu_eis.mac
MAC_all += cpu_mmu.mac
MAC_all += cpu_selftest.mac
#
LDA_all = $(MAC_all:.mac=.lda)
LST_all = $(MAC_all:.mac=.lst)
EXP_all = $(MAC_all:.mac=.exp.mac)
TSIM_all = $(MAC_all:.mac=.tsim)
TE11_all = $(MAC_all:.mac=.te11)
TW11_all = $(MAC_all:.mac=.tw11)
#
DEP_all = $(MAC_all:.mac=.dep)
#
# create export mac (with asm-11 -E)
%.exp.mac : %.mac
asm-11 -E $< > $@
# execute SimH simulation
%.tsim : %.lda
pdp11 tcode_exec.scmd $* | grep -q "HALT instruction, PC: 002002"
# execute e11 simulation; output goes to tmp_e11_tt0.log
%.te11 : %.lda
@echo "execute $* ---------------------------------------------------"
@rm -f tmp_e11.ini
@echo "@tcode.ecmd" >> tmp_e11.ini
@echo "mount pr: $*.lda" >> tmp_e11.ini
@echo "boot pr:" >> tmp_e11.ini
@echo "quit" >> tmp_e11.ini
e11 /initfile:tmp_e11.ini
grep "PC/002002" tmp_e11_tt0.log
rm -f tmp_e11_tt0.log tmp_e11.ini
# execute w11 simulation (on C7 system)
%.tw11 : %.mac
ti_w11 -c7 -tmu -w -e $< | tbfilt
#
.PHONY : default alllda alllst allexp alltsim alltw11 clean
#
default :
@echo "No default action defined, use"
@echo " make alllda all .lda + .lst files"
@echo " make alllst all .lst files"
@echo " make allexp all exp.mac export files"
@echo " make alltsim all SimH tests"
@echo " make allte11 all e11 tests"
@echo " make alltw11 all w11 GHDL simulation tests"
@echo " make <tcode>.lda compile, create .lda + .lst"
@echo " make <tcode>.lst compile, create .lst"
@echo " make <tcode>.exp.mac compile with -E"
@echo " make <tcode>.tsim run SimH simulator"
@echo " make <tcode>.te11 run e11 simulator"
@echo " make <tcode>.tw11 run w11 GHDL simulation (for C7)"
#
alllda : $(LDA_all)
#
alllst : $(LST_all)
#
allexp : $(EXP_all)
#
alltsim : $(TSIM_all)
#
allte11 : $(TE11_all)
#
alltw11 : $(TW11_all)
#
clean :
rm -f *.lst
rm -f *.lda
rm -f *.exp.mac
#
cleandep :
rm -f *.dep
#
distclean : clean cleandep
# The magic auto-dependency include
#
ifndef DONTINCDEP
include $(DEP_all)
endif