forked from tmbx/libktools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSConscript
27 lines (20 loc) · 884 Bytes
/
SConscript
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
Import('env build_dir')
import os
lib_NAME = "libktools"
main_env = env
# build the lib
env = main_env.Clone()
env.Append(CPPPATH = os.path.join(os.getcwd(), 'src'),
VERSION = '0.0',
CPPDEFINES = ['_LARGEFILE64_SOURCE', '_FILE_OFFSET_BITS=64', 'BUILDING_KTOOLS'])
shared_LIBS, static_LIBS, OBJS, install = SConscript(os.path.join('src', 'SConscript'), build_dir=build_dir, duplicate=0, exports='env lib_NAME')
# build the test
PROGS = []
if env['test']:
env = main_env.Clone()
env.Append(CPPPATH=[os.path.join(os.getcwd(), 'test'), os.path.join(os.getcwd(), 'src')])
NOBJS, PROG = SConscript(os.path.join('test', 'SConscript'), build_dir=os.path.join(build_dir, 'test'), duplicate=0, exports='env shared_LIBS static_LIBS lib_NAME')
OBJS += NOBJS
PROGS += PROG
builds = OBJS + PROGS + static_LIBS + shared_LIBS
Return('builds install')