MAKEFILE: Fix locale issues while locating include and library paths
As reported in #284
This commit is contained in:
parent
3a4e879c07
commit
fb8f630ea9
1 changed files with 4 additions and 4 deletions
8
makefile
8
makefile
|
@ -180,11 +180,11 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
GCC_OPTIMIZERS_CMD = $(GCC) -v --help 2>&1
|
GCC_OPTIMIZERS_CMD = $(GCC) -v --help 2>&1
|
||||||
GCC_WARNINGS_CMD = $(GCC) -v --help 2>&1
|
GCC_WARNINGS_CMD = $(GCC) -v --help 2>&1
|
||||||
LD_ELF = $(shell echo | $(GCC) -E -dM - | grep __ELF__)
|
LD_ELF = $(shell echo | $(GCC) -E -dM - | grep __ELF__)
|
||||||
INCPATH:=$(shell $(GCC) -x c -v -E /dev/null 2>&1 | grep -A 10 '> search starts here' | grep '^ ' | tr -d '\n')
|
INCPATH:=$(shell LANG=C; $(GCC) -x c -v -E /dev/null 2>&1 | grep -A 10 '> search starts here' | grep '^ ' | tr -d '\n')
|
||||||
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 '> search starts here' | grep '^ ' | grep -v 'framework directory' | tr -d '\n')
|
INCPATH:=$(shell LANG=C; $(GCC) -x c -v -E /dev/null 2>&1 | grep -A 10 '> 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
|
||||||
|
@ -204,7 +204,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
else
|
else
|
||||||
ifeq (SunOS,$(OSTYPE))
|
ifeq (SunOS,$(OSTYPE))
|
||||||
OSNAME = Solaris
|
OSNAME = Solaris
|
||||||
LIBPATH := $(shell crle | grep 'Default Library Path' | awk '{ print $$5 }' | sed 's/:/ /g')
|
LIBPATH := $(shell LANG=C; crle | grep 'Default Library Path' | awk '{ print $$5 }' | sed 's/:/ /g')
|
||||||
LIBEXT = so
|
LIBEXT = so
|
||||||
OS_LDFLAGS += -lsocket -lnsl
|
OS_LDFLAGS += -lsocket -lnsl
|
||||||
ifeq (incsfw,$(shell if $(TEST) -d /opt/sfw/include; then echo incsfw; fi))
|
ifeq (incsfw,$(shell if $(TEST) -d /opt/sfw/include; then echo incsfw; fi))
|
||||||
|
@ -250,7 +250,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
else
|
else
|
||||||
ifeq (,$(findstring NetBSD,$(OSTYPE)))
|
ifeq (,$(findstring NetBSD,$(OSTYPE)))
|
||||||
ifneq (no ldconfig,$(findstring no ldconfig,$(shell which ldconfig 2>&1)))
|
ifneq (no ldconfig,$(findstring no ldconfig,$(shell which ldconfig 2>&1)))
|
||||||
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
LDSEARCH :=$(shell LANG=C; ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
||||||
endif
|
endif
|
||||||
ifneq (,$(LDSEARCH))
|
ifneq (,$(LDSEARCH))
|
||||||
LIBPATH := $(LDSEARCH)
|
LIBPATH := $(LDSEARCH)
|
||||||
|
|
Loading…
Add table
Reference in a new issue