/[ascend]/trunk/base/jam/Jamfile
ViewVC logotype

Diff of /trunk/base/jam/Jamfile

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

revision 59 by jds, Sun Oct 30 01:38:20 2005 UTC revision 60 by jds, Mon Oct 31 03:39:15 2005 UTC
# Line 1  Line 1 
1  #  #
2  # Jamfile to build Ascend4 base libraries  # Jamfile to build Ascend4 base libraries
3  # (see http://www.freetype.org/jam/index.html)  # (see http://www.freetype.org/jam/index.html)
4  #  #
5  # This file is part of the Ascend Build System.  # This file is part of the Ascend Build System.
6  #  #
7  # Copyright (C) 2005  Jerry D. St.Clair  # Copyright (C) 2005  Jerry D. St.Clair
8  #  #
9  # The Ascend Build System is free software; you can redistribute  # The Ascend Build System is free software; you can redistribute
10  # it and/or modify it under the terms of the GNU General Public  # it and/or modify it under the terms of the GNU General Public
11  # License as published by the Free Software Foundation; either  # License as published by the Free Software Foundation; either
12  # version 2 of the License, or (at your option) any later version.  # version 2 of the License, or (at your option) any later version.
13  #  #
14  # This program is distributed in hope that it will be useful,  # This program is distributed in hope that it will be useful,
15  # but WITHOUT ANY WARRANTY; without even the implied warranty of  # but WITHOUT ANY WARRANTY; without even the implied warranty of
16  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  # GNU General Public License for more details.  # GNU General Public License for more details.
18  #  #
19  # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License
20  # along with the program; if not, write to the Free Software  # along with the program; if not, write to the Free Software
21  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA.  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA.
22  # Check the file named COPYING.  # Check the file named COPYING.
23  #---------------------------------------------------------------------------  #---------------------------------------------------------------------------
24  #  #
25  # UNDER CONSTRUCTION  # UNDER CONSTRUCTION
26  #  #
27  # This Jamfile builds the Ascend base libraries using the jam* build  # This Jamfile builds the Ascend base libraries using the jam* build
28  # tool.  Using generic Jambase and Jamrules_general files (located at  # tool.  Using generic Jambase and Jamrules_general files (located at
29  # ../../jam), it builds the Ascend base functionality as a set of static  # ../../jam), it builds the Ascend base functionality as a set of static
30  # libraries.  It does not currently support building dynamic libraries,  # libraries.  It does not currently support building dynamic libraries,
31  # executables, or interface libraries.  # executables, or interface libraries.
32  #  #
33  # The Ascend jam build system currently supports building the libraries  # The Ascend jam build system currently supports building the libraries
34  # under Windows using the MSVC, Borland, MinGW, and Watcom** compilers,  # under Windows using the MSVC, Borland, MinGW, and Watcom** compilers,
35  # and under Linux with gcc.  With use of the customized ../.../jam/Jambase  # and under Linux with gcc.  With use of the customized ../.../jam/Jambase
36  # file, it should work with both the original and ftjam variants of jam.  # file, it should work with both the original and ftjam variants of jam.
37  # The system was developed primarily using ftjam.  # The system was developed primarily using ftjam.
38  #  #
39  # The libraries are built in ./CONFIGTYPE/COMPILER where  # The libraries are built in ./CONFIGTYPE/COMPILER where
40  #     CONFIGTYPE = Debug, Release  #     CONFIGTYPE = Debug, Release
41  #     COMPILER   = bcc, msvc, mingw, watcom, unix  #     COMPILER   = bcc, msvc, mingw, watcom, unix
42  #  #
43  # Installation of the libraries or headers is not supported at this time.  # Installation of the libraries or headers is not supported at this time.
44  #-------------------------------------------------------------------------  #-------------------------------------------------------------------------
45  #  #
46  # Build Instructions  # Build Instructions
47  #  #
48  # 1. jam must be installed and configured for the compiler in use.  # 1. jam must be installed and configured for the compiler in use.
49  #  #
50  # 2. Copy the ../../jam/Jamrules_general.in to ../../jam/Jamrules_general.  # 2. Copy the ../../jam/Jamrules_general.in to ../../jam/Jamrules_general.
51  #  #
52  # 3. Manually edit Jamrules_general and (if necessary) this Jamfile to set  # 3. Manually edit Jamrules_general and (if necessary) this Jamfile to set
53  #    configuration and local directory options.  #    configuration and local directory options.
54  #  #
55  # 4. Run jam from using the provided Jambase:  # 4. Run jam from using the provided Jambase:
56  #       jam -f ../../jam/Jambase libs  #       jam -f ../../jam/Jambase libs
57  #  #
58  # 5. A prototype CUnit test suite may also be built.  At this point it  # 5. A prototype CUnit test suite may also be built.  At this point it
59  #    only covers the general and utilities components.  For maximal  #    only covers the general and utilities components.  For maximal
60  #    testing, NODEBUG should be commented and DEBUG_MALLOC should be  #    testing, NODEBUG should be commented and DEBUG_MALLOC should be
61  #    active in Jamrules_general.  This will require that the ASCEND base  #    active in Jamrules_general.  This will require that the ASCEND base
62  #    libs be built with these options also.  Build the tests using:  #    libs be built with these options also.  Build the tests using:
63  #       jam -f ../../jam/Jambase tests  #       jam -f ../../jam/Jambase tests
64  #  #
65  #-------------------------------------------------------------------------  #-------------------------------------------------------------------------
66  # Notes:  # Notes:
67  #  #
68  # * jam is an open source, multi-platform build tool which is  # * jam is an open source, multi-platform build tool which is
69  #   available in several flavors.  These include the original  #   available in several flavors.  These include the original
70  #   (http://www.perforce.com) and ftjam  #   (http://www.perforce.com) and ftjam
71  #   (http://www.freetype.org/jam/index.html) variants, among others.  #   (http://www.freetype.org/jam/index.html) variants, among others.
72  #  #
73  # ** Currently, Open Watcom 1.3 can compile the Ascend sources  # ** Currently, Open Watcom 1.3 can compile the Ascend sources
74  #    and build the libraries.  However, it does not supply the required  #    and build the libraries.  However, it does not supply the required
75  #    IEEE math functions isnan() and copysign().  At present, Ascend does  #    IEEE math functions isnan() and copysign().  At present, Ascend does
76  #    not supply these, so the user must provide these functions to use  #    not supply these, so the user must provide these functions to use
77  #    the libraries under Watcom.  #    the libraries under Watcom.
78  #  #
79  #---------------------------------------------------------------------------  #---------------------------------------------------------------------------
80    
81  # TODO: remove if end up using SubDir rules  # TODO: remove if end up using SubDir rules
82  JAM_GENERAL_DIR = ..$(SLASH)..$(SLASH)jam ;  JAM_GENERAL_DIR = ..$(SLASH)..$(SLASH)jam ;
83  include $(JAM_GENERAL_DIR)$(SLASH)Jamrules_general ;  include $(JAM_GENERAL_DIR)$(SLASH)Jamrules_general ;
84    
85  srcdir = ..$(SLASH)generic ;  srcdir = ..$(SLASH)generic ;
86    
87  # Build flags for Ascend base libraries  # Build flags for Ascend base libraries
88  BUILD_COMPILER  = 1 ;  BUILD_COMPILER  = 1 ;
89  BUILD_GENERAL   = 1 ;  BUILD_GENERAL   = 1 ;
90  BUILD_SOLVER    = 1 ;  BUILD_SOLVER    = 1 ;
91  BUILD_UTILITIES = 1 ;  BUILD_UTILITIES = 1 ;
92  BUILD_PACKAGES  = 1 ;  BUILD_PACKAGES  = 1 ;
93    
94  # Ascend modules subdirectories  # Ascend modules subdirectories
95  ASC_COMPILER_DIR  = $(srcdir)$(SLASH)compiler ;  ASC_COMPILER_DIR  = $(srcdir)$(SLASH)compiler ;
96  ASC_GENERAL_DIR   = $(srcdir)$(SLASH)general ;  ASC_GENERAL_DIR   = $(srcdir)$(SLASH)general ;
97  ASC_SOLVER_DIR    = $(srcdir)$(SLASH)solver ;  ASC_SOLVER_DIR    = $(srcdir)$(SLASH)solver ;
98  ASC_UTILITIES_DIR = $(srcdir)$(SLASH)utilities ;  ASC_UTILITIES_DIR = $(srcdir)$(SLASH)utilities ;
99  ASC_PACKAGES_DIR  = $(srcdir)$(SLASH)packages ;  ASC_PACKAGES_DIR  = $(srcdir)$(SLASH)packages ;
100    
101  HDRS += $(srcdir) ;  HDRS += $(srcdir) ;
102    
103  DEPENDS all : libs ;  DEPENDS all : libs ;
104  NOTFILE libs ;  NOTFILE libs ;
105    
106  # Location of old Ascend Tcl/Tk interface sources.  # Location of old Ascend Tcl/Tk interface sources.
107  # Some solver modules include headers originally located in  # Some solver modules include headers originally located in
108  # the Tcl/Tk-specific interface subdirectory.  Until the  # the Tcl/Tk-specific interface subdirectory.  Until the
109  # source is reorganized to decouple the base and interface  # source is reorganized to decouple the base and interface
110  # components, we have to be able to find those headers  # components, we have to be able to find those headers
111  # TODO:  remove/rework when Tcl/Tk decoupled from base library  # TODO:  remove/rework when Tcl/Tk decoupled from base library
112  ASC_INTERFACE_ROOT = ..$(SLASH)..$(SLASH)tcltk98$(SLASH)generic ;  ASC_INTERFACE_ROOT = ..$(SLASH)..$(SLASH)tcltk98$(SLASH)generic ;
113    
114  # Comment to compile without using the Epperly malloc debugger  # Comment to compile without using the Epperly malloc debugger
115  #DEBUG_MALLOC = -DMALLOC_DEBUG ;  #DEBUG_MALLOC = -DMALLOC_DEBUG ;
116    
117  #  Location of the tcl.h and tk.h header files  #  Location of the tcl.h and tk.h header files
118  # TODO:  remove when Tcl/Tk decoupled from base library  # TODO:  remove when Tcl/Tk decoupled from base library
119  TK_HDRS = ..$(SLASH)..$(SLASH)..$(SLASH)Tcl$(SLASH)include ;  TK_HDRS = ..$(SLASH)..$(SLASH)..$(SLASH)Tcl$(SLASH)include ;
120    
121  #=========================================================================  #=========================================================================
122  # Compiler module  # Compiler module
123  #=========================================================================  #=========================================================================
124  if $(BUILD_COMPILER)  if $(BUILD_COMPILER)
125  {  {
126    ASC_COMPILER_SOURCES =    ASC_COMPILER_SOURCES =
127      anoncopy.c      anoncopy.c
128      anonmerg.c      anonmerg.c
129      anontype.c      anontype.c
130      arrayinst.c      arrayinst.c
131      ascCompiler.c      ascCompiler.c
132      ascParse.c      ascParse.c
133      atomsize.c      atomsize.c
134      atomvalue.c      atomvalue.c
135      bintoken.c      bintoken.c
136      bit.c      bit.c
137      braced.c      braced.c
138      case.c      case.c
139      check.c      check.c
140      child.c      child.c
141      childdef.c      childdef.c
142      childio.c      childio.c
143      childinfo.c      childinfo.c
144      cmpfunc.c      cmpfunc.c
145      commands.c      commands.c
146      copyinst.c      copyinst.c
147      createinst.c      createinst.c
148      destroyinst.c      destroyinst.c
149      dimen.c      dimen.c
150      dimen_io.c      dimen_io.c
151      dump.c      dump.c
152      evaluate.c      evaluate.c
153      exprio.c      exprio.c
154      exprs.c      exprs.c
155      exprsym.c      exprsym.c
156      extcall.c      extcall.c
157      extfunc.c      extfunc.c
158      extinst.c      extinst.c
159      find.c      find.c
160      forvars.c      forvars.c
161      fractions.c      fractions.c
162      freestore.c      freestore.c
163      func.c      func.c
164      initialize.c      initialize.c
165      instance.c      instance.c
166      instance_io.c      instance_io.c
167      instantiate.c      instantiate.c
168      instmacro.c      instmacro.c
169      instquery.c      instquery.c
170      interval.c      interval.c
171      library.c      library.c
172      linkinst.c      linkinst.c
173      logrel_io.c      logrel_io.c
174      logrel_util.c      logrel_util.c
175      logrelation.c      logrelation.c
176      mathinst.c      mathinst.c
177      mergeinst.c      mergeinst.c
178      module.c      module.c
179      name.c      name.c
180      nameio.c      nameio.c
181      notate.c      notate.c
182      numlist.c      numlist.c
183      packages.c      packages.c
184      parentchild.c      parentchild.c
185      parpend.c      parpend.c
186      pending.c      pending.c
187      proc.c      proc.c
188      procframe.c      procframe.c
189      procio.c      procio.c
190      prototype.c      prototype.c
191      redirectFile.c      redirectFile.c
192      refineinst.c      refineinst.c
193      rel_common.c      rel_common.c
194      relation.c      relation.c
195      relation_io.c      relation_io.c
196      relation_util.c      relation_util.c
197      rootfind.c      rootfind.c
198      rounded.c      rounded.c
199      safe.c      safe.c
200      scanner.c      scanner.c
201      select.c      select.c
202      setinst_io.c      setinst_io.c
203      setinstval.c      setinstval.c
204      setio.c      setio.c
205      sets.c      sets.c
206      slist.c      slist.c
207      simlist.c      simlist.c
208      statement.c      statement.c
209      statio.c      statio.c
210      switch.c      switch.c
211      symtab.c      symtab.c
212      syntax.c      syntax.c
213      temp.c      temp.c
214      tmpnum.c      tmpnum.c
215      type_desc.c      type_desc.c
216      type_descio.c      type_descio.c
217      typedef.c      typedef.c
218      typelint.c      typelint.c
219      units.c      units.c
220      universal.c      universal.c
221      value_type.c      value_type.c
222      visitinst.c      visitinst.c
223      visitlink.c      visitlink.c
224      vlist.c      vlist.c
225      vlistio.c      vlistio.c
226      watchpt.c      watchpt.c
227      watchptio.c      watchptio.c
228      when.c      when.c
229      when_io.c      when_io.c
230      when_util.c      when_util.c
231      ;      ;
232    
233    SEARCH on $(ASC_COMPILER_SOURCES) = $(ASC_COMPILER_DIR) ;    SEARCH on $(ASC_COMPILER_SOURCES) = $(ASC_COMPILER_DIR) ;
234    
235    #----------------------------------------------------------------------    #----------------------------------------------------------------------
236    # rounded.c needs a special define    # rounded.c needs a special define
237    #----------------------------------------------------------------------    #----------------------------------------------------------------------
238    CCFLAGS on rounded$(SUFOBJ) += -DSLOPPY ;    CCFLAGS on rounded$(SUFOBJ) += -DSLOPPY ;
239    
240    #----------------------------------------------------------------------    #----------------------------------------------------------------------
241    # ascParse.c & ascParse.h    # ascParse.c & ascParse.h
242    #    #
243    # ascParse implements the Ascend grammar.  It is generated by    # ascParse implements the Ascend grammar.  It is generated by
244    # yacc with modification (e.g. by sed) to change the default    # yacc with modification (e.g. by sed) to change the default
245    # 'yy' prefixes to 'zz_'.  If yacc and sed are available in    # 'yy' prefixes to 'zz_'.  If yacc and sed are available in
246    # the build environment (i.e. $(YACC) and $(SED) are non-null    # the build environment (i.e. $(YACC) and $(SED) are non-null
247    # in jam), ascParse.c and ascParse.h are generated using these    # in jam), ascParse.c and ascParse.h are generated using these
248    # tools.  If not, copies of pre-generated files are used instead.    # tools.  If not, copies of pre-generated files are used instead.
249    #----------------------------------------------------------------------    #----------------------------------------------------------------------
250    
251    # ascParse.c needs a special define    # ascParse.c needs a special define
252    CCFLAGS on ascParse$(SUFOBJ) += -DYY_USE_CONST ;    CCFLAGS on ascParse$(SUFOBJ) += -DYY_USE_CONST ;
253    
254    rule make_ascParse    rule make_ascParse
255    {    {
256        if $(YACC) && $(SED)        if $(YACC) && $(SED)
257        {        {
258          Echo Generating ascParse from $(YACC) and $(SED) ;          Echo Generating ascParse from $(YACC) and $(SED) ;
259          DEPENDS $(ascParse_c) $(ascParse_h) : $(ascParse_y) ;          DEPENDS $(ascParse_c) $(ascParse_h) : $(ascParse_y) ;
260          Yacc1 $(ascParse_c) $(ascParse_h) : $(ascParse_y) ;          Yacc1 $(ascParse_c) $(ascParse_h) : $(ascParse_y) ;
261          YaccMv $(ascParse_c) $(ascParse_h) : $(ascParse_y) ;          YaccMv $(ascParse_c) $(ascParse_h) : $(ascParse_y) ;
262          yy_to_zz_c $(ascParse_c) : $(ascParse_y) ;          yy_to_zz_c $(ascParse_c) : $(ascParse_y) ;
263          yy_to_zz_h $(ascParse_h) : $(ascParse_y) ;          yy_to_zz_h $(ascParse_h) : $(ascParse_y) ;
264        }        }
265        else        else
266        {        {
267          Echo Copying ascParse.* from ascParse.*.no.yacc ;          Echo Copying ascParse.* from ascParse.*.no.yacc ;
268          File $(ascParse_c) : ascParse.c.no.yacc ;          File $(ascParse_c) : ascParse.c.no.yacc ;
269          File $(ascParse_h) : ascParse.h.no.yacc ;          File $(ascParse_h) : ascParse.h.no.yacc ;
270        }        }
271    
272        # make the header dependent        # make the header dependent
273        INCLUDES $(ascParse_c) : $(ascParse_h) ;        INCLUDES $(ascParse_c) : $(ascParse_h) ;
274    
275        Clean clean : $(ascParse_c) $(ascParse_h) ;        Clean clean : $(ascParse_c) $(ascParse_h) ;
276    }    }
277    
278    actions yy_to_zz_c    actions yy_to_zz_c
279    {    {
280      $(SED) -e "/#ifndef YYSTYPE/,/#endif/d" -e "/^#line /d" -e "s\yy\zz_\g" -e "s\YY\ZZ_\g" $(1) > tempfile.tmp      $(SED) -e "/#ifndef YYSTYPE/,/#endif/d" -e "/^#line /d" -e "s\yy\zz_\g" -e "s\YY\ZZ_\g" $(1) > tempfile.tmp
281      $(MV) tempfile.tmp $(1)      $(MV) tempfile.tmp $(1)
282    }    }
283    
284    actions yy_to_zz_h    actions yy_to_zz_h
285    {    {
286      $(SED) -e "s\yy\zz_\g" -e "s\YY\ZZ_\g" $(1) > tempfile.tmp      $(SED) -e "s\yy\zz_\g" -e "s\YY\ZZ_\g" $(1) > tempfile.tmp
287      $(MV) tempfile.tmp $(1)      $(MV) tempfile.tmp $(1)
288    }    }
289    
290    ascParse_c = [ FGristSourceFiles ascParse.c ] ;    ascParse_c = [ FGristSourceFiles ascParse.c ] ;
291    ascParse_h = [ FGristSourceFiles ascParse.h ] ;    ascParse_h = [ FGristSourceFiles ascParse.h ] ;
292    ascParse_y = ascParse.y ;    ascParse_y = ascParse.y ;
293    
294    LOCATE on $(ascParse_c) = $(ASC_COMPILER_DIR) ;    LOCATE on $(ascParse_c) = $(ASC_COMPILER_DIR) ;
295    LOCATE on $(ascParse_h) = $(ASC_COMPILER_DIR) ;    LOCATE on $(ascParse_h) = $(ASC_COMPILER_DIR) ;
296    LOCATE on $(ascParse_y) = $(ASC_COMPILER_DIR) ;    LOCATE on $(ascParse_y) = $(ASC_COMPILER_DIR) ;
297    
298    make_ascParse ;    make_ascParse ;
299    
300    #----------------------------------------------------------------------    #----------------------------------------------------------------------
301    # scanner.c    # scanner.c
302    #    #
303    # scanner.c implements the Ascend lexical analyzer.  It is    # scanner.c implements the Ascend lexical analyzer.  It is
304    # generated by lex/flex if available in the build environment    # generated by lex/flex if available in the build environment
305    # (i.e. $(LEX) is non-null in jam).  If lex/flex is not available,    # (i.e. $(LEX) is non-null in jam).  If lex/flex is not available,
306    # the a copy of a pre-generated file is used instead.    # the a copy of a pre-generated file is used instead.
307    #----------------------------------------------------------------------    #----------------------------------------------------------------------
308    
309    # scanner.c needs a special define (Watcom requires the '=""'. )    # scanner.c needs a special define (Watcom requires the '=""'. )
310    CCFLAGS on scanner$(SUFOBJ) += -DYY_USE_CONST="" ;    CCFLAGS on scanner$(SUFOBJ) += -DYY_USE_CONST="" ;
311    
312    scanner_c = [ FGristSourceFiles scanner.c ] ;    scanner_c = [ FGristSourceFiles scanner.c ] ;
313    scanner_h = scanner.h ;    scanner_h = scanner.h ;
314    scanner_l = scanner.l ;    scanner_l = scanner.l ;
315    LEXOPTS on $(scanner_c) = -Pzz_ ;    LEXOPTS on $(scanner_c) = -Pzz_ ;
316    
317    LOCATE on $(scanner_c) = $(ASC_COMPILER_DIR) ;    LOCATE on $(scanner_c) = $(ASC_COMPILER_DIR) ;
318    LOCATE on $(scanner_h) = $(ASC_COMPILER_DIR) ;    LOCATE on $(scanner_h) = $(ASC_COMPILER_DIR) ;
319    LOCATE on $(scanner_l) = $(ASC_COMPILER_DIR) ;    LOCATE on $(scanner_l) = $(ASC_COMPILER_DIR) ;
320    
321    LEX_or_copy $(scanner_c) : $(scanner_l) : scanner_c_no_flex : $(scanner_h) ;    LEX_or_copy $(scanner_c) : $(scanner_l) : scanner_c_no_flex : $(scanner_h) ;
322    
323    #----------------------------------------------------------------------    #----------------------------------------------------------------------
324    # Build the compiler library    # Build the compiler library
325    #----------------------------------------------------------------------    #----------------------------------------------------------------------
326    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)compiler ;    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)compiler ;
327    SEARCH_SOURCE = $(ASC_COMPILER_DIR) ;    SEARCH_SOURCE = $(ASC_COMPILER_DIR) ;
328    
329    Library $(ASC_COMPILER_LIBROOT) : $(ASC_COMPILER_SOURCES) ;    Library $(ASC_COMPILER_LIBROOT) : $(ASC_COMPILER_SOURCES) ;
330    MakeLocate $(ASC_COMPILER_LIB) : $(BUILD_DIR) ;    MakeLocate $(ASC_COMPILER_LIB) : $(BUILD_DIR) ;
331    
332    DEPENDS libs : $(ASC_COMPILER_LIB) ;    DEPENDS libs : $(ASC_COMPILER_LIB) ;
333    
334  #  Main $(ASC_COMPILER_LIBROOT)$(SUFSHR) : $(ASC_COMPILER_SOURCES) ;  #  Main $(ASC_COMPILER_LIBROOT)$(SUFSHR) : $(ASC_COMPILER_SOURCES) ;
335  #  MakeLocate $(ASC_COMPILER_LIB)$(SUFSHR) : $(BUILD_DIR) ;  #  MakeLocate $(ASC_COMPILER_LIB)$(SUFSHR) : $(BUILD_DIR) ;
336  }  }
337    
338  #=========================================================================  #=========================================================================
339  # General module  # General module
340  #=========================================================================  #=========================================================================
341  if $(BUILD_GENERAL)  if $(BUILD_GENERAL)
342  {  {
343    ASC_GENERAL_SOURCES =    ASC_GENERAL_SOURCES =
344      dstring.c      dstring.c
345      hashpjw.c      hashpjw.c
346      list.c      list.c
347      listio.c      listio.c
348      pool.c      pool.c
349      pretty.c      pretty.c
350      stack.c      stack.c
351      table.c      table.c
352      tm_time.c      tm_time.c
353      ;      ;
354    
355    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)general ;    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)general ;
356    SEARCH_SOURCE = $(ASC_GENERAL_DIR) ;    SEARCH_SOURCE = $(ASC_GENERAL_DIR) ;
357    
358    Library $(ASC_GENERAL_LIBROOT) : $(ASC_GENERAL_SOURCES) ;    Library $(ASC_GENERAL_LIBROOT) : $(ASC_GENERAL_SOURCES) ;
359    MakeLocate $(ASC_GENERAL_LIB) : $(BUILD_DIR) ;    MakeLocate $(ASC_GENERAL_LIB) : $(BUILD_DIR) ;
360    
361    DEPENDS libs : $(ASC_GENERAL_LIB) ;    DEPENDS libs : $(ASC_GENERAL_LIB) ;
362  }  }
363    
364  #=========================================================================  #=========================================================================
365  # Solver module  # Solver module
366  #=========================================================================  #=========================================================================
367  if $(BUILD_SOLVER)  if $(BUILD_SOLVER)
368  {  {
369    ASC_SOLVER_SOURCES =    ASC_SOLVER_SOURCES =
370      analyze.c      analyze.c
371      bnd.c      bnd.c
372      bndman.c      bndman.c
373      calc.c      calc.c
374      cond_config.c      cond_config.c
375      conditional.c      conditional.c
376      conopt.c      conopt.c
377      discrete.c      discrete.c
378      linsol.c      linsol.c
379      linsolqr.c      linsolqr.c
380      linutils.c      linutils.c
381      logrel.c      logrel.c
382      logrelman.c      logrelman.c
383      model_reorder.c      model_reorder.c
384      mps.c      mps.c
385      mtx_basic.c      mtx_basic.c
386      mtx_linal.c      mtx_linal.c
387      mtx_perms.c      mtx_perms.c
388      mtx_query.c      mtx_query.c
389      mtx_reorder.c      mtx_reorder.c
390      mtx_use_only.c      mtx_use_only.c
391      rel.c      rel.c
392      relman.c      relman.c
393      rootfind.c      rootfind.c
394      slv.c      slv.c
395      slv0.c      slv0.c
396      slv1.c      slv1.c
397      slv2.c      slv2.c
398      slv3.c      slv3.c
399      slv6.c      slv6.c
400      slv7.c      slv7.c
401      slv8.c      slv8.c
402      slv9.c      slv9.c
403      slv9a.c      slv9a.c
404      slvDOF.c      slvDOF.c
405      slv_common.c      slv_common.c
406      slv_interface.c      slv_interface.c
407      slv_stdcalls.c      slv_stdcalls.c
408      system.c      system.c
409      var.c      var.c
410      ;      ;
411    
412    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)solver ;    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)solver ;
413    SEARCH_SOURCE = $(ASC_SOLVER_DIR) ;    SEARCH_SOURCE = $(ASC_SOLVER_DIR) ;
414    
415    Library $(ASC_SOLVER_LIBROOT) : $(ASC_SOLVER_SOURCES) ;    Library $(ASC_SOLVER_LIBROOT) : $(ASC_SOLVER_SOURCES) ;
416    MakeLocate $(ASC_SOLVER_LIB) : $(BUILD_DIR) ;    MakeLocate $(ASC_SOLVER_LIB) : $(BUILD_DIR) ;
417    ObjectCcFlags $(ASC_SOLVER_SOURCES) : $(SOLVER_DEFS) ;    ObjectCcFlags $(ASC_SOLVER_SOURCES) : $(SOLVER_DEFS) ;
418    
419    # TODO:  remove when Tcl/Tk interface decoupled from base library    # TODO:  remove when Tcl/Tk interface decoupled from base library
420    ObjectHdrs slv6.c  slv_interface.c : $(ASC_INTERFACE_ROOT) ;    ObjectHdrs slv6.c  slv_interface.c : $(ASC_INTERFACE_ROOT) ;
421    
422    DEPENDS libs : $(ASC_SOLVER_LIB) ;    DEPENDS libs : $(ASC_SOLVER_LIB) ;
423  }  }
424    
425  #=========================================================================  #=========================================================================
426  # Utilities module  # Utilities module
427  #=========================================================================  #=========================================================================
428  if $(BUILD_UTILITIES)  if $(BUILD_UTILITIES)
429  {  {
430    ASC_UTILITIES_SOURCES =    ASC_UTILITIES_SOURCES =
431      ascDynaLoad.c      ascDynaLoad.c
432      ascEnvVar.c      ascEnvVar.c
433      ascMalloc.c      ascMalloc.c
434      ascPanic.c      ascPanic.c
435      ascPrint.c      ascPrint.c
436      ascSignal.c      ascSignal.c
437      mem.c      mem.c
438      readln.c      readln.c
439      set.c      set.c
440      ;      ;
441    
442    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)utilities ;    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)utilities ;
443    SEARCH_SOURCE = $(ASC_UTILITIES_DIR) ;    SEARCH_SOURCE = $(ASC_UTILITIES_DIR) ;
444    
445    Library $(ASC_UTILITIES_LIBROOT) : $(ASC_UTILITIES_SOURCES) ;    Library $(ASC_UTILITIES_LIBROOT) : $(ASC_UTILITIES_SOURCES) ;
446    MakeLocate $(ASC_UTILITIES_LIB) : $(BUILD_DIR) ;    MakeLocate $(ASC_UTILITIES_LIB) : $(BUILD_DIR) ;
447    
448    # TODO:  remove when Tcl/Tk decoupled from base library    # TODO:  remove when Tcl/Tk decoupled from base library
449    ObjectHdrs ascPrint.c : $(TK_HDRS) ;    ObjectHdrs ascPrint.c : $(TK_HDRS) ;
450    
451    DEPENDS libs : $(ASC_UTILITIES_LIB) ;    DEPENDS libs : $(ASC_UTILITIES_LIB) ;
452  }  }
453    
454  #=========================================================================  #=========================================================================
455  # Packages module  # Packages module
456  #=========================================================================  #=========================================================================
457  if $(BUILD_PACKAGES)  if $(BUILD_PACKAGES)
458  {  {
459    ASC_PACKAGES_SOURCES =    ASC_PACKAGES_SOURCES =
460        sensitivity.c        sensitivity.c
461      ascFreeAllVars.c      ascFreeAllVars.c
462      ;      ;
463    
464    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)packages ;    LOCATE_TARGET = $(BUILD_DIR)$(SLASH)packages ;
465    SEARCH_SOURCE = $(ASC_PACKAGES_DIR) ;    SEARCH_SOURCE = $(ASC_PACKAGES_DIR) ;
466    
467    Library $(ASC_PACKAGES_LIBROOT) : $(ASC_PACKAGES_SOURCES) ;    Library $(ASC_PACKAGES_LIBROOT) : $(ASC_PACKAGES_SOURCES) ;
468    MakeLocate $(ASC_PACKAGES_LIB) : $(BUILD_DIR) ;    MakeLocate $(ASC_PACKAGES_LIB) : $(BUILD_DIR) ;
469    
470    DEPENDS libs : $(ASC_PACKAGES_LIB) ;    DEPENDS libs : $(ASC_PACKAGES_LIB) ;
471  }  }
472    
473  #======================================================================  #======================================================================
474  # ASCEND base regression test  # ASCEND base regression test
475  #======================================================================  #======================================================================
476    
477  TEST_PROG = test_ascend_base ;  TEST_PROG = test_ascend_base ;
478    
479  # set location for target, source, and temporary files  # set location for target, source, and temporary files
480  LOCATE_TARGET = $(BUILD_DIR)$(SLASH)test ;  LOCATE_TARGET = $(BUILD_DIR)$(SLASH)test ;
481  SEARCH_SOURCE =  SEARCH_SOURCE =
482    $(ASC_COMPILER_DIR)$(SLASH)test    $(ASC_COMPILER_DIR)$(SLASH)test
483    $(ASC_GENERAL_DIR)$(SLASH)test    $(ASC_GENERAL_DIR)$(SLASH)test
484    $(ASC_SOLVER_DIR)$(SLASH)test    $(ASC_SOLVER_DIR)$(SLASH)test
485    $(ASC_UTILITIES_DIR)$(SLASH)test    $(ASC_UTILITIES_DIR)$(SLASH)test
486    $(ASC_PACKAGES_DIR)$(SLASH)test    $(ASC_PACKAGES_DIR)$(SLASH)test
487    $(srcdir)$(SLASH)test    $(srcdir)$(SLASH)test
488    $(srcdir)$(SLASH)..$(SLASH)..$(SLASH)test ;    $(srcdir)$(SLASH)..$(SLASH)..$(SLASH)test ;
489    
490  # extra symbolic targets for building test program  # extra symbolic targets for building test program
491  DEPENDS tests : $(TEST_PROG)$(SUFEXE) ;  DEPENDS tests : $(TEST_PROG)$(SUFEXE) ;
492  NOTFILE tests ;  NOTFILE tests ;
493    
494  TEST_SOURCES =  TEST_SOURCES =
495    assertimpl.c    assertimpl.c
496    printutil.c    printutil.c
497    redirectStdStreams.c    redirectStdStreams.c
498    test_ascend_base.c    test_ascend_base.c
499    test_register_general.c    test_register_general.c
500    test_dstring.c    test_dstring.c
501    test_hashpjw.c    test_hashpjw.c
502    test_list.c    test_list.c
503    test_listio.c    test_listio.c
504    test_pool.c    test_pool.c
505    test_pretty.c    test_pretty.c
506    test_stack.c    test_stack.c
507    test_table.c    test_table.c
508    test_tm_time.c    test_tm_time.c
509    test_register_utilities.c    test_register_utilities.c
510    test_ascDynaLoad.c    test_ascDynaLoad.c
511    test_ascEnvVar.c    test_ascEnvVar.c
512    test_ascMalloc.c    test_ascMalloc.c
513    test_ascPanic.c    test_ascPanic.c
514    test_ascPrint.c    test_ascPrint.c
515    test_ascSignal.c    test_ascSignal.c
516    test_mem.c    test_mem.c
517    test_readln.c    test_readln.c
518    test_set.c    test_set.c
519  #  test_register_solver.c    test_register_solver.c
520  #  test_slv_common.c    test_slv_common.c
521    ;    ;
522    
523  CCFLAGS +=  CCFLAGS on $(TEST_SOURCES) +=
524    -I..$(SLASH)..$(SLASH)test    -I..$(SLASH)..$(SLASH)test
525    -DALLOCATED_TESTS    -DALLOCATED_TESTS
526    ;    ;
527    
528  Main $(TEST_PROG) : $(TEST_SOURCES) ;  Main $(TEST_PROG) : $(TEST_SOURCES) ;
529  MakeLocate $(TEST_PROG)$(SUFEXE) : $(BUILD_DIR) ;  MakeLocate $(TEST_PROG)$(SUFEXE) : $(BUILD_DIR) ;
530  LinkLibraries $(TEST_PROG) :  LinkLibraries $(TEST_PROG) :
531    $(ASC_BASE_LIBS)    $(ASC_BASE_LIBS)
532    ..$(SLASH)..$(SLASH)test$(SLASH)libcunit$(SUFLIB) ;    $(ASC_BASE_LIBS)
533      ..$(SLASH)..$(SLASH)test$(SLASH)libcunit$(SUFLIB) ;
534  if $(NT)  
535  {  if $(NT)
536    if ($(BCCROOT) || ($(TOOLSET) = BORLANDC))  {
537    {    if ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
538      # need to fix Borland to include library location    {
539      LINKFLAGS on $(TEST_PROG)$(SUFEXE) += -L$(STDLIBPATH) -tWC ;      # need to fix Borland to include library location
540    }      LINKFLAGS on $(TEST_PROG)$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
541  }    }
542    }
543    
544    if $(UNIX) || $(OS) = LINUX
545    {
546        LINKFLAGS on $(TEST_PROG)$(SUFEXE) += $(DL_LIBS) $(MATH_LIBS) ;
547    }

Legend:
Removed from v.59  
changed lines
  Added in v.60

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