forked from xray-group/mstruct
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript.objcryst
38 lines (30 loc) · 1.27 KB
/
SConscript.objcryst
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
Import('env')
# Define the what we need to install objcryst
objcrystenv = env.Clone()
# Source directories
objcrystenv.PrependUnique(CPPPATH = ["."])
objcrystenv.PrependUnique(CPPPATH = ["./cctbx/include"])
# Idenfity the required source files
srcfiles = Glob("./ObjCryst/ObjCryst/*.cpp")
srcfiles += Glob("./ObjCryst/RefinableObj/*.cpp")
srcfiles += Glob("./ObjCryst/CrystVector/*.cpp")
srcfiles += Glob("./ObjCryst/Quirks/*.cpp")
# Determine library version from the git data.
SConscript("SConscript.version")
srcfiles += [File("./ObjCryst/version.cpp")]
# Make shared objects
objects = objcrystenv.SharedObject(srcfiles)
# Put VFNDebug.os first to define debug level constants
objects.sort(key=lambda o: not o.name.startswith('VFNDebug'))
Clean(objects, "ObjCryst")
# Put this back into the global environment
env["objcrystobjs"] = objects
# Record headers
env['lib_includes'] += Glob("./ObjCryst/ObjCryst/*.h")
env['lib_includes'] += Glob("./ObjCryst/RefinableObj/*.h")
env['lib_includes'] += Glob("./ObjCryst/CrystVector/*.h")
# these headers are not included from any other headers
excluded_quirks = set(['Chronometer.h', 'VFNStreamFormat.h', 'sse_mathfun.h'])
env['lib_includes'] += [f for f in Glob("./ObjCryst/Quirks/*.h")
if not f.name in excluded_quirks]
# vim: ft=python