forked from mmoss/cryptopp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SConstruct
32 lines (26 loc) · 880 Bytes
/
SConstruct
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
import os
AddOption('--prefix',
dest='prefix',
type='string',
nargs=1,
action='store',
metavar='DIR',
help='installation prefix',
default=Dir('#target'))
AddOption('--enable-debug',
dest='enable-debug',
action='store_true',
metavar='DEBUG',
help='include debug flags when compiling')
AddOption('--shared',
dest='shared',
action='store_true',
metavar='SHARED',
help='build a shared library')
env = Environment(PREFIX = GetOption('prefix'),
DEBUG = True if GetOption('enable-debug') else False,
SHARED = True if GetOption('shared') else False,
MODE = 'debug' if GetOption('enable-debug') else 'release')
if env['DEBUG']:
env.AppendUnique(CCFLAGS = '-g -Wtautological-compare')
env.SConscript('src/SConscript', variant_dir='#target/build/$MODE', duplicate=0, exports='env')