makefile: Provide specific advice on macOS about dependent packages
This commit is contained in:
parent
970fb8ec95
commit
6a249c6246
1 changed files with 75 additions and 27 deletions
102
makefile
102
makefile
|
@ -56,16 +56,18 @@
|
||||||
# simh project support is provided for simulators that are built with
|
# simh project support is provided for simulators that are built with
|
||||||
# dependent packages provided with the or by the operating system
|
# dependent packages provided with the or by the operating system
|
||||||
# distribution OR for platforms where that isn't directly available
|
# distribution OR for platforms where that isn't directly available
|
||||||
# (OS X) by packages from specific package management systems (MacPorts
|
# (OS X/macOS) by packages from specific package management systems (MacPorts
|
||||||
# or Homebrew). Users wanting to build simulators with locally build
|
# or Homebrew). Users wanting to build simulators with locally built
|
||||||
# dependent packages or packages provided by an unsupported package
|
# dependent packages or packages provided by an unsupported package
|
||||||
# management system can override where this procedure looks for include
|
# management system may be able to override where this procedure looks
|
||||||
# files and/or libraries. Overrides can be specified by define exported
|
# for include files and/or libraries. Overrides can be specified by define
|
||||||
# environment variables or GNU make command line arguments which specify
|
# exported environment variables or GNU make command line arguments which
|
||||||
# INCLUDES and/or LIBRARIES.
|
# specify INCLUDES and/or LIBRARIES.
|
||||||
# Each of these, if specified, must be the complete list include directories
|
# Each of these, if specified, must be the complete list include directories
|
||||||
# or library directories that should be used with each element separated by
|
# or library directories that should be used with each element separated by
|
||||||
# colons. (i.e. INCLUDES=/usr/include/:/usr/local/include/:...)
|
# colons. (i.e. INCLUDES=/usr/include/:/usr/local/include/:...)
|
||||||
|
# If this doesn't work for you and/or you're interested in using a different
|
||||||
|
# ToolChain, you're free to solve this problem on your own. Good Luck.
|
||||||
#
|
#
|
||||||
# Some environments may have the LLVM (clang) compiler installed as
|
# Some environments may have the LLVM (clang) compiler installed as
|
||||||
# an alternate to gcc. If you want to build with the clang compiler,
|
# an alternate to gcc. If you want to build with the clang compiler,
|
||||||
|
@ -170,6 +172,7 @@ ifneq ($(findstring Windows,${OS}),)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
find_exe = $(abspath $(strip $(firstword $(foreach dir,$(strip $(subst :, ,${PATH})),$(wildcard $(dir)/$(1))))))
|
find_exe = $(abspath $(strip $(firstword $(foreach dir,$(strip $(subst :, ,${PATH})),$(wildcard $(dir)/$(1))))))
|
||||||
find_lib = $(abspath $(strip $(firstword $(foreach dir,$(strip ${LIBPATH}),$(wildcard $(dir)/lib$(1).${LIBEXT})))))
|
find_lib = $(abspath $(strip $(firstword $(foreach dir,$(strip ${LIBPATH}),$(wildcard $(dir)/lib$(1).${LIBEXT})))))
|
||||||
find_include = $(abspath $(strip $(firstword $(foreach dir,$(strip ${INCPATH}),$(wildcard $(dir)/$(1).h)))))
|
find_include = $(abspath $(strip $(firstword $(foreach dir,$(strip ${INCPATH}),$(wildcard $(dir)/$(1).h)))))
|
||||||
|
@ -201,6 +204,28 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
|
||||||
OSTYPE = cygwin
|
OSTYPE = cygwin
|
||||||
OSNAME = windows-build
|
OSNAME = windows-build
|
||||||
endif
|
endif
|
||||||
|
ifeq (Darwin,$(OSTYPE))
|
||||||
|
ifeq (,$(shell which port)$(shell which brew))
|
||||||
|
$(info *** Info *** simh dependent packages on macOS must be provided by either the)
|
||||||
|
$(info *** Info *** MacPorts package system or by the HomeBrew package system.)
|
||||||
|
$(info *** Info *** Neither of these seem to be installed on the local system.)
|
||||||
|
$(info *** Info ***)
|
||||||
|
ifeq (,$(INCLUDES)$(LIBRARIES))
|
||||||
|
$(info *** Info *** Users wanting to build simulators with locally built dependent)
|
||||||
|
$(info *** Info *** packages or packages provided by an unsupported package)
|
||||||
|
$(info *** Info *** management system may be able to override where this procedure)
|
||||||
|
$(info *** Info *** looks for include files and/or libraries. Overrides can be)
|
||||||
|
$(info *** Info *** specified by defining exported environment variables or GNU make)
|
||||||
|
$(info *** Info *** command line arguments which specify INCLUDES and/or LIBRARIES.)
|
||||||
|
$(info *** Info *** If this works, that's great, if it doesn't you are on your own!)
|
||||||
|
else
|
||||||
|
$(info *** Warning *** Attempting to build on macOS with:)
|
||||||
|
$(info *** Warning *** INCLUDES defined as $(INCLUDES))
|
||||||
|
$(info *** Warning *** and)
|
||||||
|
$(info *** Warning *** LIBRARIES defined as $(LIBRARIES))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifeq (,$(shell ${GCC} -v /dev/null 2>&1 | grep 'clang'))
|
ifeq (,$(shell ${GCC} -v /dev/null 2>&1 | grep 'clang'))
|
||||||
GCC_VERSION = $(shell ${GCC} -v /dev/null 2>&1 | grep 'gcc version' | awk '{ print $$3 }')
|
GCC_VERSION = $(shell ${GCC} -v /dev/null 2>&1 | grep 'gcc version' | awk '{ print $$3 }')
|
||||||
COMPILER_NAME = GCC Version: $(GCC_VERSION)
|
COMPILER_NAME = GCC Version: $(GCC_VERSION)
|
||||||
|
@ -630,19 +655,29 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
|
||||||
endif
|
endif
|
||||||
ifeq (,$(findstring HAVE_LIBSDL,$(VIDEO_CCDEFS)))
|
ifeq (,$(findstring HAVE_LIBSDL,$(VIDEO_CCDEFS)))
|
||||||
$(info *** Info ***)
|
$(info *** Info ***)
|
||||||
$(info *** Info *** The simulator$(BUILD_MULTIPLE) you are building could provide more)
|
$(info *** Info *** The simulator$(BUILD_MULTIPLE) you are building could provide more functionality)
|
||||||
$(info *** Info *** functionality if video support were available on your system.)
|
$(info *** Info *** if video support was available on your system.)
|
||||||
|
$(info *** Info *** To gain this functionality:)
|
||||||
ifeq (Darwin,$(OSTYPE))
|
ifeq (Darwin,$(OSTYPE))
|
||||||
$(info *** Info *** Install the MacPorts libSDL2 package to provide this)
|
ifeq (/opt/local/bin/port,$(shell which port))
|
||||||
$(info *** Info *** functionality for your OS X system:)
|
$(info *** Info *** Install the MacPorts libSDL2 package to provide this)
|
||||||
$(info *** Info *** # port install libsdl2 libpng zlib)
|
$(info *** Info *** functionality for your OS X system:)
|
||||||
|
$(info *** Info *** # port install libsdl2 libpng zlib)
|
||||||
|
endif
|
||||||
ifeq (/usr/local/bin/brew,$(shell which brew))
|
ifeq (/usr/local/bin/brew,$(shell which brew))
|
||||||
$(info *** Info ***)
|
ifeq (/opt/local/bin/port,$(shell which port))
|
||||||
$(info *** Info *** OR)
|
$(info *** Info ***)
|
||||||
$(info *** Info ***)
|
$(info *** Info *** OR)
|
||||||
|
$(info *** Info ***)
|
||||||
|
endif
|
||||||
$(info *** Info *** Install the HomeBrew libSDL2 package to provide this)
|
$(info *** Info *** Install the HomeBrew libSDL2 package to provide this)
|
||||||
$(info *** Info *** functionality for your OS X system:)
|
$(info *** Info *** functionality for your OS X system:)
|
||||||
$(info *** Info *** $$ brew install sdl2 libpng zlib)
|
$(info *** Info *** $$ brew install sdl2 libpng zlib)
|
||||||
|
else
|
||||||
|
ifeq (,$(shell which port))
|
||||||
|
$(info *** Info *** Install MacPorts or HomeBrew and rerun this make for)
|
||||||
|
$(info *** Info *** specific advice)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifneq (,$(and $(findstring Linux,$(OSTYPE)),$(call find_exe,apt-get)))
|
ifneq (,$(and $(findstring Linux,$(OSTYPE)),$(call find_exe,apt-get)))
|
||||||
|
@ -828,16 +863,25 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
|
||||||
$(info *** Info ***)
|
$(info *** Info ***)
|
||||||
$(info *** Info *** To build simulator(s) with extended networking support you)
|
$(info *** Info *** To build simulator(s) with extended networking support you)
|
||||||
ifeq (Darwin,$(OSTYPE))
|
ifeq (Darwin,$(OSTYPE))
|
||||||
$(info *** Info *** should install the MacPorts vde2 package to provide this)
|
ifeq (/opt/local/bin/port,$(shell which port))
|
||||||
$(info *** Info *** functionality for your OS X system:)
|
$(info *** Info *** should install the MacPorts vde2 package to provide this)
|
||||||
$(info *** Info *** # port install vde2)
|
$(info *** Info *** functionality for your OS X system:)
|
||||||
|
$(info *** Info *** # port install vde2)
|
||||||
|
endif
|
||||||
ifeq (/usr/local/bin/brew,$(shell which brew))
|
ifeq (/usr/local/bin/brew,$(shell which brew))
|
||||||
$(info *** Info ***)
|
ifeq (/opt/local/bin/port,$(shell which port))
|
||||||
$(info *** Info *** OR)
|
$(info *** Info ***)
|
||||||
$(info *** Info ***)
|
$(info *** Info *** OR)
|
||||||
$(info *** Info *** Install the HomeBrew vde package to provide this)
|
$(info *** Info ***)
|
||||||
|
endif
|
||||||
|
$(info *** Info *** should install the HomeBrew vde package to provide this)
|
||||||
$(info *** Info *** functionality for your OS X system:)
|
$(info *** Info *** functionality for your OS X system:)
|
||||||
$(info *** Info *** $$ brew install vde)
|
$(info *** Info *** $$ brew install vde)
|
||||||
|
else
|
||||||
|
ifeq (,$(shell which port))
|
||||||
|
$(info *** Info *** should install MacPorts or HomeBrew and rerun this make for)
|
||||||
|
$(info *** Info *** specific advice)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifneq (,$(and $(findstring Linux,$(OSTYPE)),$(call find_exe,apt-get)))
|
ifneq (,$(and $(findstring Linux,$(OSTYPE)),$(call find_exe,apt-get)))
|
||||||
|
@ -1931,13 +1975,17 @@ ifneq (,$(BESM6_BUILD))
|
||||||
$(info *** No SDL ttf support available. BESM-6 video panel disabled.)
|
$(info *** No SDL ttf support available. BESM-6 video panel disabled.)
|
||||||
$(info ***)
|
$(info ***)
|
||||||
ifeq (Darwin,$(OSTYPE))
|
ifeq (Darwin,$(OSTYPE))
|
||||||
$(info *** Info *** Install the MacPorts libSDL2-ttf development package to provide this)
|
ifeq (/opt/local/bin/port,$(shell which port))
|
||||||
$(info *** Info *** functionality for your OS X system:)
|
$(info *** Info *** Install the MacPorts libSDL2-ttf development package to provide this)
|
||||||
$(info *** Info *** # port install libsdl2-ttf-dev)
|
$(info *** Info *** functionality for your OS X system:)
|
||||||
|
$(info *** Info *** # port install libsdl2-ttf-dev)
|
||||||
|
endif
|
||||||
ifeq (/usr/local/bin/brew,$(shell which brew))
|
ifeq (/usr/local/bin/brew,$(shell which brew))
|
||||||
$(info *** Info ***)
|
ifeq (/opt/local/bin/port,$(shell which port))
|
||||||
$(info *** Info *** OR)
|
$(info *** Info ***)
|
||||||
$(info *** Info ***)
|
$(info *** Info *** OR)
|
||||||
|
$(info *** Info ***)
|
||||||
|
endif
|
||||||
$(info *** Info *** Install the HomeBrew sdl2_ttf package to provide this)
|
$(info *** Info *** Install the HomeBrew sdl2_ttf package to provide this)
|
||||||
$(info *** Info *** functionality for your OS X system:)
|
$(info *** Info *** functionality for your OS X system:)
|
||||||
$(info *** Info *** $$ brew install sdl2_ttf)
|
$(info *** Info *** $$ brew install sdl2_ttf)
|
||||||
|
|
Loading…
Add table
Reference in a new issue