/[ascend]/trunk/tcltk98/generic/interface/SConscript
ViewVC logotype

Diff of /trunk/tcltk98/generic/interface/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 520 by johnpye, Fri Apr 21 02:44:08 2006 UTC revision 521 by johnpye, Fri Apr 21 05:35:59 2006 UTC
# Line 8  srcs = Split(""" Line 8  srcs = Split("""
8      LibraryProc.c Lsode.c MtxProc.c ProbeProc.c Qlfdid.c      LibraryProc.c Lsode.c MtxProc.c ProbeProc.c Qlfdid.c
9      ScriptProc.c Sensitivity.c SimsProc.c SlvProc.c      ScriptProc.c Sensitivity.c SimsProc.c SlvProc.c
10      SolverProc.c UnitsProc.c UserData.c      SolverProc.c UnitsProc.c UserData.c
11      tkConsole.c old_utils.c      tkConsole.c old_utils.c Driver.c
12  """)  """)
13    
14  if env['HAVE_LEX']:  if env['HAVE_LEX']:
# Line 16  if env['HAVE_LEX']: Line 16  if env['HAVE_LEX']:
16  else:  else:
17      typelexsource = 'typelex_no_flex.c'      typelexsource = 'typelex_no_flex.c'
18    
19  typelex = env.SharedObject(typelexsource  tcl_env = env.Copy()
20    
21    typelex = tcl_env.SharedObject(typelexsource
22      , LEXFLAGS = '-ll -Ptyp_'      , LEXFLAGS = '-ll -Ptyp_'
23  )  )
24    
25  libs = ['ascend']  if tcl_env.has_key('TCL_CPPPATH'):
26  libpath = ['#']      tcl_env.Append(CPPPATH=tcl_env['TCL_CPPPATH'])
27    
28  libs.append(env['TCL_LIB'])  if tcl_env.has_key('TK_CPPPATH'):
29  libs.append(env['TK_LIB'])      tcl_env.Append(CPPPATH=tcl_env['TK_CPPPATH'])
30    
31    tcl_env.Append(LIBS=['ascend'])
32    tcl_env.Append(LIBPATH=['#'])
33    
34    if tcl_env['STATIC_TCLTK']:
35        print "STATIC TCL/TK PROGRAM LINKAGE"
36        srcs += ['$TCL_LIB','$TK_LIB','$TKTABLE_LIB']
37        tcl_env.Append(LIBS=tcl_env['X11_LIB'])
38        tcl_env.Append(LIBPATH=tcl_env['X11_LIBPATH'])
39    
40        tcl_env.Program("ascend4",["main.c"] + srcs)
41    else:
42        print "DYNAMIC TCL/TK PROGRAM LINKAGE"
43        #tcl_env.Append(LIBS=tcl_env['TCL_LIB'])
44        #tcl_env.Append(LIBS=tcl_env['TK_LIB'])
45    
46        if tcl_env.has_key('TCL_LIBPATH'):
47            tcl_env.Append(LIBPATH=tcl_env['TCL_LIBPATH'])
48        if tcl_env.has_key('TK_LIBPATH'):
49            tcl_env.Append(LIBPATH=tcl_env['TK_LIBPATH'])
50    
51        if tcl_env['TKTABLE_LIBPATH']:
52            tcl_env.Append(LIBPATH=tcl_env['TKTABLE_LIBPATH'])
53    
54        ascendtcl = tcl_env.SharedLibrary('ascendtcl',srcs+typelex)
55    
56        #tcl_so = tcl_env.Command(Copy('$SHLIBPREFIX$TCL_LIB$SHLIBSUFFIX','$TCL_LIBPATH/$SHLIBPREFIX$TCL_LIB$SHLIBSUFFIX'))
57        #tk_so = tcl_env.Command(Copy('$SHLIBPREFIX$TK_LIB$SHLIBSUFFIX','$TK_LIBPATH/$SHLIBPREFIX$TK_LIB$SHLIBSUFFIX'))
58        #tktable_so = tcl_env.Command(Copy('$SHLIBPREFIX$TKTABLE_LIB$SHLIBSUFFIX','$TKTABLE_LIBPATH/$SHLIBPREFIX$TKTABLE_LIB$SHLIBSUFFIX'))
59    
60        tcl_env.Append(LIBPATH=['.'])
61    
62        tcl_env.Program("ascend4",["main.c"]
63            , LIBS = ['$TCL_LIB','$TK_LIB','$TKTABLE_LIB','ascendtcl','ascend']
64        )
65    
66        #tcl_env.Append(LIBS=['ascend','ascendtcl'])
67        #tcl_env.Append(LIBPATH=['.'])
68        #tcl_env.Program("ascend4",['main.c']
69        #   , CPPPATH = ['#/base/generic']
70        #)
71    
 if env.has_key('TCL_LIBPATH'):  
     libpath.append(env['TCL_LIBPATH'])  
 if env.has_key('TK_LIBPATH'):  
     libpath.append(env['TK_LIBPATH'])  
   
 cppdefines = []  
 if env['STATIC_TKTABLE']:  
     libpath.append(env['TKTABLE_LIBPATH'])  
     libs.append(env['TKTABLE_LIB'])  
     cppdefines.append('STATIC_TKTABLE')  
   
 cpppath = ['../../../base/generic']  
 if env.has_key('TCL_CPPPATH'):  
     cpppath.append(env['TCL_CPPPATH'])  
   
 if env.has_key('TK_CPPPATH'):  
     cpppath.append(env['TK_CPPPATH'])  
   
 env.Program("ascend4",srcs+typelex+['Driver.c']  
     , CPPDEFINES = cppdefines  
     , LIBS = libs  
     , LIBPATH = libpath  
     , CPPPATH = cpppath  
 #   , RPATH = ["C:\\Tcl\\lib"]  
 )  

Legend:
Removed from v.520  
changed lines
  Added in v.521

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