2012-04-23 03:14:34 +02:00
#
# Makefile
#
# The global Makefile for POCO [generated by mkrelease]
#
s i n c l u d e c o n f i g . m a k e
2012-08-20 02:57:17 +02:00
s i n c l u d e c o n f i g . b u i l d
2012-04-23 03:14:34 +02:00
i f n d e f P O C O _ B A S E
$(warning WARNING : POCO_BASE is not defined . Assuming current directory .)
export POCO_BASE = $( shell pwd )
e n d i f
i f n d e f P O C O _ P R E F I X
export POCO_PREFIX = /usr/local
e n d i f
i f n d e f P O C O _ B U I L D
export POCO_BUILD = $( POCO_BASE)
e n d i f
2015-11-19 10:21:59 +01:00
#
# Determine OS
#
POCO_HOST_OSNAME = $( shell uname)
i f e q ( $( findstring CYGWIN ,$ ( POCO_HOST_OSNAME ) ) , C Y G W I N )
POCO_HOST_OSNAME = Cygwin
e n d i f
i f e q ( $( findstring MINGW ,$ ( POCO_HOST_OSNAME ) ) , M I N G W )
POCO_HOST_OSNAME = MinGW
e n d i f
POCO_HOST_OSARCH ?= $( subst /,-,$( shell uname -m | tr ' ' _) )
#
# If POCO_CONFIG is not set, use the OS name as configuration name
#
i f n d e f P O C O _ C O N F I G
POCO_CONFIG = $( POCO_HOST_OSNAME)
e n d i f
#$(info POCO_CONFIG = $(POCO_CONFIG))
#
# Include System Specific Settings
#
i n c l u d e $( POCO_BASE ) / b u i l d / c o n f i g / $( POCO_CONFIG )
#
# Determine operating system
#
i f n d e f P O C O _ T A R G E T _ O S N A M E
OSNAME := $( POCO_HOST_OSNAME)
e l s e
OSNAME := $( POCO_TARGET_OSNAME)
e n d i f
#$(info OSNAME = $(OSNAME))
i f n d e f P O C O _ T A R G E T _ O S A R C H
OSARCH := $( POCO_HOST_OSARCH)
e l s e
OSARCH := $( POCO_TARGET_OSARCH)
e n d i f
#$(info OSARCH = $(OSARCH))
2015-03-30 16:21:01 +02:00
2013-07-23 15:04:48 +02:00
.PHONY : poco all libexecs cppunit tests samples cleans clean distclean install
2012-04-23 03:14:34 +02:00
2013-07-23 15:04:48 +02:00
# TESTS and SAMPLES are set in config.make
poco : libexecs $( if $ ( TESTS ) ,tests ) $( if $ ( SAMPLES ) ,samples )
2012-04-23 03:14:34 +02:00
all : libexecs tests samples
INSTALLDIR = $( DESTDIR) $( POCO_PREFIX)
2016-01-13 14:05:08 +01:00
COMPONENTS = CppUnit Foundation XML JSON Util Net Crypto NetSSL_OpenSSL Data Data/SQLite Data/ODBC Data/MySQL MongoDB Redis Zip PageCompiler PageCompiler/File2Page CppParser PDF
2012-04-23 03:14:34 +02:00
cppunit :
$( MAKE) -C $( POCO_BASE) /CppUnit
2013-07-23 15:04:48 +02:00
CppUnit-clean :
\$ ( MAKE) -C \$ ( POCO_BASE) /CppUnit clean
2012-04-23 03:14:34 +02:00
install : libexecs
mkdir -p $( INSTALLDIR) /include/Poco
2013-07-23 15:04:48 +02:00
mkdir -p $( INSTALLDIR) /lib
2012-04-23 03:14:34 +02:00
mkdir -p $( INSTALLDIR) /bin
2015-10-06 15:41:53 +02:00
for comp in $( filter-out $( foreach f,$( OMIT) ,$f %) ,$( COMPONENTS) ) ; do \
2012-04-23 03:14:34 +02:00
if [ -d " $( POCO_BASE) / $$ comp/include " ] ; then \
cp -Rf $( POCO_BASE) /$$ comp/include/* $( INSTALLDIR) /include/ ; \
fi ; \
if [ -d " $( POCO_BUILD) / $$ comp/bin " ] ; then \
2013-07-23 15:04:48 +02:00
find $( POCO_BUILD) /$$ comp/bin -perm -700 -type f -exec cp -f { } $( INSTALLDIR) /bin \; ; \
2012-04-23 03:14:34 +02:00
fi ; \
done
2015-11-19 10:21:59 +01:00
i f e q ( $( OSNAME ) , C y g w i n )
2016-01-13 14:05:08 +01:00
find $( POCO_BUILD) /lib/$( OSNAME) /$( OSARCH) -name "cygPoco*" -type f -exec cp -f { } $( INSTALLDIR) /bin \;
find $( POCO_BUILD) /lib/$( OSNAME) /$( OSARCH) -name "cygPoco*" -type l -exec cp -Rf { } $( INSTALLDIR) /bin \;
2015-11-19 10:21:59 +01:00
e n d i f
2016-01-13 14:05:08 +01:00
find $( POCO_BUILD) /lib/$( OSNAME) /$( OSARCH) -name "libCppUnit*" -type f -exec cp -f { } $( INSTALLDIR) /lib \;
find $( POCO_BUILD) /lib/$( OSNAME) /$( OSARCH) -name "libCppUnit*" -type l -exec cp -Rf { } $( INSTALLDIR) /lib \;
find $( POCO_BUILD) /lib/$( OSNAME) /$( OSARCH) -name "libPoco*" -type f -exec cp -f { } $( INSTALLDIR) /lib \;
find $( POCO_BUILD) /lib/$( OSNAME) /$( OSARCH) -name "libPoco*" -type l -exec cp -Rf { } $( INSTALLDIR) /lib \;
2012-04-23 03:14:34 +02:00
2015-10-22 18:54:44 +02:00
libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec MongoDB-libexec Redis-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec CppParser-libexec PDF-libexec
tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests MongoDB-tests Redis-tests Zip-tests CppParser-tests PDF-tests
2013-07-23 15:04:48 +02:00
samples = Foundation-samples XML-samples JSON-samples Util-samples Net-samples Crypto-samples NetSSL_OpenSSL-samples Data-samples MongoDB-samples Zip-samples PageCompiler-samples PDF-samples
2015-10-22 18:54:44 +02:00
cleans = Foundation-clean XML-clean JSON-clean Util-clean Net-clean Crypto-clean NetSSL_OpenSSL-clean Data-clean Data/SQLite-clean Data/ODBC-clean Data/MySQL-clean MongoDB-clean Redis-clean Zip-clean PageCompiler-clean PageCompiler/File2Page-clean CppParser-clean PDF-clean
2012-04-23 03:14:34 +02:00
.PHONY : $( libexecs )
.PHONY : $( tests )
.PHONY : $( samples )
2013-07-23 15:04:48 +02:00
.PHONY : $( cleans )
2012-04-23 03:14:34 +02:00
libexecs : $( filter -out $ ( foreach f ,$ ( OMIT ) ,$ f %) ,$ ( libexecs ) )
tests : $( filter -out $ ( foreach f ,$ ( OMIT ) ,$ f %) ,$ ( tests ) )
samples : $( filter -out $ ( foreach f ,$ ( OMIT ) ,$ f %) ,$ ( samples ) )
2013-07-23 15:04:48 +02:00
cleans : $( filter -out $ ( foreach f ,$ ( OMIT ) ,$ f %) ,$ ( cleans ) )
2012-04-23 03:14:34 +02:00
Foundation-libexec :
$( MAKE) -C $( POCO_BASE) /Foundation
Foundation-tests : Foundation -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Foundation/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
Foundation-samples : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Foundation/samples
2013-07-23 15:04:48 +02:00
Foundation-clean :
$( MAKE) -C $( POCO_BASE) /Foundation clean
$( MAKE) -C $( POCO_BASE) /Foundation/testsuite clean
$( MAKE) -C $( POCO_BASE) /Foundation/samples clean
2012-04-23 03:14:34 +02:00
XML-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /XML
XML-tests : XML -libexec cppunit
$( MAKE) -C $( POCO_BASE) /XML/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
XML-samples : XML -libexec
$( MAKE) -C $( POCO_BASE) /XML/samples
2013-07-23 15:04:48 +02:00
XML-clean :
$( MAKE) -C $( POCO_BASE) /XML clean
$( MAKE) -C $( POCO_BASE) /XML/testsuite clean
$( MAKE) -C $( POCO_BASE) /XML/samples clean
2012-05-11 21:59:17 +02:00
JSON-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /JSON
JSON-tests : JSON -libexec cppunit
$( MAKE) -C $( POCO_BASE) /JSON/testsuite
2013-07-23 15:04:48 +02:00
2012-06-11 22:39:40 +02:00
JSON-samples : JSON -libexec
$( MAKE) -C $( POCO_BASE) /JSON/samples
2012-05-11 21:59:17 +02:00
2013-07-23 15:04:48 +02:00
JSON-clean :
$( MAKE) -C $( POCO_BASE) /JSON clean
$( MAKE) -C $( POCO_BASE) /JSON/testsuite clean
$( MAKE) -C $( POCO_BASE) /JSON/samples clean
Util-libexec : Foundation -libexec XML -libexec JSON -libexec
2012-04-23 03:14:34 +02:00
$( MAKE) -C $( POCO_BASE) /Util
Util-tests : Util -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Util/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
Util-samples : Util -libexec
$( MAKE) -C $( POCO_BASE) /Util/samples
2013-07-23 15:04:48 +02:00
Util-clean :
$( MAKE) -C $( POCO_BASE) /Util clean
$( MAKE) -C $( POCO_BASE) /Util/testsuite clean
$( MAKE) -C $( POCO_BASE) /Util/samples clean
2012-04-23 03:14:34 +02:00
Net-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Net
Net-tests : Net -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Net/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
Net-samples : Net -libexec Foundation -libexec XML -libexec Util -libexec
$( MAKE) -C $( POCO_BASE) /Net/samples
2013-07-23 15:04:48 +02:00
Net-clean :
$( MAKE) -C $( POCO_BASE) /Net clean
$( MAKE) -C $( POCO_BASE) /Net/testsuite clean
$( MAKE) -C $( POCO_BASE) /Net/samples clean
2012-04-23 03:14:34 +02:00
Crypto-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Crypto
Crypto-tests : Crypto -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Crypto/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
Crypto-samples : Crypto -libexec Foundation -libexec Util -libexec
$( MAKE) -C $( POCO_BASE) /Crypto/samples
2013-07-23 15:04:48 +02:00
Crypto-clean :
$( MAKE) -C $( POCO_BASE) /Crypto clean
$( MAKE) -C $( POCO_BASE) /Crypto/testsuite clean
$( MAKE) -C $( POCO_BASE) /Crypto/samples clean
2012-04-23 03:14:34 +02:00
NetSSL_OpenSSL-libexec : Foundation -libexec Net -libexec Util -libexec Crypto -libexec
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL
NetSSL_OpenSSL-tests : NetSSL_OpenSSL -libexec cppunit
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
NetSSL_OpenSSL-samples : NetSSL_OpenSSL -libexec
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL/samples
2013-07-23 15:04:48 +02:00
NetSSL_OpenSSL-clean :
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL clean
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL/testsuite clean
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL/samples clean
2012-04-23 03:14:34 +02:00
Data-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Data
Data-tests : Data -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Data/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
Data-samples : Data -libexec Data -libexec Data /SQLite -libexec
$( MAKE) -C $( POCO_BASE) /Data/samples
2013-07-23 15:04:48 +02:00
Data-clean :
$( MAKE) -C $( POCO_BASE) /Data clean
$( MAKE) -C $( POCO_BASE) /Data/testsuite clean
$( MAKE) -C $( POCO_BASE) /Data/samples clean
2012-04-23 03:14:34 +02:00
Data/SQLite-libexec : Foundation -libexec Data -libexec
$( MAKE) -C $( POCO_BASE) /Data/SQLite
Data/SQLite-tests : Data /SQLite -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Data/SQLite/testsuite
2013-07-23 15:04:48 +02:00
Data/SQLite-clean :
$( MAKE) -C $( POCO_BASE) /Data/SQLite clean
$( MAKE) -C $( POCO_BASE) /Data/SQLite/testsuite clean
2012-04-23 03:14:34 +02:00
Data/ODBC-libexec : Foundation -libexec Data -libexec
$( MAKE) -C $( POCO_BASE) /Data/ODBC
Data/ODBC-tests : Data /ODBC -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Data/ODBC/testsuite
2013-07-23 15:04:48 +02:00
Data/ODBC-clean :
$( MAKE) -C $( POCO_BASE) /Data/ODBC clean
$( MAKE) -C $( POCO_BASE) /Data/ODBC/testsuite clean
2012-04-23 03:14:34 +02:00
Data/MySQL-libexec : Foundation -libexec Data -libexec
$( MAKE) -C $( POCO_BASE) /Data/MySQL
Data/MySQL-tests : Data /MySQL -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Data/MySQL/testsuite
2013-07-23 15:04:48 +02:00
Data/MySQL-clean :
$( MAKE) -C $( POCO_BASE) /Data/MySQL clean
$( MAKE) -C $( POCO_BASE) /Data/MySQL/testsuite clean
MongoDB-libexec : Foundation -libexec Net -libexec
$( MAKE) -C $( POCO_BASE) /MongoDB
MongoDB-tests : MongoDB -libexec cppunit
$( MAKE) -C $( POCO_BASE) /MongoDB/testsuite
MongoDB-samples : MongoDB -libexec
$( MAKE) -C $( POCO_BASE) /MongoDB/samples
MongoDB-clean :
$( MAKE) -C $( POCO_BASE) /MongoDB clean
$( MAKE) -C $( POCO_BASE) /MongoDB/testsuite clean
$( MAKE) -C $( POCO_BASE) /MongoDB/samples clean
2015-10-22 18:54:44 +02:00
Redis-libexec : Foundation -libexec Net -libexec
$( MAKE) -C $( POCO_BASE) /Redis
Redis-tests : Redis -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Redis/testsuite
#No samples yet ... uncomment this when added, and add Redis-samples to samples above
#Redis-samples: Redis-libexec
# $(MAKE) -C $(POCO_BASE)/Redis/samples
Redis-clean :
$( MAKE) -C $( POCO_BASE) /Redis clean
$( MAKE) -C $( POCO_BASE) /Redis/testsuite clean
# $(MAKE) -C $(POCO_BASE)/Redis/samples clean
2012-04-23 03:14:34 +02:00
Zip-libexec : Foundation -libexec Net -libexec Util -libexec XML -libexec
$( MAKE) -C $( POCO_BASE) /Zip
Zip-tests : Zip -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Zip/testsuite
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
Zip-samples : Zip -libexec
$( MAKE) -C $( POCO_BASE) /Zip/samples
2013-07-23 15:04:48 +02:00
Zip-clean :
$( MAKE) -C $( POCO_BASE) /Zip clean
$( MAKE) -C $( POCO_BASE) /Zip/testsuite clean
$( MAKE) -C $( POCO_BASE) /Zip/samples clean
2012-04-23 03:14:34 +02:00
PageCompiler-libexec : Net -libexec Util -libexec XML -libexec Foundation -libexec
$( MAKE) -C $( POCO_BASE) /PageCompiler
2013-07-23 15:04:48 +02:00
2012-04-23 03:14:34 +02:00
PageCompiler-samples : PageCompiler -libexec
$( MAKE) -C $( POCO_BASE) /PageCompiler/samples
2013-07-23 15:04:48 +02:00
PageCompiler-clean :
$( MAKE) -C $( POCO_BASE) /PageCompiler clean
$( MAKE) -C $( POCO_BASE) /PageCompiler/samples clean
2012-04-23 03:14:34 +02:00
PageCompiler/File2Page-libexec : Net -libexec Util -libexec XML -libexec Foundation -libexec
$( MAKE) -C $( POCO_BASE) /PageCompiler/File2Page
2013-07-23 15:04:48 +02:00
PageCompiler/File2Page-clean :
$( MAKE) -C $( POCO_BASE) /PageCompiler/File2Page clean
2012-04-23 12:51:39 +02:00
2013-07-23 15:04:48 +02:00
CppParser-libexec : Foundation -libexec
2012-04-24 14:27:49 +02:00
$( MAKE) -C $( POCO_BASE) /CppParser
2013-07-23 15:04:48 +02:00
CppParser-tests : CppParser -libexec cppunit
2012-04-24 14:27:49 +02:00
$( MAKE) -C $( POCO_BASE) /CppParser/testsuite
2013-07-23 15:04:48 +02:00
CppParser-clean :
$( MAKE) -C $( POCO_BASE) /CppParser clean
$( MAKE) -C $( POCO_BASE) /CppParser/testsuite clean
2013-02-16 20:53:48 +01:00
2013-07-23 15:04:48 +02:00
PDF-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /PDF
2013-02-16 20:53:48 +01:00
2013-07-23 15:04:48 +02:00
PDF-tests : PDF -libexec cppunit
$( MAKE) -C $( POCO_BASE) /PDF/testsuite
PDF-samples : PDF -libexec
$( MAKE) -C $( POCO_BASE) /PDF/samples
2012-04-23 12:51:39 +02:00
2013-07-23 15:04:48 +02:00
PDF-clean :
2012-04-23 12:51:39 +02:00
$( MAKE) -C $( POCO_BASE) /PDF clean
$( MAKE) -C $( POCO_BASE) /PDF/testsuite clean
$( MAKE) -C $( POCO_BASE) /PDF/samples clean
2013-07-23 15:04:48 +02:00
clean : cleans CppUnit -clean
2012-04-23 03:14:34 +02:00
distclean :
rm -rf $( POCO_BUILD) /lib
2013-07-23 15:04:48 +02:00
find $( POCO_BUILD) -name obj -type d -print0 | xargs -0 rm -rf
find $( POCO_BUILD) -name .dep -type d -print0 | xargs -0 rm -rf
find $( POCO_BUILD) -name bin -type d -print0 | xargs -0 rm -rf