Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
Alexander Afanasyev | 182fdc2 | 2012-03-05 18:06:52 -0800 | [diff] [blame^] | 3 | VERSION='0.0.1' |
| 4 | APPNAME='sync' |
| 5 | |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame] | 6 | def options(opt): |
| 7 | opt.load('compiler_c') |
| 8 | opt.load('compiler_cxx') |
Alexander Afanasyev | 182fdc2 | 2012-03-05 18:06:52 -0800 | [diff] [blame^] | 9 | opt.load('boost') |
| 10 | opt.load('doxygen') |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 11 | |
Alexander Afanasyev | 8f25cbb | 2012-03-01 23:53:40 -0800 | [diff] [blame] | 12 | def configure(conf): |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame] | 13 | conf.load("compiler_cxx") |
Alexander Afanasyev | 8f25cbb | 2012-03-01 23:53:40 -0800 | [diff] [blame] | 14 | conf.check_cfg(atleast_pkgconfig_version='0.20') |
| 15 | conf.check_cfg(package='openssl', args=['--cflags', '--libs'], uselib_store='SSL') |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 16 | conf.define ('STANDALONE', 1) |
Alexander Afanasyev | 2fc2d67 | 2012-03-05 16:57:39 -0800 | [diff] [blame] | 17 | # conf.define ('DIGEST_BASE64', 1) # base64 is not working and probably will not work at all |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 18 | |
Alexander Afanasyev | 182fdc2 | 2012-03-05 18:06:52 -0800 | [diff] [blame^] | 19 | conf.load('boost') |
| 20 | conf.check_boost(lib='system iostreams') |
| 21 | |
| 22 | conf.load('doxygen') |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame] | 23 | |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 24 | def build (bld): |
Alexander Afanasyev | 182fdc2 | 2012-03-05 18:06:52 -0800 | [diff] [blame^] | 25 | bld.shlib (target=APPNAME, |
| 26 | features=['cxx', 'cxxshlib'], |
| 27 | source = bld.path.ant_glob(['model/sync-*.cc', |
| 28 | 'helper/sync-*.cc']), |
| 29 | uselib = 'BOOST BOOST_IOSTREAMS SSL' |
| 30 | ) |
Alexander Afanasyev | ec1d4a7 | 2012-03-05 11:06:54 -0800 | [diff] [blame] | 31 | |
Alexander Afanasyev | 182fdc2 | 2012-03-05 18:06:52 -0800 | [diff] [blame^] | 32 | bld.program (target="testapp", |
| 33 | source = "test/testapp.cc", |
| 34 | features=['cxx', 'cxxprogram'], |
| 35 | use = 'sync') |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame] | 36 | |
Alexander Afanasyev | 182fdc2 | 2012-03-05 18:06:52 -0800 | [diff] [blame^] | 37 | from waflib.Build import BuildContext |
| 38 | class doxy (BuildContext): |
| 39 | cmd = "doxygen" |
| 40 | fun = "doxygen" |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 41 | |
Alexander Afanasyev | 182fdc2 | 2012-03-05 18:06:52 -0800 | [diff] [blame^] | 42 | def doxygen (bld): |
| 43 | bld (features="doxygen", |
| 44 | doxyfile='doc/doxygen.conf', |
| 45 | output_dir = 'doc') |