forked from xray-group/mstruct
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript.mstruct
67 lines (50 loc) · 2.24 KB
/
SConscript.mstruct
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
66
67
Import('env')
# Define the what we need to install objcryst
mstructenv = env.Clone()
# MStruct library
# Source directories
mstructenv.PrependUnique(CPPPATH = ["./MStruct"])
# Idenfity the required source files
#srcfiles = Glob("./MStruct/*.cpp")
srcfiles = [File("./MStruct/libmstruct.cpp"),File("./MStruct/MStruct.cpp"),File("./MStruct/IO.cpp")]
#srcfiles += [File("./MStruct/mstruct_test1.cpp")]
# Determine library version from the git data.
#SConscript("./../SConscript.version")
#srcfiles += [File("ObjCryst/version.cpp")]
# Determine version
SConscript("./SConscript.mstruct.version")
# Make shared objects
objects = mstructenv.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["mstructobjs"] = objects
# Record headers
#env['libmstruct_includes'] += Glob("./MStruct/*.h")
env['libmstruct_includes'] += [File("./MStruct/MStruct.h"),File("./MStruct/IO.h")]
# these headers are not included from any other headers
#excluded_quirks = set(['Chronometer.h', 'VFNStreamFormat.h', 'sse_mathfun.h'])
#env['libmstruct_includes'] += [f for f in Glob("./ObjCryst/Quirks/*.h")
# if not f.name in excluded_quirks]
# mstruct binary
_srcfiles = [File("./MStruct/mstruct_am.cpp"),File("./MStruct/mstruct_test1.cpp"),File("./MStruct/MStruct.cpp"),File("./MStruct/IO.cpp")]
# Make objects
objects = mstructenv.Object(_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["binmstructobjs"] = objects
# mstruct binary headers
env['binmstruct_includes'] = env['libmstruct_includes'] + [File("./MStruct/MStruct.h"),File("./MStruct/mstruct_tests.h")]
# mstruct_xml binary
_srcfiles = [File("./MStruct/mstruct_xml.cpp"),File("./MStruct/MStruct.cpp"),File("./MStruct/IO.cpp")]
# Make objects
objects = mstructenv.Object(_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["binxmlmstructobjs"] = objects
# vim: ft=python