summaryrefslogtreecommitdiff
path: root/source4/SConstruct
blob: fb23cc50663b6480f71586f83e63999402cd35a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python

# This is the experimental scons build script for Samba 4. For a proper 
# build use the old build system (configure + make). scons may
# eventually replace this system.
#
# Copyright (C) 2005 Jelmer Vernooij <jelmer@samba.org>
# Published under the GNU GPL

hostenv = Environment(
		toolpath=['build/scons','.'],
		tools=['default','pidl','proto','et'],
		CPPPATH=['#include','#','#lib'], 
                CPPDEFINES={'_SAMBA_BUILD_': None},
		)

hostenv.Append(CPPPATH = ['#heimdal_build', '#heimdal/lib/krb5',
			  '#heimdal/lib/hdb', '#heimdal/lib/gssapi',
			  '#heimdal/lib/asn1', '#heimdal/lib/des',
			  '#heimdal/kdc', '#heimdal/lib/roken',
			  '#heimdal/lib/com_err'])

buildenv = hostenv

cross_compiling = 0

if cross_compiling:
	buildenv = hostenv.Copy()
	buildenv.BuildDir('build-env','.')

dynenv = hostenv.Copy()

bindir = "bindir"

paths = { 
	'BINDIR': bindir,
	'SBINDIR': "sbin",
	'CONFIGFILE': "cfg",
	'LOGFILEBASE': "lfb",
	'NCALRPCDIR': "ncalrpc",
	'LMHOSTSFILE': "lmhosts",
	'LIBDIR': "libdir",
	'SHLIBEXT': "ext",
	'LOCKDIR': "lockdir",
	'PIDDIR': "piddir",
	'SMB_PASSWD_FILE': "smbpasswd",
	'PRIVATE_DIR': 'private',
	'SWATDIR': 'swat'
}

[dynenv.Append(CPPDEFINES = {p: '\\"%s\\"' % paths[p]}) for p in paths]
	
dynconfig = dynenv.Object('dynconfig.c')
Export('dynconfig')

proto_files = []

SConscript(
		dirs=['param','lib','torture','rpc_server','cldap_server','libcli',
		'nbt_server','client','ldap_server','libnet','nsswitch','web_server',
		'smbd','dsdb','heimdal_build','ntptr','kdc','smb_server','ntvfs',
		'winbind','scripting','auth'],
		exports='buildenv hostenv proto_files')

hostenv.CProtoHeader(target='include/proto.h',source = proto_files)