2012-04-23 05:14:34 +04: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 04:57:17 +04:00
s i n c l u d e c o n f i g . b u i l d
2012-04-23 05:14:34 +04: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
2012-07-07 20:03:21 +04:00
# if we've built both static and shared, install shared
i f e q ( $( LINKMODE ) , B O T H )
SHAREDONLY = '(' -name static -prune ')' -o
e n d i f
2012-08-20 04:57:17 +04:00
# TESTS and SAMPLES are set by confgure script in config.make
poco : libexecs $( if $ ( TESTS ) ,tests ) $( if $ ( SAMPLES ) ,samples )
2012-04-23 05:14:34 +04:00
all : libexecs tests samples
INSTALLDIR = $( DESTDIR) $( POCO_PREFIX)
2012-05-02 08:22:16 +04:00
COMPONENTS = Foundation XML Util Net Crypto NetSSL_OpenSSL Data Data/SQLite Data/ODBC Data/MySQL Zip PageCompiler PageCompiler/File2Page PDF CppParser JSON
2012-04-23 05:14:34 +04:00
cppunit :
$( MAKE) -C $( POCO_BASE) /CppUnit
install : libexecs
mkdir -p $( INSTALLDIR) /include/Poco
2012-07-07 20:03:21 +04:00
mkdir -p $( INSTALLDIR) /lib$( LIB64SUFFIX)
2012-04-23 05:14:34 +04:00
mkdir -p $( INSTALLDIR) /bin
for comp in $( COMPONENTS) ; do \
if [ -d " $( POCO_BASE) / $$ comp/include " ] ; then \
cp -Rf $( POCO_BASE) /$$ comp/include/* $( INSTALLDIR) /include/ ; \
fi ; \
if [ -d " $( POCO_BUILD) / $$ comp/bin " ] ; then \
2012-07-07 20:03:21 +04:00
find $( POCO_BUILD) /$$ comp/bin $( SHAREDONLY) '(' -perm -700 -type f -exec cp -f { } $( INSTALLDIR) /bin \; ')' ; \
2012-04-23 05:14:34 +04:00
fi ; \
done
2012-07-07 20:03:21 +04:00
find $( POCO_BUILD) /lib -name "libPoco*" -type f -exec cp -f { } $( INSTALLDIR) /lib$( LIB64SUFFIX) \;
find $( POCO_BUILD) /lib -name "libPoco*" -type l -exec cp -Rf { } $( INSTALLDIR) /lib$( LIB64SUFFIX) \;
2012-04-23 05:14:34 +04:00
2012-05-11 23:59:17 +04: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 Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec PDF-libexec CppParser-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 Zip-tests PDF-tests CppParser-tests
samples = Foundation-samples XML-samples JSON-samples Util-samples Net-samples Crypto-samples NetSSL_OpenSSL-samples Data-samples Zip-samples PageCompiler-samples PDF-samples
2012-04-23 05:14:34 +04:00
2012-08-20 04:57:17 +04:00
.PHONY : poco all libexecs cppunit tests samples clean distclean install
2012-04-23 05:14:34 +04:00
.PHONY : $( libexecs )
.PHONY : $( tests )
.PHONY : $( samples )
libexecs : $( filter -out $ ( foreach f ,$ ( OMIT ) ,$ f %) ,$ ( libexecs ) )
tests : $( filter -out $ ( foreach f ,$ ( OMIT ) ,$ f %) ,$ ( tests ) )
samples : $( filter -out $ ( foreach f ,$ ( OMIT ) ,$ f %) ,$ ( samples ) )
Foundation-libexec :
$( MAKE) -C $( POCO_BASE) /Foundation
Foundation-tests : Foundation -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Foundation/testsuite
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
Foundation-samples : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Foundation/samples
XML-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /XML
XML-tests : XML -libexec cppunit
$( MAKE) -C $( POCO_BASE) /XML/testsuite
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
XML-samples : XML -libexec
$( MAKE) -C $( POCO_BASE) /XML/samples
2012-05-11 23:59:17 +04:00
JSON-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /JSON
JSON-tests : JSON -libexec cppunit
$( MAKE) -C $( POCO_BASE) /JSON/testsuite
2012-08-20 04:57:17 +04:00
2012-06-12 00:39:40 +04:00
JSON-samples : JSON -libexec
$( MAKE) -C $( POCO_BASE) /JSON/samples
2012-05-11 23:59:17 +04:00
2012-04-23 05:14:34 +04:00
Util-libexec : Foundation -libexec XML -libexec
$( MAKE) -C $( POCO_BASE) /Util
Util-tests : Util -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Util/testsuite
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
Util-samples : Util -libexec
$( MAKE) -C $( POCO_BASE) /Util/samples
Net-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Net
Net-tests : Net -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Net/testsuite
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
Net-samples : Net -libexec Foundation -libexec XML -libexec Util -libexec
$( MAKE) -C $( POCO_BASE) /Net/samples
Crypto-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Crypto
Crypto-tests : Crypto -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Crypto/testsuite
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
Crypto-samples : Crypto -libexec Foundation -libexec Util -libexec
$( MAKE) -C $( POCO_BASE) /Crypto/samples
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
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
NetSSL_OpenSSL-samples : NetSSL_OpenSSL -libexec
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL/samples
Data-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /Data
Data-tests : Data -libexec cppunit
$( MAKE) -C $( POCO_BASE) /Data/testsuite
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
Data-samples : Data -libexec Data -libexec Data /SQLite -libexec
$( MAKE) -C $( POCO_BASE) /Data/samples
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
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
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
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
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
Zip-samples : Zip -libexec
$( MAKE) -C $( POCO_BASE) /Zip/samples
PageCompiler-libexec : Net -libexec Util -libexec XML -libexec Foundation -libexec
$( MAKE) -C $( POCO_BASE) /PageCompiler
2012-08-20 04:57:17 +04:00
2012-04-23 05:14:34 +04:00
PageCompiler-samples : PageCompiler -libexec
$( MAKE) -C $( POCO_BASE) /PageCompiler/samples
PageCompiler/File2Page-libexec : Net -libexec Util -libexec XML -libexec Foundation -libexec
$( MAKE) -C $( POCO_BASE) /PageCompiler/File2Page
2012-04-23 14:51:39 +04:00
PDF-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /PDF
PDF-tests : PDF -libexec cppunit
$( MAKE) -C $( POCO_BASE) /PDF/testsuite
2012-08-20 04:57:17 +04:00
2012-04-23 14:51:39 +04:00
PDF-samples : PDF -libexec
$( MAKE) -C $( POCO_BASE) /PDF/samples
2012-04-24 16:27:49 +04:00
CppParser-libexec : Foundation -libexec
$( MAKE) -C $( POCO_BASE) /CppParser
CppParser-tests : CppParser -libexec
$( MAKE) -C $( POCO_BASE) /CppParser/testsuite
2012-04-23 14:51:39 +04:00
2012-04-23 05:14:34 +04:00
clean :
$( MAKE) -C $( POCO_BASE) /Foundation clean
$( MAKE) -C $( POCO_BASE) /Foundation/testsuite clean
$( MAKE) -C $( POCO_BASE) /Foundation/samples clean
$( MAKE) -C $( POCO_BASE) /XML clean
$( MAKE) -C $( POCO_BASE) /XML/testsuite clean
$( MAKE) -C $( POCO_BASE) /XML/samples clean
$( MAKE) -C $( POCO_BASE) /Util clean
$( MAKE) -C $( POCO_BASE) /Util/testsuite clean
$( MAKE) -C $( POCO_BASE) /Util/samples clean
$( MAKE) -C $( POCO_BASE) /Net clean
$( MAKE) -C $( POCO_BASE) /Net/testsuite clean
$( MAKE) -C $( POCO_BASE) /Net/samples clean
$( MAKE) -C $( POCO_BASE) /Crypto clean
$( MAKE) -C $( POCO_BASE) /Crypto/testsuite clean
$( MAKE) -C $( POCO_BASE) /Crypto/samples clean
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL clean
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL/testsuite clean
$( MAKE) -C $( POCO_BASE) /NetSSL_OpenSSL/samples clean
$( MAKE) -C $( POCO_BASE) /Data clean
$( MAKE) -C $( POCO_BASE) /Data/testsuite clean
$( MAKE) -C $( POCO_BASE) /Data/samples clean
$( MAKE) -C $( POCO_BASE) /Data/SQLite clean
$( MAKE) -C $( POCO_BASE) /Data/SQLite/testsuite clean
$( MAKE) -C $( POCO_BASE) /Data/ODBC clean
$( MAKE) -C $( POCO_BASE) /Data/ODBC/testsuite clean
$( MAKE) -C $( POCO_BASE) /Data/MySQL clean
$( MAKE) -C $( POCO_BASE) /Data/MySQL/testsuite clean
$( MAKE) -C $( POCO_BASE) /Zip clean
$( MAKE) -C $( POCO_BASE) /Zip/testsuite clean
$( MAKE) -C $( POCO_BASE) /Zip/samples clean
$( MAKE) -C $( POCO_BASE) /PageCompiler clean
$( MAKE) -C $( POCO_BASE) /PageCompiler/samples clean
$( MAKE) -C $( POCO_BASE) /PageCompiler/File2Page clean
2012-04-23 14:51:39 +04:00
$( MAKE) -C $( POCO_BASE) /PDF clean
$( MAKE) -C $( POCO_BASE) /PDF/testsuite clean
$( MAKE) -C $( POCO_BASE) /PDF/samples clean
2012-04-24 16:27:49 +04:00
$( MAKE) -C $( POCO_BASE) /CppParser clean
$( MAKE) -C $( POCO_BASE) /CppParser/testsuite clean
2012-04-23 05:14:34 +04:00
$( MAKE) -C $( POCO_BASE) /CppUnit clean
2012-05-02 08:22:16 +04:00
$( MAKE) -C $( POCO_BASE) /JSON clean
$( MAKE) -C $( POCO_BASE) /JSON/testsuite clean
$( MAKE) -C $( POCO_BASE) /JSON/samples clean
2012-04-23 05:14:34 +04:00
distclean :
rm -rf $( POCO_BUILD) /lib
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