build: added ADD_CFLAGS() and started of Samba4 build
[samba.git] / source4 / wscript
1 srcdir = '..'
2 blddir = 'bin'
3
4 LIBREPLACE_DIR= srcdir + '/lib/replace'
5 LIBLDB_DIR=     srcdir + '/source4/lib/ldb'
6
7 def set_options(opt):
8     opt.recurse(LIBREPLACE_DIR)
9     opt.recurse(LIBLDB_DIR)
10
11 def configure(conf):
12     conf.DEFUN('_SAMBA_BUILD_', 4)
13     conf.sub_config(LIBREPLACE_DIR)
14     conf.sub_config(LIBLDB_DIR)
15
16     conf.DEFUN('CONFIG_H_IS_FROM_SAMBA', 1)
17     conf.ADD_CFLAGS('-I.. -I../lib -I../../lib  -I../.. -I../include -Idefault/source4')
18     conf.ADD_CFLAGS('-I../../lib/socket_wrapper -I../../lib/talloc -I../../lib/replace -I../../lib/tevent')
19
20
21     conf.ADD_CFLAGS('-I../heimdal_build -I../heimdal/lib/krb5 -I../heimdal/lib/asn1 -I../heimdal/lib/com_err -I -I../heimdal/lib/hx509 -I../heimdal/lib/roken -I../heimdal/lib/hx509 -I../heimdal/lib/asn1 -I../heimdal/lib/hcrypto -I../heimdal/lib -I../heimdal/lib/hcrypto/imath -I../heimdal/lib/wind')
22     conf.DEFUN('HAVE_KRB5', 1)
23     conf.SAMBA_CONFIG_H()
24
25 def build(bld):
26     bld.add_subdirs(LIBREPLACE_DIR)
27     bld.add_subdirs(LIBLDB_DIR)
28     bld.add_subdirs('dsdb')
29     bld.add_subdirs('smbd')
30
31     # some of source wants include/config.h, so
32     # create a link from the real config.h
33     bld(target='include/config.h',
34         rule='ln -sf ../../config.h ${TGT}')