From 5ba0ef0c672ec11fa43742acda09e4e2e99fe78a Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 28 Dec 2022 11:10:59 -1000 Subject: [PATCH] FrontPanelTest: Cleanup test setup and build dependencies - Test simulator is always VAX and always in the same directory as FrontPanelTest - makefile and Projects will always build the dependent simulator --- Visual Studio Projects/FrontPanelTest.sln | 20 ------------ Visual Studio Projects/FrontPanels.sln | 38 +++++++++++++++++++++++ frontpanel/FrontPanelTest.c | 16 ++++++---- makefile | 9 +++--- 4 files changed, 53 insertions(+), 30 deletions(-) delete mode 100644 Visual Studio Projects/FrontPanelTest.sln create mode 100644 Visual Studio Projects/FrontPanels.sln diff --git a/Visual Studio Projects/FrontPanelTest.sln b/Visual Studio Projects/FrontPanelTest.sln deleted file mode 100644 index 024e047b..00000000 --- a/Visual Studio Projects/FrontPanelTest.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FrontPanelTest", "FrontPanelTest.vcproj", "{F9583457-34AD-44BD-9A55-ECBF3016292A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F9583457-34AD-44BD-9A55-ECBF3016292A}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9583457-34AD-44BD-9A55-ECBF3016292A}.Debug|Win32.Build.0 = Debug|Win32 - {F9583457-34AD-44BD-9A55-ECBF3016292A}.Release|Win32.ActiveCfg = Release|Win32 - {F9583457-34AD-44BD-9A55-ECBF3016292A}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Visual Studio Projects/FrontPanels.sln b/Visual Studio Projects/FrontPanels.sln new file mode 100644 index 00000000..e7d9352d --- /dev/null +++ b/Visual Studio Projects/FrontPanels.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FrontPanelTest", "FrontPanelTest.vcproj", "{F9583457-34AD-44BD-9A55-ECBF3016292A}" + ProjectSection(ProjectDependencies) = postProject + {D5D873F7-D286-43E7-958A-3D838FAA0856} = {D5D873F7-D286-43E7-958A-3D838FAA0856} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VAX", "VAX.vcproj", "{D5D873F7-D286-43E7-958A-3D838FAA0856}" + ProjectSection(ProjectDependencies) = postProject + {D40F3AF1-EEE7-4432-9807-2AD287B490F8} = {D40F3AF1-EEE7-4432-9807-2AD287B490F8} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuildROMs", "BuildROMs.vcproj", "{D40F3AF1-EEE7-4432-9807-2AD287B490F8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9583457-34AD-44BD-9A55-ECBF3016292A}.Debug|Win32.ActiveCfg = Debug|Win32 + {F9583457-34AD-44BD-9A55-ECBF3016292A}.Debug|Win32.Build.0 = Debug|Win32 + {F9583457-34AD-44BD-9A55-ECBF3016292A}.Release|Win32.ActiveCfg = Release|Win32 + {F9583457-34AD-44BD-9A55-ECBF3016292A}.Release|Win32.Build.0 = Release|Win32 + {D5D873F7-D286-43E7-958A-3D838FAA0856}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5D873F7-D286-43E7-958A-3D838FAA0856}.Debug|Win32.Build.0 = Debug|Win32 + {D5D873F7-D286-43E7-958A-3D838FAA0856}.Release|Win32.ActiveCfg = Release|Win32 + {D5D873F7-D286-43E7-958A-3D838FAA0856}.Release|Win32.Build.0 = Release|Win32 + {D40F3AF1-EEE7-4432-9807-2AD287B490F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {D40F3AF1-EEE7-4432-9807-2AD287B490F8}.Debug|Win32.Build.0 = Debug|Win32 + {D40F3AF1-EEE7-4432-9807-2AD287B490F8}.Release|Win32.ActiveCfg = Release|Win32 + {D40F3AF1-EEE7-4432-9807-2AD287B490F8}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/frontpanel/FrontPanelTest.c b/frontpanel/FrontPanelTest.c index 60a78133..846e1470 100644 --- a/frontpanel/FrontPanelTest.c +++ b/frontpanel/FrontPanelTest.c @@ -75,12 +75,7 @@ printw ("%s", buf); } #endif /* HAVE_NCURSES */ #endif -const char *sim_path = -#if defined(_WIN32) - "vax.exe"; -#else - "vax"; -#endif +char *sim_path; const char *sim_config = "VAX-PANEL.ini"; @@ -668,10 +663,19 @@ int main (int argc, char **argv) { int was_halted = 1, i; +char *c; if ((argc > 1) && ((!strcmp("-d", argv[1])) || (!strcmp("-D", argv[1])) || (!strcmp("-debug", argv[1])))) debug = 1; +sim_path = strcpy ((char *)malloc (strlen (argv[0]) + 10), argv[0]); +c = strrchr (sim_path, '/'); +if (c == NULL) + c = strrchr (sim_path, '\\'); +strcpy (c + 1, "vax"); + + + if (panel_setup()) goto Done; if (1) { diff --git a/makefile b/makefile index 3ba43fc4..8107e60a 100644 --- a/makefile +++ b/makefile @@ -217,7 +217,7 @@ ifneq (,$(findstring pdp7,${MAKECMDGOALS})) VIDEO_USEFUL = true endif # building the pdp11, any pdp10, any 3b2, or any vax simulator could use networking support -ifneq (,$(findstring pdp11,${MAKECMDGOALS})$(findstring pdp10,${MAKECMDGOALS})$(findstring vax,${MAKECMDGOALS})$(findstring infoserver,${MAKECMDGOALS})$(findstring 3b2,${MAKECMDGOALS})$(findstring all,${MAKECMDGOALS})) +ifneq (,$(findstring pdp11,${MAKECMDGOALS})$(findstring pdp10,${MAKECMDGOALS})$(findstring vax,${MAKECMDGOALS})$(findstring frontpaneltest,${MAKECMDGOALS})$(findstring infoserver,${MAKECMDGOALS})$(findstring 3b2,${MAKECMDGOALS})$(findstring all,${MAKECMDGOALS})) NETWORK_USEFUL = true ifneq (,$(findstring all,${MAKECMDGOALS})) BUILD_MULTIPLE = s @@ -2844,12 +2844,13 @@ $(BIN)pdp10-ks$(EXE) : ${KS10} ${SIM} # Front Panel API Demo/Test program -frontpaneltest : ${BIN}frontpaneltest${EXE} +frontpaneltest : ${BIN}frontpaneltest${EXE} ${BIN}vax${EXE} ${BIN}frontpaneltest${EXE} : frontpanel/FrontPanelTest.c sim_sock.c sim_frontpanel.c #cmake:ignore-target - ${MKDIRBIN} - ${CC} frontpanel/FrontPanelTest.c sim_sock.c sim_frontpanel.c ${CC_OUTSPEC} ${LDFLAGS} ${OS_CURSES_DEFS} + $(MAKEIT) OPTS="$(OS_CURSES_DEFS)" TESTS=0 +# ${MKDIRBIN} +# ${CC} frontpanel/FrontPanelTest.c sim_sock.c sim_frontpanel.c ${CC_OUTSPEC} ${LDFLAGS} ${OS_CURSES_DEFS} else # end of primary make recipies