mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps to identify unexpected coding errors. Most simulators can now also be compiled with a C++ compiler without warnings. Additionally, these changes have also been configured to facilitate easier backporting of simulator and device simulation modules to run under the simh v3.9+ SCP framework.
This commit is contained in:
40
makefile
40
makefile
@@ -151,7 +151,11 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
CC_STD = -std=gnu99
|
||||
ifeq (,$(findstring ++,$(GCC)))
|
||||
CC_STD = -std=gnu99
|
||||
else
|
||||
CPP_BUILD = 1
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq (Apple,$(shell $(GCC) -v /dev/null 2>&1 | grep 'Apple' | awk '{ print $$1 }'))
|
||||
@@ -165,7 +169,11 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||
CLANG_VERSION = $(word 4,$(COMPILER_NAME))
|
||||
endif
|
||||
endif
|
||||
CC_STD = -std=c99
|
||||
ifeq (,$(findstring ++,$(GCC)))
|
||||
CC_STD = -std=c99
|
||||
else
|
||||
CPP_BUILD = 1
|
||||
endif
|
||||
endif
|
||||
ifeq (git-repo,$(shell if $(TEST) -d ./.git; then echo git-repo; fi))
|
||||
ifeq (need-hooks,$(shell if $(TEST) ! -e ./.git/hooks/post-checkout; then echo need-hooks; fi))
|
||||
@@ -1440,7 +1448,7 @@ ALL = pdp1 pdp4 pdp7 pdp8 pdp9 pdp15 pdp11 pdp10 \
|
||||
nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri \
|
||||
i7094 ibm1130 id16 id32 sds lgp h316 \
|
||||
swtp6800mp-a swtp6800mp-a2 tx-0 ssem isys8010 isys8020 \
|
||||
b5500
|
||||
b5500
|
||||
|
||||
all : ${ALL}
|
||||
|
||||
@@ -1597,14 +1605,22 @@ ${BIN}h316${EXE} : ${H316} ${SIM}
|
||||
hp2100 : ${BIN}hp2100${EXE}
|
||||
|
||||
${BIN}hp2100${EXE} : ${HP2100} ${SIM}
|
||||
ifneq (1,$(CPP_BUILD)$(CPP_FORCE))
|
||||
${MKDIRBIN}
|
||||
${CC} ${HP2100} ${SIM} ${HP2100_OPT} $(CC_OUTSPEC) ${LDFLAGS}
|
||||
else
|
||||
$(info hp2100 can't be built using C++)
|
||||
endif
|
||||
|
||||
hp3000 : ${BIN}hp3000${EXE}
|
||||
|
||||
${BIN}hp3000${EXE} : ${HP3000} ${SIM}
|
||||
ifneq (1,$(CPP_BUILD)$(CPP_FORCE))
|
||||
${MKDIRBIN}
|
||||
${CC} ${HP3000} ${SIM} ${HP3000_OPT} $(CC_OUTSPEC) ${LDFLAGS}
|
||||
else
|
||||
$(info hp3000 can't be built using C++)
|
||||
endif
|
||||
|
||||
i1401 : ${BIN}i1401${EXE}
|
||||
|
||||
@@ -1627,6 +1643,7 @@ ${BIN}i7094${EXE} : ${I7094} ${SIM}
|
||||
ibm1130 : ${BIN}ibm1130${EXE}
|
||||
|
||||
${BIN}ibm1130${EXE} : ${IBM1130}
|
||||
ifneq (1,$(CPP_BUILD)$(CPP_FORCE))
|
||||
${MKDIRBIN}
|
||||
ifneq ($(WIN32),)
|
||||
windres ${IBM1130D}/ibm1130.rc $(BIN)ibm1130.o
|
||||
@@ -1634,7 +1651,10 @@ ifneq ($(WIN32),)
|
||||
del BIN\ibm1130.o
|
||||
else
|
||||
${CC} ${IBM1130} ${SIM} ${IBM1130_OPT} $(CC_OUTSPEC) ${LDFLAGS}
|
||||
endif
|
||||
endif
|
||||
else
|
||||
$(info ibm1130 can't be built using C++)
|
||||
endif
|
||||
|
||||
s3 : ${BIN}s3${EXE}
|
||||
|
||||
@@ -1700,14 +1720,22 @@ ${BIN}swtp6800mp-a2${EXE} : ${SWTP6800MP-A2} ${SIM} ${BUILD_ROMS}
|
||||
isys8010: ${BIN}isys8010${EXE}
|
||||
|
||||
${BIN}isys8010${EXE} : ${ISYS8010} ${SIM} ${BUILD_ROMS}
|
||||
ifneq (1,$(CPP_BUILD)$(CPP_FORCE))
|
||||
${MKDIRBIN}
|
||||
${CC} ${ISYS8010} ${SIM} ${ISYS8010_OPT} $(CC_OUTSPEC) ${LDFLAGS}
|
||||
else
|
||||
$(info isys8010 can't be built using C++)
|
||||
endif
|
||||
|
||||
isys8020: ${BIN}isys8020${EXE}
|
||||
|
||||
${BIN}isys8020${EXE} : ${ISYS8020} ${SIM} ${BUILD_ROMS}
|
||||
ifneq (1,$(CPP_BUILD)$(CPP_FORCE))
|
||||
${MKDIRBIN}
|
||||
${CC} ${ISYS8020} ${SIM} ${ISYS8020_OPT} $(CC_OUTSPEC) ${LDFLAGS}
|
||||
else
|
||||
$(info isys8020 can't be built using C++)
|
||||
endif
|
||||
|
||||
tx-0 : ${BIN}tx-0${EXE}
|
||||
|
||||
@@ -1724,8 +1752,12 @@ ${BIN}ssem${EXE} : ${SSEM} ${SIM}
|
||||
besm6 : ${BIN}besm6${EXE}
|
||||
|
||||
${BIN}besm6${EXE} : ${BESM6} ${SIM}
|
||||
ifneq (1,$(CPP_BUILD)$(CPP_FORCE))
|
||||
${MKDIRBIN}
|
||||
${CC} ${BESM6} ${SIM} ${BESM6_OPT} $(CC_OUTSPEC) ${LDFLAGS}
|
||||
else
|
||||
$(info besm6 can't be built using C++)
|
||||
endif
|
||||
|
||||
sigma : ${BIN}sigma${EXE}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user