Add POCO_CONFIG configuration setup.

Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
FrancisANDRE 2015-11-17 11:06:41 +01:00
parent 9e33079bcb
commit 3c63ac98d5

View File

@ -209,30 +209,46 @@ ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
export POCO_BASE=$(shell pwd)
endif
#$(info POCO_BASE = $(POCO_BASE))
ifndef POCO_PREFIX
export POCO_PREFIX=/usr/local
endif
#$(info POCO_PREFIX=$(POCO_PREFIX))
ifndef POCO_BUILD
export POCO_BUILD=$(POCO_BASE)
endif
#$(info POCO_BUILD = $(POCO_BUILD))
#
# Determine OS
#
POCO_HOST_OSNAME = $(shell uname)
ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
ifeq ($(findstring x86_64,$(POCO_HOST_OSNAME)),x86_64)
OSARCH_64BITS = 1
endif
POCO_HOST_OSNAME = CYGWIN
endif
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
POCO_HOST_OSNAME = MinGW
endif
#$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME))
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
#$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH))
#
# If POCO_CONFIG is not set, use the OS name as configuration name
#
ifndef POCO_CONFIG
POCO_CONFIG = $(POCO_HOST_OSNAME)
endif
#$(info POCO_CONFIG = $(POCO_CONFIG))
#
# Include System Specific Settings
#
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
#
# Determine operating system
@ -242,11 +258,14 @@ OSNAME := $(POCO_HOST_OSNAME)
else
OSNAME := $(POCO_TARGET_OSNAME)
endif
#$(info OSNAME = $(OSNAME))
ifndef POCO_TARGET_OSARCH
OSARCH := $(POCO_HOST_OSARCH)
else
OSARCH := $(POCO_TARGET_OSARCH)
endif
#$(info OSARCH = $(OSARCH))
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install