1 |
Import('env') |
Import('env') |
2 |
|
import platform |
3 |
|
|
4 |
testsrcs = ['#test/'+i for i in Split(""" |
testsrcs = ['#test/'+i for i in Split(""" |
5 |
assertimpl.c |
assertimpl.c |
22 |
libpath.append(env['CUNIT_LIBPATH']) |
libpath.append(env['CUNIT_LIBPATH']) |
23 |
#print "CUNIT_LIBPATH ---> ",libpath |
#print "CUNIT_LIBPATH ---> ",libpath |
24 |
|
|
25 |
|
cppdefines = [] |
26 |
|
if env.has_key('CPPDEFINES'): |
27 |
|
cppdefines += env.get('CPPDEFINES') |
28 |
|
cppdefines += ['-DASC_SHARED'] |
29 |
|
|
30 |
|
libs = ['ascend','m','cunit'] |
31 |
|
if platform.system()!="Windows": |
32 |
|
libs += ['dl'] |
33 |
|
|
34 |
objs = [] |
objs = [] |
35 |
for src in srcs+testsrcs: |
for src in srcs+testsrcs: |
36 |
objs += env.SharedObject(src |
objs += env.SharedObject(src |
37 |
, CPPPATH = cpppath |
, CPPPATH = cpppath |
38 |
) |
) |
39 |
|
|
40 |
objs += env.SharedObject('test_ascend_base.c' |
objs += env.SharedObject('test_ascend_base.c' |
41 |
, CPPPATH = cpppath |
, CPPPATH = cpppath |
42 |
) |
) |
43 |
|
|
44 |
|
print "OBJS = " |
45 |
|
for o in objs: |
46 |
|
print o |
47 |
|
|
48 |
env.SharedLibrary('asctestsuite',objs |
env.SharedLibrary('asctestsuite',objs |
49 |
, CPPPATH = cpppath |
, CPPPATH = cpppath |
50 |
, LIBS = ['ascend','m','cunit','dl'] |
, LIBS = libs |
51 |
, LIBPATH = libpath |
, LIBPATH = libpath |
52 |
, CPPDEFINES = env.get('CPPDEFINES') + ['-DASC_SHARED'] |
, CPPDEFINES = cppdefines |
53 |
) |
) |
54 |
|
|
55 |
env.Program('test',['test.c'] |
env.Program('test',['test.c'] |