/[ascend]/trunk/base/generic/compiler/SConscript
ViewVC logotype

Contents of /trunk/base/generic/compiler/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1031 - (show annotations) (download)
Wed Jan 3 15:33:23 2007 UTC (17 years, 11 months ago) by johnpye
File size: 2792 byte(s)
Merging Ben's changes from trunk, changeset 1105 to changeset 1234.
This breaks Python test suite TestExtFn, so will need investigation.
1 Import('libascend_env')
2
3 csrcs = Split("""
4 anoncopy.c anonmerg.c anontype.c arrayinst.c ascCompiler.c
5 atomsize.c atomvalue.c bintoken.c bit.c braced.c
6 case.c check.c child.c childdef.c childio.c childinfo.c cmpfunc.c
7 commands.c copyinst.c createinst.c destroyinst.c
8 dimen.c dimen_io.c dump.c
9 evaluate.c exprio.c exprs.c exprsym.c extcall.c
10 extfunc.c extinst.c find.c forvars.c fractions.c
11 freestore.c func.c findpath.c
12 importhandler.c initialize.c instance_io.c
13 instantiate.c instmacro.c instquery.c
14 library.c linkinst.c logrel_io.c logrel_util.c
15 logrelation.c mathinst.c mergeinst.c module.c name.c
16 nameio.c notate.c numlist.c parentchild.c
17 parpend.c pending.c plot.c proc.c procframe.c
18 procio.c prototype.c qlfdid.c refineinst.c rel_common.c relation.c
19 rel_blackbox.c
20 relation_io.c relation_util.c rootfind.c safe.c
21 select.c setinst_io.c setinstval.c setio.c
22 sets.c slist.c simlist.c statement.c statio.c switch.c
23 symtab.c syntax.c temp.c tmpnum.c type_desc.c
24 type_descio.c typedef.c typelint.c
25 units.c universal.c
26 value_type.c visitinst.c visitlink.c vlist.c vlistio.c
27 watchpt.c watchptio.c when.c when_io.c when_util.c
28 """)
29
30 import platform, glob
31
32 scanparse_env = libascend_env.Copy()
33
34 scanparse_env.Append(CCFLAGS=scanparse_env.get('YACC_CCFLAGS'))
35
36 if scanparse_env.has_key('HAVE_YACC'):
37 parsersource = 'ascParse.y'
38 parserheader = 'ascParse.h'
39 else:
40 parsersource = 'ascParse_no_yacc.c'
41 parserheader = libascend_env.Command('ascParse.h', 'ascParse_no_yacc.h',Copy('$TARGET', '$SOURCE'))
42
43 if scanparse_env.has_key('HAVE_LEX'):
44 scannersource = 'scanner.l'
45 else:
46 scannersource = 'scanner_no_flex.c'
47
48 parser = scanparse_env.SharedObject(target=['ascParse'], source=parsersource
49 , YACCFLAGS=['-y','-d','-pzz_']
50 )
51
52 scanner = libascend_env.SharedObject(target=['scanner'],source=scannersource
53 , LEXFLAGS=['-l','-Pzz_']
54 )
55
56 packages_env = libascend_env.Copy()
57 packages_env.Append(CPPDEFINES=[('ASC_SHLIBSUFFIX','\\"'+libascend_env['SHLIBSUFFIX']+'\\"'),('ASC_SHLIBPREFIX','\\"'+libascend_env['SHLIBPREFIX']+'\\"')])
58 packages = packages_env.SharedObject('packages.c')
59
60 objs = [parser,scanner,packages]
61
62 # SLOPPY sources. This is a painful hack that should be fixed using 'config.h' style solution.
63
64 sloppy_csrcs = ['rounded.c','interval.c']
65
66 sloppy_env = libascend_env.Copy()
67 sloppy_env.Append(CPPDEFINES=['SLOPPY']);
68 for s in sloppy_csrcs:
69 objs += sloppy_env.SharedObject(s)
70
71 libascend_env.Depends(scanner,[parserheader])
72
73 for s in [csrcs]:
74 objs += libascend_env.SharedObject(s)
75
76 #--------------------
77 # INSTALL
78
79 if libascend_env.get('CAN_INSTALL'):
80 installdir = libascend_env['INSTALL_ROOT']+libascend_env['INSTALL_INCLUDE']+'/compiler'
81
82 headers = glob.glob("*.h")
83 libascend_env.InstallHeader(installdir,headers)
84
85 Return('objs')
86
87 # vim: set syntax=python:
88

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22