1 |
Import('libascend_env') |
2 |
|
3 |
csrcs = Split(""" |
4 |
incidence.c |
5 |
slv_interface.c |
6 |
mps.c |
7 |
slv2.c slv3.c slv6.c slv7.c |
8 |
slv8.c slv9.c slv9a.c slvDOF.c |
9 |
|
10 |
""") |
11 |
|
12 |
solver_env = libascend_env.Copy() |
13 |
|
14 |
defs = [] |
15 |
for i in libascend_env.get('WITH_SOLVERS'): |
16 |
solver_env.Append(CPPDEFINES=["STATIC_"+i]) |
17 |
|
18 |
objs = [] |
19 |
|
20 |
if solver_env.get('WITH_CONOPT'): |
21 |
solver_env.AppendUnique(CPPPATH=[solver_env.get('CONOPT_CPPPATH')]) |
22 |
|
23 |
if solver_env.get('LINKED_CONOPT'): |
24 |
libascend_env.AppendUnique( |
25 |
LIBPATH=[solver_env.get('CONOPT_LIBPATH')] |
26 |
, LIBS=[solver_env.get('CONOPT_LIB')] |
27 |
) |
28 |
|
29 |
objs += solver_env.SharedObject('conopt.c') |
30 |
# print "BUILDING CONOPT.OS" |
31 |
|
32 |
for c in csrcs: |
33 |
objs += solver_env.SharedObject(c) |
34 |
|
35 |
#-------------------- |
36 |
# INSTALL |
37 |
|
38 |
import glob |
39 |
|
40 |
if libascend_env.get('CAN_INSTALL'): |
41 |
installdir = Dir(libascend_env.subst("$INSTALL_ROOT$INSTALL_INCLUDE/solver")) |
42 |
|
43 |
headers = glob.glob("*.h") |
44 |
libascend_env.InstallHeader(installdir,headers) |
45 |
|
46 |
Return('objs') |
47 |
|
48 |
# vim: set syntax=python: |
49 |
|