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.) $(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
export POCO_BASE=$(shell pwd) export POCO_BASE=$(shell pwd)
endif endif
#$(info POCO_BASE = $(POCO_BASE))
ifndef POCO_PREFIX ifndef POCO_PREFIX
export POCO_PREFIX=/usr/local export POCO_PREFIX=/usr/local
endif endif
#$(info POCO_PREFIX=$(POCO_PREFIX))
ifndef POCO_BUILD ifndef POCO_BUILD
export POCO_BUILD=$(POCO_BASE) export POCO_BUILD=$(POCO_BASE)
endif endif
#$(info POCO_BUILD = $(POCO_BUILD))
# #
# Determine OS # Determine OS
# #
POCO_HOST_OSNAME = $(shell uname) POCO_HOST_OSNAME = $(shell uname)
ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN) ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
ifeq ($(findstring x86_64,$(POCO_HOST_OSNAME)),x86_64)
OSARCH_64BITS = 1
endif
POCO_HOST_OSNAME = CYGWIN POCO_HOST_OSNAME = CYGWIN
endif endif
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW) ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
POCO_HOST_OSNAME = MinGW POCO_HOST_OSNAME = MinGW
endif endif
#$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME))
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _)) 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 # Determine operating system
@ -242,11 +258,14 @@ OSNAME := $(POCO_HOST_OSNAME)
else else
OSNAME := $(POCO_TARGET_OSNAME) OSNAME := $(POCO_TARGET_OSNAME)
endif endif
#$(info OSNAME = $(OSNAME))
ifndef POCO_TARGET_OSARCH ifndef POCO_TARGET_OSARCH
OSARCH := $(POCO_HOST_OSARCH) OSARCH := $(POCO_HOST_OSARCH)
else else
OSARCH := $(POCO_TARGET_OSARCH) OSARCH := $(POCO_TARGET_OSARCH)
endif endif
#$(info OSARCH = $(OSARCH))
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install .PHONY: poco all libexecs cppunit tests samples cleans clean distclean install