From 4456e42b082e912175f9bf10bc27eca7e71aa31d Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 29 Oct 2014 10:43:48 -0700 Subject: [PATCH] makefile: Added build support for simulators which use the display library on host platforms which have X11 support not located in /usr/include. Simulators affected: pdp1, pdp11 and tx-0 Host platforms which now build with display support: OS X --- makefile | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/makefile b/makefile index a0aee9dd..4bff68d2 100644 --- a/makefile +++ b/makefile @@ -66,14 +66,21 @@ ifneq (,$(or $(findstring pdp11,$(MAKECMDGOALS)),$(findstring vax,$(MAKECMDGOALS ifneq (,$(findstring all,$(MAKECMDGOALS))$(word 2,$(MAKECMDGOALS))) BUILD_MULTIPLE = s VIDEO_USEFUL = true + DISPLAY_USEFUL = true endif else ifeq ($(MAKECMDGOALS),) # default target is all NETWORK_USEFUL = true VIDEO_USEFUL = true + DISPLAY_USEFUL = true BUILD_MULTIPLE = s BUILD_SINGLE := all $(BUILD_SINGLE) + else + ifneq (,$(or $(or $(findstring pdp1,$(MAKECMDGOALS)),$(findstring pdp11,$(MAKECMDGOALS))),$(findstring tx-0,$(MAKECMDGOALS)))) + DISPLAY_USEFUL = true + $(info DISPLAY USEFUL SET) + endif endif endif ifeq ($(WIN32),) #*nix Environments (&& cygwin) @@ -395,6 +402,27 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) $(info *** Info ***) endif endif + ifneq (,$(DISPLAY_USEFUL)) + ifeq (,$(WIN32)) + ifneq (,$(call find_include,X11/Intrinsic)) + ifneq (,$(call find_lib,Xt)) + DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/x11.c + DISPLAYVT = ${DISPLAYD}/vt11.c + DISPLAY_OPT += -DUSE_DISPLAY -I$(dir $(call find_include,X11/Intrinsic))/include -lXt -lX11 -lm + $(info using display: $(call find_lib,Xt) $(call find_include,X11/Intrinsic)) + endif + ifneq (,$(GCC_WARNINGS_CMD)$(CLANG_VERSION)) + ifneq (,$(CLANG_VERSION)$(findstring -Wdeprecated-declarations,$(shell $(GCC_WARNINGS_CMD)))) + DISPLAY_OPT += -Wno-deprecated-declarations + endif + endif + endif + else + DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/win32.c + DISPLAYVT = ${DISPLAYD}/vt11.c + DISPLAY_OPT = -DUSE_DISPLAY -lgdi32 + endif + endif ifneq (,$(NETWORK_USEFUL)) ifneq (,$(call find_include,pcap)) ifneq (,$(shell grep 'pcap/pcap.h' $(call find_include,pcap) | grep include)) @@ -799,26 +827,6 @@ SIM = scp.c sim_console.c sim_fio.c sim_timer.c sim_sock.c \ sim_video.c sim_imd.c DISPLAYD = display -ifeq ($(WIN32),) - ifeq (x11,$(shell if $(TEST) -e /usr/include/X11/Intrinsic.h ; then echo x11; fi)) - DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/x11.c - DISPLAYVT = ${DISPLAYD}/vt11.c - DISPLAY_OPT = -DUSE_DISPLAY -I/usr/X11/include -lXt -lX11 -lm - ifneq (,$(GCC_WARNINGS_CMD)$(CLANG_VERSION)) - ifneq (,$(CLANG_VERSION)$(findstring -Wdeprecated-declarations,$(shell $(GCC_WARNINGS_CMD)))) - DISPLAY_OPT += -Wno-deprecated-declarations - endif - endif - else - DISPLAYL = - DISPLAYVT = - DISPLAY_OPT = - endif -else - DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/win32.c - DISPLAYVT = ${DISPLAYD}/vt11.c - DISPLAY_OPT = -DUSE_DISPLAY -lgdi32 -endif # # Emulator source files and compile time options