ad63a292f4951b04da90bbe20155e8c4d280f222
[bbaumbach/samba-autobuild/.git] / source4 / SConstruct
1 #!/usr/bin/env python
2
3 # This is the experimental scons build script for Samba 4. For a proper 
4 # build use the old build system (configure + make). scons may
5 # eventually replace this system.
6 #
7 # Copyright (C) 2005 Jelmer Vernooij <jelmer@samba.org>
8 # Published under the GNU GPL
9
10 hostenv = Environment(
11                 toolpath=['build/scons','.'],
12                 tools=['default'],
13                 CPPPATH=['#include','#','#lib'], 
14                 CPPDEFINES={'_SAMBA_BUILD_': None},
15                 )
16
17 hostenv.Append(CPPPATH = ['#heimdal_build', '#heimdal/lib/krb5',
18                           '#heimdal/lib/hdb', '#heimdal/lib/gssapi',
19                           '#heimdal/lib/asn1', '#heimdal/lib/des',
20                           '#heimdal/kdc', '#heimdal/lib/roken',
21                           '#heimdal/lib/com_err'])
22
23 buildenv = hostenv.Copy()
24
25 dynenv = hostenv.Copy()
26
27 bindir = "bindir"
28
29 paths = { 
30         'BINDIR': bindir,
31         'SBINDIR': "sbin",
32         'CONFIGFILE': "cfg",
33         'LOGFILEBASE': "lfb",
34         'NCALRPCDIR': "ncalrpc",
35         'LMHOSTSFILE': "lmhosts",
36         'LIBDIR': "libdir",
37         'SHLIBEXT': "ext",
38         'LOCKDIR': "lockdir",
39         'PIDDIR': "piddir",
40         'SMB_PASSWD_FILE': "smbpasswd",
41         'PRIVATE_DIR': 'private',
42         'SWATDIR': 'swat'
43 }
44
45 [dynenv.Append(CPPDEFINES = {p: '\\"%s\\"' % paths[p]}) for p in paths]
46         
47 dynconfig = dynenv.Object('dynconfig.c')
48 Export('dynconfig')
49
50 SConscript(
51                 dirs=['param','lib','torture','rpc_server','cldap_server','libcli',
52                 'nbt_server','client','ldap_server','libnet','nsswitch','web_server',
53                 'smbd','dsdb'],
54                 exports='hostenv')