mirror of
https://github.com/simh/simh.git
synced 2026-04-27 20:38:04 +00:00
OSX build: Added more flexible toolchain support for more recent OS X and xCode versions.
This commit is contained in:
2
makefile
2
makefile
@@ -150,6 +150,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||||||
ifeq (Darwin,$(OSTYPE))
|
ifeq (Darwin,$(OSTYPE))
|
||||||
OSNAME = OSX
|
OSNAME = OSX
|
||||||
LIBEXT = dylib
|
LIBEXT = dylib
|
||||||
|
INCPATH:=$(shell $(GCC) -x c -v -E /dev/null 2>&1 | grep -A 10 '#include <...> search starts here:' | grep '^ /' | grep -v '(framework directory)' | tr -d '\n')
|
||||||
ifeq (incopt,$(shell if $(TEST) -d /opt/local/include; then echo incopt; fi))
|
ifeq (incopt,$(shell if $(TEST) -d /opt/local/include; then echo incopt; fi))
|
||||||
INCPATH += /opt/local/include
|
INCPATH += /opt/local/include
|
||||||
OS_CCDEFS += -I/opt/local/include
|
OS_CCDEFS += -I/opt/local/include
|
||||||
@@ -262,6 +263,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
$(info lib paths are: $(LIBPATH))
|
$(info lib paths are: $(LIBPATH))
|
||||||
|
$(info include paths are: $(INCPATH))
|
||||||
find_lib = $(strip $(firstword $(foreach dir,$(strip $(LIBPATH)),$(wildcard $(dir)/lib$(1).$(LIBEXT)))))
|
find_lib = $(strip $(firstword $(foreach dir,$(strip $(LIBPATH)),$(wildcard $(dir)/lib$(1).$(LIBEXT)))))
|
||||||
find_include = $(strip $(firstword $(foreach dir,$(strip $(INCPATH)),$(wildcard $(dir)/$(1).h))))
|
find_include = $(strip $(firstword $(foreach dir,$(strip $(INCPATH)),$(wildcard $(dir)/$(1).h))))
|
||||||
ifneq (,$(call find_lib,m))
|
ifneq (,$(call find_lib,m))
|
||||||
|
|||||||
Reference in New Issue
Block a user