Use POCO_CONFIG for POCO_TARGET_OSARCH & POCO_TAREG_OSNAME.

Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
FrancisANDRE 2015-11-17 10:17:58 +01:00
parent e9c43f0d59
commit 3a79011e3a

View File

@ -11,23 +11,23 @@ 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
@ -36,6 +36,19 @@ POCO_HOST_OSNAME = MinGW
endif endif
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _)) POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
#
# 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
# #
@ -44,11 +57,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
@ -151,7 +167,7 @@ Util-samples: Util-libexec
$(MAKE) -C $(POCO_BASE)/Util/samples $(MAKE) -C $(POCO_BASE)/Util/samples
Util-clean: Util-clean:
$(MAKE) -C $(POCO_BASE)/Util clean $(MAKE) -C $(POCO_BASE)/Util clean
$(MAKE) -C $(POCO_BASE)/Util/testsuite clean $(MAKE) -C $(POCO_BASE)/Util/testsuite clean
$(MAKE) -C $(POCO_BASE)/Util/samples clean $(MAKE) -C $(POCO_BASE)/Util/samples clean