blob: 1fc4e841bd64145b4f5cf73849b954942f29f981 [file] [log] [blame]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
Alexander Afanasyev182fdc22012-03-05 18:06:52 -08003VERSION='0.0.1'
4APPNAME='sync'
5
Alexander Afanasyeve76f2632012-03-05 00:18:42 -08006def options(opt):
7 opt.load('compiler_c')
8 opt.load('compiler_cxx')
Alexander Afanasyev182fdc22012-03-05 18:06:52 -08009 opt.load('boost')
10 opt.load('doxygen')
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080011
Alexander Afanasyev8f25cbb2012-03-01 23:53:40 -080012def configure(conf):
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080013 conf.load("compiler_cxx")
Alexander Afanasyev8f25cbb2012-03-01 23:53:40 -080014 conf.check_cfg(atleast_pkgconfig_version='0.20')
15 conf.check_cfg(package='openssl', args=['--cflags', '--libs'], uselib_store='SSL')
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080016 conf.define ('STANDALONE', 1)
Alexander Afanasyev2fc2d672012-03-05 16:57:39 -080017 # conf.define ('DIGEST_BASE64', 1) # base64 is not working and probably will not work at all
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080018
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080019 conf.load('boost')
20 conf.check_boost(lib='system iostreams')
21
22 conf.load('doxygen')
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080023
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080024def build (bld):
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080025 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 Afanasyevec1d4a72012-03-05 11:06:54 -080031
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080032 bld.program (target="testapp",
33 source = "test/testapp.cc",
34 features=['cxx', 'cxxprogram'],
35 use = 'sync')
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080036
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080037from waflib.Build import BuildContext
38class doxy (BuildContext):
39 cmd = "doxygen"
40 fun = "doxygen"
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080041
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080042def doxygen (bld):
43 bld (features="doxygen",
44 doxyfile='doc/doxygen.conf',
45 output_dir = 'doc')