1 |
johnpye |
669 |
Import('libascend_env') |
2 |
johnpye |
385 |
|
3 |
johnpye |
463 |
csrcs = Split(""" |
4 |
johnpye |
1194 |
incidence.c |
5 |
johnpye |
1316 |
slv_interface.c |
6 |
johnpye |
1183 |
mps.c |
7 |
jpye |
1320 |
slv2.c slv3.c slv6.c slv7.c |
8 |
johnpye |
1316 |
slv8.c slv9.c slv9a.c slvDOF.c |
9 |
|
|
|
10 |
johnpye |
392 |
""") |
11 |
johnpye |
385 |
|
12 |
johnpye |
669 |
solver_env = libascend_env.Copy() |
13 |
johnpye |
507 |
|
14 |
johnpye |
392 |
defs = [] |
15 |
johnpye |
669 |
for i in libascend_env.get('WITH_SOLVERS'): |
16 |
johnpye |
507 |
solver_env.Append(CPPDEFINES=["STATIC_"+i]) |
17 |
johnpye |
392 |
|
18 |
johnpye |
463 |
objs = [] |
19 |
johnpye |
800 |
|
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 |
johnpye |
832 |
# print "BUILDING CONOPT.OS" |
31 |
johnpye |
800 |
|
32 |
johnpye |
463 |
for c in csrcs: |
33 |
johnpye |
507 |
objs += solver_env.SharedObject(c) |
34 |
johnpye |
669 |
|
35 |
johnpye |
721 |
#-------------------- |
36 |
|
|
# INSTALL |
37 |
|
|
|
38 |
|
|
import glob |
39 |
|
|
|
40 |
|
|
if libascend_env.get('CAN_INSTALL'): |
41 |
jpye |
1436 |
installdir = Dir(libascend_env.subst("$INSTALL_ROOT$INSTALL_INCLUDE/solver")) |
42 |
johnpye |
721 |
|
43 |
|
|
headers = glob.glob("*.h") |
44 |
|
|
libascend_env.InstallHeader(installdir,headers) |
45 |
|
|
|
46 |
johnpye |
463 |
Return('objs') |
47 |
johnpye |
811 |
|
48 |
|
|
# vim: set syntax=python: |
49 |
|
|
|