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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 502 - (show annotations) (download)
Tue Apr 18 12:57:30 2006 UTC (13 years, 10 months ago) by johnpye
File size: 1954 byte(s)
Added check to see that YACC runs OK.
Fixing build with MSVC++ 2005.
All builds now except for some problems in the SWIG-generated code.
1 Import('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 initialize.c instance.c instance_io.c
12 instantiate.c instmacro.c instquery.c
13 library.c linkinst.c logrel_io.c logrel_util.c
14 logrelation.c mathinst.c mergeinst.c module.c name.c
15 nameio.c notate.c numlist.c packages.c parentchild.c
16 parpend.c pending.c plot.c proc.c procframe.c
17 procio.c prototype.c qlfdid.c refineinst.c rel_common.c relation.c
18 relation_io.c relation_util.c rootfind.c safe.c
19 select.c setinst_io.c setinstval.c setio.c
20 sets.c slist.c simlist.c statement.c statio.c switch.c
21 symtab.c syntax.c temp.c tmpnum.c type_desc.c
22 type_descio.c typedef.c typelint.c redirectFile.c
23 units.c universal.c
24 value_type.c visitinst.c visitlink.c vlist.c vlistio.c
25 watchpt.c watchptio.c when.c when_io.c when_util.c
26 """)
27
28 # SLOPPY sources. This is a painful hack that should be fixed using 'config.h' style solution.
29
30 import platform
31 if env.has_key('HAVE_YACC'):
32 parsersource = 'ascParse.y'
33 parserheader = 'ascParse.h'
34 else:
35 parsersource = 'ascParse_no_yacc.c'
36 parserheader = 'ascParse_no_yacc.h'
37
38 if env.has_key('HAVE_LEX'):
39 scannersource = 'scanner.l'
40 else:
41 scannersource = 'scanner_no_flex.c'
42
43 parser = env.SharedObject(target=['ascParse'], source=parsersource
44 , YACCFLAGS=['-d','-pzz_']
45 )
46
47 scanner = env.SharedObject(target=['scanner'],source=scannersource
48 , LEXFLAGS=['-Pzz_']
49 )
50
51 objs = [parser,scanner]
52
53 sloppy_csrcs = ['rounded.c','interval.c']
54
55 for s in sloppy_csrcs:
56 objs += env.SharedObject(s
57 ,CPPDEFINES=['SLOPPY']
58 )
59
60 env.Depends(scanner,[parserheader])
61
62 for s in [csrcs]:
63 objs += env.SharedObject(s)
64
65 Return('objs')

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