diff -Naur genesis-orig/src/Makefile genesis-mosx/src/Makefile --- genesis-orig/src/Makefile Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/Makefile Wed Apr 24 02:42:26 2002 @@ -0,0 +1,2033 @@ +# $Id: Makefile.dist,v 1.146 2001/07/22 17:53:18 mhucka Exp $ +# +# G E N E S I S +# The General Neural Simulation System +# Version 2.2 +# +# SYNOPSIS: This is the top-level Makefile for GENESIS. +# YOU MUST EDIT THIS FILE BEFORE RUNNING "make". +# Please follow the procedure given below. +# +# TABLE OF CONTENTS +# A. Procedure for building and installing GENESIS +# B. Installation configuration settings +# C. Optional libraries +# D. Definitions for specific operating system and compiler in use +# E. Custom settings +# F. Beginning of non-configurable definitions +# G. Revision history +# +# ---------------------------------------------------------------------- +# A. PROCEDURE FOR BUILDING AND INSTALLING GENESIS +# ---------------------------------------------------------------------- +# +# 1) Look through the rest of this file for a block of definitions for +# your particular computer operating system and compiler combination. +# For example, the definitions suggested for Solaris 2.x when using +# the Sun Workshop C compiler begins with lines that look like this: +# +# # System: Solaris 2.x (A.K.A. SunOS 5.x) +# # Compiler: Sun Workshop "cc" +# +# Note that some system/compiler combinations have several variations +# below, so look carefully at all of them before chosing one. +# +# 2) Uncomment the definitions for your operating system/compiler +# combination. NOTE: MAKE SURE THAT NO OTHER SYSTEM/COMPILER SECTION +# IS UNCOMMENTED. +# +# 3) Execute the command "make". +# +# 4) Execute the command "make install". +# +# 5) Execute the command "make clean". +# +# +# ADDITIONAL INFORMATION: +# If you run into problems compiling this package, consult the "CUSTOM +# SETTINGS" section below, where you may override the default settings. +# If one of the optional libraries fails to compile, comment out the +# library's macros in the "Optional libraries" section. +# +# GENESIS can also be built without the XODUS graphics libraries by +# replacing the commands in steps 2 and 3 with "make nxall" and +# "make nxinstall". A GENESIS without any libraries can be built +# with the commands "make minall" and "make mininstall". +# + +# ---------------------------------------------------------------------- +# B. INSTALLATION CONFIGURATION SETTINGS +# ---------------------------------------------------------------------- + +# The following variable determines where GENESIS is placed by the +# "make install" command. + +INSTALL = /usr/local/genesis +# /usr/local/genesis +# `pwd`/.. + +# ---------------------------------------------------------------------- +# C. OPTIONAL LIBRARIES +# ---------------------------------------------------------------------- +# +# The following libraries are optional. If you comment the macros for a +# given library here the library will not be compiled or linked into the +# executable. + +# +# kinetics --- Kinetic modeling library (necessary for kkit) +# + +KINETICSLIB = kin +KINETICSDIR = kinetics +KINETICSOBJ = $(KINETICSDIR)/kinlib.o + +# +# diskio --- Binary file format support library +# + +# Please note that all the macros here need to be uncommented if diskio +# support is to be included. FMT1 support is therefore included by +# default when the diskio library is linked in. + +FMT1SUBDIR = FMT1 +FMT1OBJ = $(DISKIODIR)/interface/FMT1/FMT1lib.o +FMT1FLAGS = -DFMT1 + +DISKIOLIB = diskio +DISKIODIR = diskio +DISKIOSUBDIR = $(NETCDFSUBDIR) \ + $(FMT1SUBDIR) +DISKIOOBJ = $(NETCDFOBJ) \ + $(FMT1OBJ) \ + $(DISKIODIR)/diskiolib.o +DISKIOFLAGS = $(NETCDFFLAGS) \ + $(FMT1FLAGS) + +# Uncomment the following definitions if the netCDF file format needs to +# be supported by diskio. netCDF is a system-independent, portable, +# binary file format. See the directory src/diskio/interface/netcdf for +# more information. NOTE: *only* uncomment the netCDF definitions below +# if diskio support is included above. +# +# As of June, 2001, the GENESIS developers have not successfully +# built the netcdf libraries under SunOS 4.1. If you are running +# SunOS 4.1, you should comment out all three of the following. + +NETCDFSUBDIR = netcdf +NETCDFOBJ = \ + $(DISKIODIR)/interface/$(NETCDFSUBDIR)/netcdflib.o \ + $(DISKIODIR)/interface/$(NETCDFSUBDIR)/netcdf-3.4/src/libsrc/libnetcdf.a +NETCDFFLAGS = -Dnetcdf + +# +# oldconn --- GENESIS 1.4 network connection compatibility library +# + +# The following is only necessary for GENESIS 1.4 network models +# minimally ported to GENESIS 2.x. NOTE: some of the tutorials/demos +# utilize this library. + +OLDCONNLIB = axon synapse personal toolconn simconn +OLDCONNDIR = oldconn +OLDCONNOBJ = $(OLDCONNDIR)/axon/axonlib.o \ + $(OLDCONNDIR)/synapse/synlib.o \ + $(OLDCONNDIR)/personal/perlib.o \ + $(OLDCONNDIR)/sim/simconnlib.o \ + $(OLDCONNDIR)/tools/toolconnlib.o + +# +# SPRNG -- Improved random number generation +# + +# The SPRNG library provides five random number generators. To use +# SPRNG, you must specify SPRNG as one and only one of lfg, lcg, +# lcg64, or cmrg here. Lagged Fibonacci is the default as it is the +# fastest and has the longest number sequence. +# +# Further information about SPRNG can be found at http://sprng.cs.fsu.edu/ +# The link to the users guide to installation on various platforms +# (http://daniel.scri.fsu.edu/www/version1.0/platforms.html) may be useful +# to address compilation problems with the SPRNG 1 version used in GENESIS. +# +# As of June, 2001, the GENESIS developers have not successfully +# built the SPRNG libraries under SunOS 4.1. If you are running +# SunOS 4.1, you should disable compiling of SPRNG. +# -- The above also applies to MacOSX and Darwin. +# +# If you are compiling on a 64-bit SGI, change "lfg" to "lcg64" below. + +SPRNG_LIB = lfg + +# Disable compiling of SPRNG by uncommenting the following line and +# commenting out all the other SPRNG lines below. If GENESIS has +# already been compiled, you'll have to do "make clean" before making +# GENESIS again. +# +SPRNG_FLAG= +# + +# SPRNG_FLAG = -DINCSPRNG +# SPRNGLIB = sprng/lib/lib$(SPRNG_LIB).a +# SPRNGDIR = sprng + + +# ---------------------------------------------------------------------- +# D. DEFINITIONS FOR SPECIFIC OPERATING SYSTEM AND COMPILER IN USE +# ---------------------------------------------------------------------- +# +# Below are some compiler dependent settings for various system/compiler +# combinations. Uncomment the appropriate macro settings for your system +# and compiler combination. + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: SunOS 4.1.x +# Compiler: SunOS 4.1.x "cc" +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=sun4 +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-O +# LD=ld + +## NOTE: If you get unresolved references for X11 library symbols in the +## final link step during compilation, add +## +## -Bstatic +## +## to the LDFLAGS definition here. This is a documented problem with +## X11 and SunOS shared libraries. If you want information on fixes for +## this problem look for faq #112 in: +## +## http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-5 +## + +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO + +# end SunOS 4.1.x + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Solaris 2.x (A.K.A. SunOS 5.x) +# Compiler: Sun Workshop "cc" +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=Solaris +# OS=SYSV + +# XINCLUDE=/usr/openwin/include +# XLIB=/usr/openwin/lib + +## Note: Do not increase the optimization level higher than -xO1, at least +## for version "WorkShop Compilers 5.0 98/12/15 C 5.0". Higher levels cause +## at least one of the XODUS widgets to fail to work properly, even though no +## compilation errors are reported. GCC at higher optimization levels does +## not exhibit this problem. + +# CC=cc +# CFLAGS=-Xt -xO1 -xlibmil -xprefetch -DBIGENDIAN +# CPP = /usr/ccs/lib/cpp -P + +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +## NOTE: In Solaris 2.4 through Solaris 2.6, the Sun-issued "yacc" +## appears to produce code that interacts badly with the Sun Workshop +## "cc" compiler when compiling the GENESIS yacc files. If you are +## running a version of Solaris prior to Solaris 2.7, you will need to +## obtain the GNU bison distribution (see ftp://ftp.gnu.org), compile +## it, install it on your system, then uncomment the following lines +## (the ones with "bison" in them) and also comment out the use of +## "yacc" further below. (We have successfully compiled GENESIS on +## Solaris 2.7 using the Sun-supplied yacc, so we don't believe you need +## to use bison for Solaris 2.7.) +## +## If you have a version of Solaris before 2.7, you will also need to +## obtain the GNU "flex" distribution (see ftp://ftp.gnu.org), compile +## it, install it, then uncomment the following lines and comment out +## the use of "lex" below. Substitute the location of the flex library +## on your system for (or remove -L if +## the library is installed in a standard library path). +## +## YACC = bison -y +## PARSER = bison +## +## LEX = flex -l +## LEXLIB = -L -lfl +## LIBS= $(LEXLIB) -lm +## +## If you are using Solaris 2.7, leave the YACC and LEX lines above +## commented out, and uncomment the following lines instead: + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# end Solaris 2.x (aka SunOS 5.x) using Sun Workshop C compiler + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Solaris 2.x (A.K.A. SunOS 5.x) +# Compiler: GCC 2.8.1 +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=Solaris +# OS=SYSV + +# XINCLUDE=/usr/openwin/include +# XLIB=/usr/openwin/lib + +# CC=gcc +# CFLAGS=-O2 -DBIGENDIAN +# CPP = /usr/ccs/lib/cpp -P + +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +## You may choose to use bison and/or flex here instead of the +## Sun-supplied yacc and/or lex. If so, uncomment the following lines, +## and comment out the default yacc/lex definitions further below. +## +## YACC = bison -y +## PARSER = bison +## +## LEX = flex -l +## LEXLIB = -L -lfl +## LIBS= $(LEXLIB) -lm + +# YACC=yacc +# PARSER=lex +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end Solaris 2.x (aka SunOS 5.x) using GCC 2.8.1 compiler + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: SGI IRIX 6.5 +# Compiler: SGI C compiler (producing new-style 32 bit executables) +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## The settings in this section are for N32 mode, the SGI "new" style +## 32-bit executables with N64 calling conventions and optimizations. +## They are current as of IRIX 6.5.3 and 6.5.8, tested on R10000-based +## Octane and O2 systems using the MIPSPro compiler version 7.30. +## There is a separate section below for 64-bit executables. + +# MACHINE = irix +# OS = SYSV + +# XINCLUDE = /usr/include +# XLIB = . + +# CC = cc +# CPP = /lib/cpp -P + +# CFLAGS = -n32 -xansi -signed -O2 -DBIGENDIAN -OPT:Olimit=6000 $(IRIX_WARN) + +# IRIX_HACK = -w +# LDFLAGS = -n32 -L/usr/lib32 -LD_MSG:off=85,134 +# LD = ld + +# RANLIB = ranlib +# AR = ar + +# YACC = yacc +# PARSER = yacc +# LEX = lex +# LEXLIB = -ll +# LIBS = $(LEXLIB) -lm + +# TERMCAP = -lcurses +# TERMOPT = -DTERMIO -DDONT_USE_SIGIO + +## UNCOMMENT ONLY ONE OF THE FOLLOWING. +## +## If you are using IRIX 6.5.8, uncomment the next IRIX_WARN line: +## +# IRIX_WARN = -woff 1116,1552,1174,3434 +## +## If you are using IRIX above 6.5.3 but less than 6.5.8, use the following: +## +# IRIX_WARN = -woff 1048,1116,1155,3170 +## +## Explanation of the above: the CFLAGS and LDFLAGS settings +## purposefully disable reporting of certain kinds of warnings via the +## -woff option, because they are either silly warnings, or else things +## we cannot fix because they are in code imported from elsewhere (e.g., +## netCDF), or else things that could be fixed but are not worth it at +## this time. Yes, we know this is poor practice, but given limited +## resources, it's the best we can do. + +# end SGI IRIX 6.5.x new-style 32-bit + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: SGI IRIX 6.5 +# Compiler: SGI C compiler (producing old-style 32-bit executables) +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## The settings in this section are for O32 mode, the SGI "old" style +## 32-bit executables. They are current as of IRIX 6.5.3 and 6.5.8, +## tested on R10000-based Octane and O2 systems. + +# MACHINE = irix +# OS = SYSV + +# XINCLUDE = /usr/include +# XLIB = . + +# CC = cc +# CPP = /lib/cpp -P + +# CFLAGS = -o32 -xansi -signed -O2 -DBIGENDIAN -Olimit 6000 -Wl,-woff,85 -Wl,-woff,134 +# IRIX_HACK = -w +# LDFLAGS = -o32 -cckr +# LD = ld + +# RANLIB = ranlib +# AR = ar + +# YACC = yacc +# PARSER = yacc +# LEX = lex +# LEXLIB = -ll +# LIBS = $(LEXLIB) -lm + +# TERMCAP = -lcurses +# TERMOPT = -DTERMIO -DDONT_USE_SIGIO + +## end SGI IRIX 6.5.x old-style 32-bit + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: SGI IRIX 6.4 +# Compiler: SGI C compiler (producing old-style 32-bit executables) +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## This configuration has not been tested by the Caltech GENESIS group since +## the introduction of IRIX 6.5. If you have a 6.4 system and encounter +## trouble here, please mail genesis@bbb.caltech.edu. + +# MACHINE=irix +# OS=SYSV + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc -32 +# CPP=/lib/cpp -P +# CFLAGS=-cckr -O -G 0 -DBIGENDIAN +# IRIX_HACK = -w + +# LD=ld -32 +# LDFLAGS= -O + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP= +# TERMOPT=-DPLAINTERM + +## end SGI IRIX 6.4 32-bit + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: SGI IRIX 6.5 +# Compiler: SGI C compiler (producing 64-bit executables) +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## This configuration is known to work for (and has only been tested on) +## SGI Origin 2000 running IRIX 6.5.10 with MIPSPro compiler 7.3.1.1m. It +## may work for other architectures and OS versions, but the GENESIS +## maintainers do not have experience with other combinations. Please mail +## genesis@bbb.caltech.edu if you use these settings and tell us about it. +## If these settings do not work for you, the "new-style 32-bit binary" +## settings above should still work (but more slowly). +## +## If you are using these settings, you *must* also change the file +## src/sprng/SRC/make.irix to (1) comment out the indicated 32-bit +## sections and (2) uncomment the indicated 64-bit sections. + +# MACHINE=irix +# OS=SYSV + +# XINCLUDE=/usr/include +# XLIB=/usr/lib64 + +# CC=cc -cckr -mips4 -64 -LNO -G 0 -r10000 +# CPP=/lib/cpp -P +# CFLAGS=-O2 -Ddecalpha -DBIGENDIAN -DLONGWORDS +# IRIX_HACK = -w +# LD=ld -mips4 -64 -G 0 +# LDFLAGS=-O2 -LNO -r10000 -mips4 -64 -G 0 + +# RANLIB=ranlib +# AR=ar + +## It appears safest to use bison and flex instead of yacc and lex. +## See the README file for information on obtaining bison and flex. + +# YACC=bison -y +# PARSER=bison +# LEX=flex -l +# LEXLIB=-lfl +# LIBS= $(LEXLIB) -lm + +# TERMCAP= +# TERMOPT=-DPLAINTERM + +# end SGI IRIX 6.x 64-bit + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: SGI IRIX 4.x +# Compiler: SGI C compiler +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=irix +# OS=SYSV + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc -cckr -G 5 +# CPP=/lib/cpp -P +# CFLAGS=-O -DBIGENDIAN +# IRIX_HACK = -w +# LD=ld +# LDFLAGS=-G 5 + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP= +# TERMOPT=-DPLAINTERM + +# end SGI IRIX 4.x + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: DECStation running Ultrix 4.x or 3.x +# Compiler: DEC C compiler +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=mips +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +## You might have to play with the value of the -G option to get +## GENESIS to compile/link properly. + +# CC=cc -G 5 +# CPP=/lib/cpp -P +# CFLAGS=-O +# LD=ld +# LDFLAGS=-G 5 + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO + +# end DECStation running Ultrix 4.x or 3.x + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: DEC Alpha running Digital UNIX version 4 +# Compiler: DEC cc compiler +# +# This combination is known to FAIL. Support is presently unavailable. +# If you succeed in getting this to work yourself, please send your +# changes back to the GENESIS developers. +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=alpha +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc -std +# CPP=/lib/cpp -P +# CFLAGS=-O2 -DLONGWORDS +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= -ldnet_stub $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end DEC Alpha running OSF/1 release 2 or higher + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: DEC Alpha running Digital UNIX version 3.2 +# Compiler: DEC cc compiler +# +# This combination is known to FAIL. Support is presently unavailable. +# If you succeed in getting this to work yourself, please send your +# changes back to the GENESIS developers. +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=alpha +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-g -std0 -taso -DLONGWORDS # -Olimit 5000 +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= -ldnet_stub $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end DEC Alpha running OSF/1 release 2 or higher + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: DEC Alpha OSF1/Digital UNIX version 3.2 +# Compiler: GNU GCC (egcs-2.91.66, egcs-1.1.2 release) +# +# This combination is known to FAIL. Support is presently unavailable. +# If you succeed in getting this to work yourself, please send your +# changes back to the GENESIS developers. +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=alpha +# OS=BSD + +# XINCLUDE=/usr/X11R6/include +# XLIB=/usr/lib + +# CC=gcc +# CPP=/lib/cpp -P +# CFLAGS=-g -DLONGWORDS +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= -ldnet_stub $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end DEC Alpha running OSF/1 release 2 or higher + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: DEC Alpha running OSF/1 release 2 or higher +# Compiler: DEC cc compiler +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=alpha +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +## The c89 compiler doesn't compile cleanly across alpha OS releases. +## Under OSF/1 v2 the -O option results in runtime problems in Xodus. +## The -O problem may also exist for OSF/1 v3 systems. + +# CC=cc -std0 +# CPP=/lib/cpp -P +# CFLAGS=-O -DLONGWORDS +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= -ldnet_stub $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end DEC Alpha running OSF/1 release 2 or higher + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Cray T3D (as installed at Pittsburgh Supercomputing Center) +# Compiler: UNICOS "cc" +# +# see Makefile.t3d for other important settings +# +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=t3d +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-O -DCRAY +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP= +# TERMOPT=-DPLAINTERM + +# end Cray T3D (as installed at Pittsburgh Supercomputing Center) + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Cray T3E (as installed at Pittsburgh Supercomputing Center) +# Compiler: UNICOS "cc" +# +# see Makefile.t3e for other important settings +# +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# MACHINE=t3e +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc +# CPP=cpp -P +# CFLAGS=-O -DCRAY -DT3E +# LD=cld +# LDFLAGS=-Xm +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP= +# TERMOPT=-DPLAINTERM + +# end Cray T3E (as installed at Pittsburgh Supercomputing Center) + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Intel Paragon (as installed at Caltech) +# Compiler: Intel "icc" compiler +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## NOTE: icc has trouble cross compiling using the standard make as it +## insists on adding "-target sun4" in the default .c.o rule +## and some of the Xodus makefiles don't overide this. We +## suggest using GNU make, which doesn't have this problem. + +# MACHINE=paragon +# OS=SYSV + +# XINCLUDE=/usr/include +# XLIB=. + +# CC=icc +# CPP=cpp860 -P +# CFLAGS=-nx -O +# LD=ld860 +# LDFLAGS=-nx + +# RANLIB=ranlib +# AR=ar860 + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP= +# TERMOPT=-DPLAINTERM + +# end Intel Paragon (as installed at Caltech) + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Linux 1.2.x and up on Intel x86-based systems +# Compiler: GCC +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## 2000-05-23 +## Termcap/ncurses issues: The shell library makes reference to the +## termcap library. Some Linux distributions have an ncurses library +## which is includes termcap emulation. GENESIS appears to work +## properly with the ncurses supplied with Red Hat Linux 5.1 and higher +## and Debian Linux (glibc2.1, egcs-2.91.66). However, linking with +## ncurses is known to have resulted in core dumps in GENESIS in older +## Linux versions. +## +## If you encounter problems linking with the TERMCAP flags listed below +## or the GENESIS command line interface does not work, try the +## following alternatives: +## +## 1) TERMCAP = -ltermcap +## +## 2) (If you are using SuSE Linux) +## TERMCAP = /usr/lib/termcap/libtermcap.a +## +## 3) (If you are using Red Hat Linux prior to version 6.0) +## TERMCAP = /usr/lib/libtermcap.a + +# MACHINE=Linux +# OS=BSD + +# XINCLUDE=/usr/X11R6/include +# XLIB=/usr/X11R6/lib + +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-O2 -D__GLIBC -D__NO_MATH_INLINES + +# LD=ld +# LDFLAGS=-L/usr/lib + +# RANLIB=ranlib +# AR=ar + +# YACC=bison -y +# PARSER=bison +# LEX=flex -l +# LEXLIB=-lfl +# LIBS= $(LEXLIB) -lm + +# TERMCAP=-lncurses +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +## For Linux using gcc, usually there will be a link from /lib/cpp to +## wherever cpp is installed. If not, try to find the gcc-lib +## installation, perhaps under /usr/lib/gcc-lib, and either create a +## symlink from /lib/cpp or change the CPP define below to use the full +## path to where cpp lives. +## +## CPP = /full/path/to/cpp -P + +# end Linux 1.2.x and up on Intel x86-based systems + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Linux 2.x and up on PPC-based systems (LinuxPPC) +# Compiler: GCC +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## This configuration was provided by a GENESIS user, Alfonso +## Delgado-Reyes. Please make sure that you have up-to-date and +## complete installations of flex and bison if you are using this +## configuration. + +## If you encounter problems linking with the TERMCAP flags listed below +## or the GENESIS command line interface does not work, try the +## following alternatives: +## +## 1) TERMCAP = -ltermcap +## +## 2) TERMCAP = /usr/lib/termcap/libtermcap.a +## +## 3) TERMCAP = /usr/lib/libtermcap.a + +# MACHINE=LinuxPPC +# OS=BSD + +# XINCLUDE=/usr/X11R6/include +# XLIB=/usr/X11R6/lib + +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-O2 -D__GLIBC -D__NO_MATH_INLINES + +# LD=ld +# LDFLAGS=-L/usr/lib + +# RANLIB=ranlib +# AR=ar + +# YACC=bison -y +# PARSER=bison +# LEX=flex -l +# LEXLIB=-lfl +# LIBS= $(LEXLIB) -lm + +# TERMCAP=-lncurses +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end Linux 2.x and up on PPC-based systems (LinuxPPC) + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: MacOS X and Darwin (PPC-based systems) +# Compiler: Apple Computer, Inc. v.gcc-932.1, based on gcc v.2.95.2 +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## This configuration was provided by a GENESIS user, Alfonso +## Delgado-Reyes. Please make sure that you have up-to-date and +## complete installations of flex and bison if you are using this +## configuration. If you don not have bison grab it from: +## http://www.ibiblio.org/pub/gnu/bison/ + +MACHINE=MacOSXDarwin +OS=BSD + +XINCLUDE=/usr/X11R6/include +XLIB=/usr/X11R6/lib + +CC=cc +CPP=/usr/libexec/gcc/darwin/`/usr/bin/arch`/default/cpp -E -P -traditional -D__STDC__ +CFLAGS=-I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN + +LD=ld +LDFLAGS= + +RANLIB=ranlib +AR=ar + +YACC=bison -y +PARSER=bison + +LEX=lex +LEXLIB=-ll +LIBS= $(LEXLIB) + +TERMCAP=-lcurses +TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end MacOS X and Darwin (PPC-based systems) + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: FreeBSD 4.1 +# Compiler: GCC C compiler +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## FreeBSD comes with Berkeley yacc and is used here. A fix in the yacc +## specs allows this version of yacc to work where it failed under Linux +## systems with Berkeley yacc. The default settings for yacc and lex +## should work. + +# MACHINE=FreeBSD +# OS=BSD + +# XINCLUDE=/usr/X11R6/include +# XLIB=/usr/X11R6/lib + +# CC=cc +# CPP=/usr/libexec/cpp -P +# CFLAGS=-O2 -D__GLIBC -D__NO_MATH_INLINES + +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP=-ltermcap +# TERMOPT=-DTERMIO + +# end FreeBSD + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: HP running HPUX (versions unknown) +# Compiler: HP C compiler +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## The GENESIS maintainers have very little experience with HPUX and the +## status of this configuration is unknown. There have been reports of +## display problems under HPUX. + +# MACHINE=hpux +# OS=SYSV + +# XINCLUDE=/usr/include/X11R5 +# XLIB=/usr/lib/X11R5 + +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-O +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP = +# TERMOPT = -DPLAINTERM + +# end HP running HPUX (versions unknown) + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: IBM AIX 4.x +# Compiler: IBM 'xlc' C compiler version 5 +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# +# This combination of flags has been tested on IBM RS/6000 computers +# running AIX 4.2 and 4.3, as well as the teraflop-scale Blue Horizon +# Power3 system at SDSC. We thank Chuck Charman and Giri Chukkpalli +# for their help. + +# MACHINE = aix +# OS = SYSV + +# XINCLUDE = /usr/include +# XLIB = /usr/lib + +# CC = xlc +# CPP = /lib/cpp -P +## +## If you are using an IBM Power3 system, such as the Teraflops, add the +## following to CFLAGS for better optimization: -qarch=pwr3 -qtune=pwr3 +## +# CFLAGS = -DBIGENDIAN -U__STR__ -ma -O2 -qchars=signed -qmaxmem=8192 +# LD = ld +# LDFLAGS = + +# RANLIB = ranlib +# AR = ar + +# YACC = yacc +# PARSER = yacc +# LEX = lex +# LEXLIB = -ll -lcurses -lcur +# LIBS = $(LEXLIB) -lm -lrs2 -lbsd -lc + +# TERMCAP = -lcurses -lcur +# TERMOPT = -DDONT_USE_SIGIO + +# end IBM RS6000 running AIX + + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: Other UNIX system +# Compiler: Other compiler +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# Other UNIX systems +# +# Settings are general and the underlying makefile tries to set certain +# system dependent macros to something which will work everywhere. +# +# Note: you'll have to at least set the OS macro to either SYSV or +# BSD to indicate either a System V or a Berkeley variant OS +# respectively. Also probably need to set RANLIB to echo if +# there is no ranlib command on your system. +# + +# MACHINE=other + +# !!! OS must be set properly !!! Uncomment *one* of the following. + +# OS=SYSV +# OS=BSD + +# XINCLUDE=/usr/include +# XLIB=/usr/lib + +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-O +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) -lm + +# TERMCAP = +# TERMOPT = -DDONT_USE_SIGIO + +# end System specific suggested settings + + +# ---------------------------------------------------------------------- +# E. CUSTOM SETTINGS +# +# Here is the place to overide macro settings from above selectively. +# You should uncomment one of the above sections and uncomment items in +# this section to override the standard settings. +# ---------------------------------------------------------------------- + +## This is one of SYSV for System V UNIX varients and BSD for Berkeley +## vartients. + +# OS = BSD + + +## +## X11 settings +## + +## Typical settings: + +# XLIB = /usr/lib +# XINCLUDE = . + +## For some versions of XFree86 (PC's with Linux) XLIB will need to be +## set as follows + +# XLIB = /usr/X11/lib + + +## For SUN OpenWindows: +# +# XLIB = /usr/openwin/lib +# XINCLUDE = /usr/openwin/include +# + +## +## TMPDIR is a directory for temp files during making of GENESIS libraries. +## change as needed if the default doesn't have enough space. The CCTMPDIR +## is a compiler specific option for compiler temp files. The commented line +## below is the SunOS cc option. +## + +TMPDIR = /tmp + +## For SunOS 4.x +# CCTMPDIR = -temp=$(TMPDIR) + + +## +## C compiler +## + +## Typical settings: +# +# CC=cc +# CPP=/lib/cpp -P +# CFLAGS=-O +# LD=ld + +## GCC C compiler: +## +## For gcc, usually there will be a link from /lib/cpp to wherever cpp +## is installed. If not, try to find the gcc-lib installation, perhaps +## under /usr/lib/gcc-lib and either create a symlink from /lib/cpp or +## change the CPP define below to use the full path to where cpp lives. +## +## Later versions of gcc compile GENESIS (with many warnings) without +## using the -traditional option. If the compile fails you might try +## adding -traditional to CFLAGS or updating your compiler. + +# CC=gcc +# CPP=/lib/cpp -P +# CFLAGS=-O +# LD=ld + + +## +## LDFLAGS are the final link options +## + +# LDFLAGS= + + +## +## RANLIB +## + +## Set the RANLIB macro to "RANLIB = echo" on systems without ranlib. +## (Only important to set for MACHINE=other and perhaps Linux; all other +## MACHINEs will ignore the value set here.) +## +## AR is the library archive program used to build the Xodus widget +## libraries + +# RANLIB=ranlib +# AR=ar + + +## +## YACC and LEX options. +## + +# YACC=yacc +# PARSER=yacc +# LEX=lex +# LEXLIB=-ll + +## If you have GNU bison and flex uncomment the following lines. +## +## YACC=bison -y +## PARSER=bison +## LEX=flex -l +## LEXLIB=-lfl +## +## Solaris 2.4 users note: the yacc for Solaris 2.4 produces an +## bad parse table which causes the parser to fail. Please use +## bison/flex. +## +## Linux users note: use flex and bison rather than yacc and lex. +## lex and yacc are scripts which use bison and flex on some systems +## while others have an independent yacc in addition to bison. +## The independent yacc output will fail to compile. +## +## SGI user note: the SGI lex defines a relatively small token text +## buffer of 200 characters. Lex will exit if a token's text exceeds +## this limit (e.g. a very long command argument like shape coords +## lists). Changes have been made to avoid this problem. If you +## encounter it anyway then using flex will fix it. +## +## Other users: if you don't have bison, flex, yacc or lex, see the +## section in src/README about getting bison and flex or using the +## preprocessed yacc and lex output. + + +## +## LIBS the link libraries (not including X11) +## + +# LIBS = $(LEXLIB) -lm + + +# ---------------------------------------------------------------------- +# F. BEGINNING OF NON-CONFIGURABLE DEFINITIONS +# +# This end the user configurable part of the Makefile. You shouldn't +# have to change things below this point. +# ---------------------------------------------------------------------- + +INSTALLBIN = $(INSTALL)/bin + +# +# X11 libraries +# + +XLIBS = -L$(XLIB) \ + -lXt \ + -lX11 + +RCSRELEASE = DR2-2-P1 +MF = Makefile.$(MACHINE) +SHELL = /bin/sh + +SIMLIB = ../lib + +XODUSLIB = Xodus + +INTERP = ss/ss.o shell/shelllib.o + +BASECODE = sim/simlib.o sys/utillib.o $(INTERP) + +OBJLIBS = buffer/buflib.o \ + segment/seglib.o \ + hh/hhlib.o \ + device/devlib.o \ + out/outlib.o \ + olf/olflib.o \ + tools/toollib.o \ + concen/conclib.o \ + hines/hineslib.o \ + user/userlib.o \ + param/paramlib.o \ + pore/porelib.o \ + $(OLDCONNOBJ) \ + $(DISKIOOBJ) \ + $(KINETICSOBJ) \ + newconn/newconnlib.o + +XODUS = $(XODUSLIB)/xo/xolib.o \ + $(XODUSLIB)/widg/widglib.o \ + $(XODUSLIB)/draw/drawlib.o \ + $(XODUSLIB)/Draw/libDraw.a \ + $(XODUSLIB)/Widg/libWidg.a \ + $(XODUSLIB)/Xo/libXo.a + +EXTRALIBS = $(SPRNGLIB) $(TERMCAP) + +SUBDIR = sys ss sim $(SPRNGDIR) shell newconn $(OLDCONNDIR) \ + buffer concen device hh hines olf out segment \ + tools user param pore convert $(DISKIODIR) \ + $(KINETICSDIR) Xodus + +NXSUBDIR = sys ss shell sim $(SPRNGDIR) newconn oldconn \ + buffer concen device hh hines olf out segment \ + tools user param pore convert $(DISKIODIR) \ + $(KINETICSDIR) + +MINSUBDIR = sys ss shell sim $(SPRNGDIR) + +LIBLIST = output \ + hh \ + devices \ + buffer \ + segment \ + user \ + xo \ + draw \ + widg \ + olf \ + tools \ + concen \ + hines \ + param \ + pore \ + newconn \ + $(DISKIOLIB) \ + $(OLDCONNLIB) \ + $(KINETICSLIB) + +NXLIBLIST = output \ + hh \ + devices \ + buffer \ + segment \ + user \ + olf \ + tools \ + concen \ + hines \ + param \ + pore \ + newconn \ + $(DISKIOLIB) \ + $(OLDCONNLIB) \ + $(KINETICSLIB) + +# +# all is now the default target +# + +all: code_g default + +genesis: all + +default: liblist + @make -f $(MF) CC_IN="$(CC)" TMPDIR="$(TMPDIR)" LD_IN="$(LD)" AR_IN="$(AR)" RANLIB_IN="$(RANLIB)" CPP_IN="$(CPP)" YACC_IN="$(YACC)" LEX_IN="$(LEX)" LEXLIB_IN="$(LEXLIB)" OS_IN="$(OS)" MACHINE_IN="$(MACHINE)" INSTALL="$(INSTALL)" INSTALLBIN="$(INSTALLBIN)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER) $(DISKIOFLAGS) $(SPRNG_FLAG)" IRIX_HACK_IN="$(IRIX_HACK)" LDFLAGS_IN="$(LDFLAGS)" SPRNG_LIB="$(SPRNG_LIB)" XLIBS="$(XLIBS)" XINCLUDE="$(XINCLUDE)" LIBS="$(LIBS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" MF="$(MF)" SUBDIR="$(SUBDIR)" DISKIOSUBDIR="$(DISKIOSUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)" EXTRALIBS="$(EXTRALIBS)" XODUS="$(XODUS)" RCSRELEASE="$(RCSRELEASE)" libs genesis + +nxdefault: nxliblist + @make -f $(MF) CC_IN="$(CC)" TMPDIR="$(TMPDIR)" LD_IN="$(LD)" AR_IN="$(AR)" RANLIB_IN="$(RANLIB)" CPP_IN="$(CPP)" YACC_IN="$(YACC)" LEX_IN="$(LEX)" LEXLIB_IN="$(LEXLIB)" OS_IN="$(OS)" MACHINE_IN="$(MACHINE)" INSTALL="$(INSTALL)" INSTALLBIN="$(INSTALLBIN)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER) $(DISKIOFLAGS) $(SPRNG_FLAG)" IRIX_HACK_IN="$(IRIX_HACK)" LDFLAGS_IN="$(LDFLAGS)" SPRNG_LIB="$(SPRNG_LIB)" LIBS="$(LIBS)" MF="$(MF)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" SUBDIR="$(SUBDIR)" NXSUBDIR="$(NXSUBDIR)" MINSUBDIR="$(MINSUBDIR)" DISKIOSUBDIR="$(DISKIOSUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)" EXTRALIBS="$(EXTRALIBS)" nxlibs nxgenesis + +mindefault: minliblist + @make -f $(MF) CC_IN="$(CC)" TMPDIR="$(TMPDIR)" LD_IN="$(LD)" AR_IN="$(AR)" RANLIB_IN="$(RANLIB)" CPP_IN="$(CPP)" YACC_IN="$(YACC)" LEX_IN="$(LEX)" LEXLIB_IN="$(LEXLIB)" OS_IN="$(OS)" MACHINE_IN="$(MACHINE)" INSTALL="$(INSTALL)" INSTALLBIN="$(INSTALLBIN)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER) $(SPRNG_FLAG)" IRIX_HACK_IN="$(IRIX_HACK)" LDFLAGS_IN="$(LDFLAGS)" SPRNG_LIB="$(SPRNG_LIB)" LIBS="$(LIBS)" MF="$(MF)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" SUBDIR="$(SUBDIR)" NXSUBDIR="$(NXSUBDIR)" MINSUBDIR="$(MINSUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)" EXTRALIBS="$(EXTRALIBS)" minlibs mingenesis + +code_g: + @make -f $(MF) CC_IN="$(CC)" TMPDIR="$(TMPDIR)" LD_IN="$(LD)" CPP_IN="$(CPP)" YACC_IN="$(YACC)" LEX_IN="$(LEX)" LEXLIB_IN="$(LEXLIB)" OS_IN="$(OS)" MACHINE_IN="$(MACHINE)" INSTALL="$(INSTALL)" INSTALLBIN="$(INSTALLBIN)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER)" IRIX_HACK_IN="$(IRIX_HACK)" LDFLAGS_IN="$(LDFLAGS)" LIBS="$(LIBS)" MF="$(MF)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" SUBDIR="$(SUBDIR)" NXSUBDIR="$(NXSUBDIR)" MINSUBDIR="$(MINSUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)" EXTRALIBS="$(EXTRALIBS)" code_g + +nxgenesis: code_g nxdefault +nxall: code_g nxdefault + +mingenesis: code_g mindefault +minall: code_g mindefault + +liblist: Makefile + @echo "# liblist - This file is generated automatically." > liblist + @echo "# DO NOT EDIT unless you are sure you" >> liblist + @echo "# know what you are doing. Generally" >> liblist + @echo "# Makefile should be edited instead." >> liblist + @echo $(LIBLIST) | tr ' ' '\012' >> liblist + +nxliblist: Makefile + @echo "# nxliblist - This file is generated automatically." > nxliblist + @echo "# DO NOT EDIT unless you are sure you" >> nxliblist + @echo "# know what you are doing. Generally" >> nxliblist + @echo "# Makefile should be edited instead." >> nxliblist + @echo $(NXLIBLIST) | tr ' ' '\012' >> nxliblist + +minliblist: Makefile + @echo "# minliblist - This file is generated automatically." > minliblist + @echo "# DO NOT EDIT unless you are sure you" >> minliblist + @echo "# know what you are doing. Generally" >> minliblist + @echo "# Makefile should be edited instead." >> minliblist + +cleandist: clean + -(rm -rf $(INSTALL)/startup/*) + -(rm -rf $(INSTALL)/startup/.*simrc) + -(rm -rf $(INSTALL)/startup) + -(rm -rf $(INSTALL)/lib/*) + -(rm -rf $(INSTALL)/lib) + -(rm -rf $(INSTALL)/include/*) + -(rm -rf $(INSTALL)/include) + -(rm -f $(INSTALL)/genesis) + -(rm -f $(INSTALL)/nxgenesis) + -(rm -f $(INSTALL)/mingenesis) + -(rm -rf $(INSTALL)/.*simrc) + -(rm -f $(INSTALLBIN)/convert) + -(rm -f TAGS) + -(find . -name '*~' -exec rm -f {} ';') + @echo "Done with full clean" + +# -(rm -f `find . -name '*~'`) +# @echo "Done with full clean" + +clean: + @make -f $(MF) MF="$(MF)" DISKIOSUBDIR="$(DISKIOSUBDIR)" SUBDIR="$(SUBDIR)" RCSRELEASE="$(RCSRELEASE)" SPRNG_LIB="$(SPRNG_LIB)" clean + +rcsclean: + @make -f $(MF) MF="$(MF)" SUBDIR="$(SUBDIR)" RCSRELEASE="$(RCSRELEASE)" rcsclean + +makedirs: + -@mkdir -p $(INSTALL) + -@mkdir -p $(INSTALLBIN) + -@mkdir -p $(INSTALL)/Doc + -@mkdir -p $(INSTALL)/Hyperdoc + -@mkdir -p $(INSTALL)/Scripts + -@mkdir -p $(INSTALL)/lib + -@mkdir -p $(INSTALL)/include + -@mkdir -p $(INSTALL)/startup + -@mkdir -p $(INSTALL)/src + +tags: + etags `find . /usr/include/X11/ -name '*.[chg]' ! -name '*@*'` + etags -a `find /usr/include -name '*.h'` + +install: makedirs + @make -f $(MF) MF="$(MF)" INSTALL="$(INSTALL)" INSTALLBIN="$(INSTALLBIN)" DISKIOSUBDIR="$(DISKIOSUBDIR)" SPRNG_LIB="$(SPRNG_LIB)" SUBDIR="$(SUBDIR)" RANLIB_IN="$(RANLIB)" install + +nxinstall: makedirs + @make -f $(MF) MF="$(MF)" INSTALL="$(INSTALL)" INSTALLBIN="$(INSTALLBIN)" DISKIOSUBDIR="$(DISKIOSUBDIR)" SPRNG_LIB="$(SPRNG_LIB)" NXSUBDIR="$(NXSUBDIR)" RANLIB_IN="$(RANLIB)" nxinstall + +mininstall: makedirs + @make -f $(MF) MF="$(MF)" INSTALL="$(INSTALL)" INSTALLBIN="$(INSTALLBIN)" SPRNG_LIB="$(SPRNG_LIB)" MINSUBDIR="$(MINSUBDIR)" RANLIB_IN="$(RANLIB)" mininstall + + +# ---------------------------------------------------------------------- +# G. REVISION HISTORY +# ---------------------------------------------------------------------- + +# $Log: Makefile.dist,v $ +# Revision 1.146 2001/07/22 17:53:18 mhucka +# Final updates for 2.2 release. +# +# Revision 1.145 2001/06/29 22:03:21 mhucka +# Updates for more systems. +# +# Revision 1.144 2001/05/10 16:13:56 mhucka +# More work on LinuxPPC. +# +# Revision 1.143 2001/05/10 16:12:03 mhucka +# First version of PPC support, based on work by Alfonso Delgado-Reyes. +# +# Revision 1.142 2001/05/09 15:16:02 mhucka +# Changes for IBM AIX and DEC Alpha. +# +# Revision 1.141 2001/03/30 05:20:00 mhucka +# Updates for FreeBSD. +# +# Revision 1.140 2000/10/12 22:06:22 mhucka +# Added minor comment to AIX section, and made the "makedirs" directive +# ignore errors. +# +# Revision 1.139 2000/10/10 16:55:06 mhucka +# Turns out that compiling with optimization settings higher than -xO1 with +# the Solaris Workshop 5.0 cc compiler causes some widgets in Xodus to fail +# to work properly. So had to revise the compiler flags for Solaris case. +# +# Revision 1.138 2000/10/09 23:55:02 mhucka +# More updates to several platforms. +# +# Revision 1.137 2000/09/21 19:39:58 mhucka +# 1) Now using -O2 for gcc. +# 2) Updated definitions for AIX +# +# Revision 1.136 2000/09/11 21:46:05 mhucka +# nxinstall and mininstall weren't running the makedirs directive. +# +# Revision 1.135 2000/09/11 16:24:45 mhucka +# Moved where TERMCAP is used, to EXTRALIBS. +# +# Revision 1.134 2000/07/12 08:52:02 mhucka +# Fixed IRIX config to work for 6.5.8. +# Added INSTALL/src to directories created by makedirs directive. +# +# Revision 1.133 2000/07/03 21:10:07 mhucka +# Made a number of changes to the IRIX compilation flags, including changing +# from using -cckr to -xansi. The previous combination of flags didn't turn +# out to work properly for both n32 and o32 and non-GNU make on the SGI. +# Making it all work required changes to a lot of other files too. +# +# Revision 1.132 2000/06/23 04:18:48 mhucka +# Added partial AIX support from Giri Chukkpalli and Chuck Charman @ SDSC. +# +# Revision 1.131 2000/06/21 23:44:02 mhucka +# Fixed up some of the make clean directives. +# +# Revision 1.130 2000/06/21 23:43:07 mhucka +# Additional changes to the ld flags under IRIX, plus some comments for the +# IRIX section. +# +# Revision 1.129 2000/06/12 04:01:42 mhucka +# 1) Added IRIX_HACK defines that were missing from previous check-in. +# 2) Updated cc compiler options for irix. +# 3) Made "make cleandist" remove TAGS file, made "make clean" leave it. +# +# Revision 1.128 2000/06/12 03:57:37 mhucka +# Added an awful, bletcherous hack. The variable IRIX_HACK is used in only two +# places, ss/Makefile and convert/Makefile, to pass the -w option to the IRIX +# cc compiler when y.tab.c is being compiled. The reason is to avoid getting +# two hundred warnings under the IRIX cc compiler. The warnings are generated +# for things like "statement is unreachable", but it's in code (y.tab.c) that's +# generated by lex, so there's nothing we can do. I wish there was a cleaner +# way of supplying a flag selectively like this, without resorting to passing +# IRIX_HACK all over the place just for this one thing. +# +# Revision 1.127 2000/06/07 05:51:04 mhucka +# 1) Changed LINKFLAGS to LDFLAGS. +# 2) Fixed IRIX flags to work with current version of GENESIS. +# 3) Not using MACH_DEP_FLAGS anymore. +# 4) Added missing param library to definition of LIBLIST. +# 5) Don't delete liblist after all. +# +# Revision 1.126 2000/05/26 23:39:09 mhucka +# Added new INSTALLBIN for things like the convert program (and other +# utilities in the future). +# +# Revision 1.125 2000/05/26 22:42:12 mhucka +# The target for genesis should make "all", not just "default". +# +# Revision 1.124 2000/05/26 22:18:55 mhucka +# 1) Solaris needs -DBIGENDIAN in CFLAGS. +# 2) There was an -I in the CFLAGS for Solaris. +# 3) Added genesis, nxgenesis, mingenesis as make targets. +# 4) Added more directories to make makedirs actions. +# +# Revision 1.123 2000/05/25 03:11:41 mhucka +# Fixed a comment in the linux section. +# +# Revision 1.122 2000/05/25 03:07:50 mhucka +# 1) Minor clean up of make clean actions. +# 2) Added /usr/include/X11 to list of directories used for make tags +# 3) Added SPRNG_LIB to list of vars passed for make install, so that +# the SPRNG library is installed. +# +# Revision 1.118 2000/04/19 07:34:13 mhucka +# Added a remove of liblist; made the makedirs use -p. +# +# Revision 1.117 1999/12/31 08:30:06 mhucka +# Tons of updates -- more than I can remember. +# +# Revision 1.113 1999/10/13 02:27:02 mhucka +# Added changes for Red Hat 6.0. +# Added changes for SGI IRIX. +# Did major overhaul of comments througout file in an attempt +# to improve clarity and visual impact. +# +# Revision 1.112 1999/08/22 04:42:13 mhucka +# Various fixes, mostly for Red Hat Linux 6.0 +# +# Revision 1.111 1999/08/22 03:22:09 mhucka +# Tiny comment about where one of the Sun Solaris sections ends. +# +# Revision 1.110 1999/05/06 01:03:06 mhucka +# Changed the configuration for SGI IRIX to match what I used to successfully +# compile GENESIS 2.1 under IRIX 6.5.3 using SGI's C compiler version 7.2.1. +# +# Revision 1.109 1999/04/26 03:45:59 mhucka +# Added a section for Solaris 2.x using GCC 2.8.1. This seemed reasonable +# to have in addition to the existing section for Solaris 2.x using the +# SunPro C compiler. +# +# Revision 1.108 1998/08/28 17:11:02 dhb +# Added comments for working around libtermcap.a not in /usr/lib for +# some Linux variants. +# +# DR2-2-P1 +# +# Revision 1.107 1998/07/22 06:03:34 dhb +# Fix for conditional diskio library flags; prevents empty -D +# options on compile lines +# +# Revision 1.106 1998/07/22 05:31:25 dhb +# DR2-2 +# +# Revision 1.105 1998/04/21 22:41:46 dhb +# Support for excluding SPRNG +# +# Revision 1.104 1998/01/20 02:40:31 venkat +# Cleaned up settings for SGI 5.x and 6.x . Used CFLAGS and LINKFLAGS instead of +# crowding up the CC macro. +# +# Revision 1.103 1998/01/20 01:50:31 venkat +# Added the -32 flag to CC for O32 settings on the SGI. +# This is needed on later 6.x systems to explicitly +# compile for 32-bit. +# +# Revision 1.102 1998/01/20 01:38:20 venkat +# Removed extra tab in a blank line. +# +# Revision 1.101 1998/01/20 01:04:19 venkat +# SGI Irix settings changes for 32 and 64-bit executables +# +# Revision 1.100 1998/01/15 01:16:28 venkat +# Added the missing DISKIOSUBDIR macro in the default and nxdefault +# command lines +# +# Revision 1.99 1998/01/14 23:27:40 venkat +# Fixed error in addition of diskio specific flag settings in CFLAGS +# for default and nxdefault targets. +# +# Revision 1.98 1998/01/14 21:52:33 venkat +# diskio library enhancements to include FMT1 support. User can as before +# opt to exclude the diskio library entirely. If included, FMT1 support +# is incorporated by default. netcdf support is optional. +# +# Revision 1.97 1998/01/08 23:54:52 dhb +# Support for SPRNG random number library. User can select +# which of the SPRNG generators is used. All default SPRNG +# generators are compiled and installed. +# +# Revision 1.96 1997/10/03 00:05:11 dhb +# REL2-1-P1 +# +# Revision 1.95 1997/08/12 22:04:39 dhb +# Moved -lcurses from LIBS to LEXLIB to get code_g to link. +# +# Revision 1.94 1997/08/12 19:08:55 dhb +# Additional comments at top to suggest commenting optional libraries +# when having compile problems. +# +# Removed Linux a.out from diskio problem systems. +# +# Added -lcurses for aix compiles. +# +# Revision 1.93 1997/08/11 22:23:55 dhb +# REL2-1 +# +# Revision 1.92 1997/08/08 21:43:15 dhb +# Added comments about requiring bison and flex for 64-bit IRIX +# +# Revision 1.91 1997/08/08 21:39:33 dhb +# Added IRIX 6.x 64-bit settings from Elliot Menschik. +# +# Revision 1.90 1997/08/08 19:30:59 dhb +# DR2-1-P4 +# +# Revision 1.89 1997/08/01 18:54:25 dhb +# Added comments on diskio compile problems for Paragon and T3E. +# +# Revision 1.88 1997/07/31 20:18:19 dhb +# Fix to nxliblist actions so that comments appear in nxliblist +# +# Revision 1.87 1997/07/31 19:16:09 dhb +# DR2-0-P3 +# +# Revision 1.86 1997/07/25 23:36:14 dhb +# Moved addtional oldconn library names to OLDCONNLIB (i.e. +# axon synapse and personal). +# +# Revision 1.85 1997/07/25 01:33:52 dhb +# Added kinetics and diskio as optional libraries +# Added automatic generation of liblist files +# +# Revision 1.84 1997/07/18 19:02:13 dhb +# Support for Cray T3E. +# +# Fix to paragon MACHINE macro setting +# +# Small comment changes +# +# Revision 1.83 1997/07/18 14:41:25 dhb +# Simplified Makefile configuration by creating complete sets of +# macro sets for various systems and compilers. Corresponding +# changes to make instructions. +# +# Revision 1.82 1997/06/30 18:50:21 dhb +# Updated to DR2-1 +# +# Revision 1.81 1997/06/12 23:57:56 dhb +# Removed -traditional from several gcc CFLAGS lines and added +# prominent comment about trying -traditional if a compile fails +# +# Revision 1.80 1997/06/12 23:47:26 dhb +# Added -P to CPP defines in machine specific sections. +# +# Separated CPP define and explanation about finding cpp and +# setting the CPP macro from the main Linux specific settings +# +# Made the all target the default so users can just type "make" +# +# Revision 1.79 1997/06/12 22:37:23 dhb +# Added machine specific section for IRIX 6.x +# +# Revision 1.78 1996/11/01 23:53:15 dhb +# REL2-0-P2 +# +# Revision 1.77 1996/10/28 23:36:16 dhb +# DR2-0-P7 +# +# Added a new target called "nodefault" which is actually the default +# Makefile target. Prints a message that there is no default target +# and to use "make all" instead. +# +# Revision 1.76 1996/10/07 21:25:25 dhb +# DR2-0-P6 +# +# Revision 1.75 1996/10/05 17:49:21 dhb +# Added comments regarding use of ncurses on Linux systems. +# +# Revision 1.74 1996/08/10 22:36:04 dhb +# DR2-0-P5 +# +# Revision 1.73 1996/07/29 23:14:59 dhb +# DR2-0-P4 +# +# Revision 1.72 1996/07/09 06:30:29 dhb +# Added PARSER=yacc as default value of PARSER; avoids empty +# -D compiler argument +# +# Revision 1.71 1996/06/28 22:53:18 dhb +# Additional mods for Paragon. +# +# DR2-0-P3 +# +# Revision 1.70 1996/06/26 18:20:09 venkat +# Added the PARSER macro to identify the parser (yacc / bison) used and passedf +# it along with the COPTS macro to the sub-makes. +# +# Revision 1.69 1996/06/18 07:07:08 dhb +# Support for AR macro. +# +# Revision 1.68 1996/05/24 22:44:38 dhb +# Changed RCSRELEASE to DR2-0-P2 +# +# Revision 1.67 1996/05/23 23:13:55 dhb +# Added -P to default cpp command line. +# +# Removed t3d specific settings for LD and LDFLAGS as these are +# handled in the lower level makefile. +# +# Revision 1.66 1996/05/17 21:14:04 dhb +# T3D changes +# +# Revision 1.65 1995/12/13 23:18:08 dhb +# REL2-0-P2 +# +# Revision 1.64 1995/11/10 23:17:54 dhb +# Updated RCSRELEASE for REL2-0-P1 +# +# Revision 1.63 1995/11/08 00:10:44 dhb +# Added -P option to cpp for hpux. +# +# Revision 1.62 1995/11/04 18:57:24 dhb +# Additional comments for Solaris 2.4 yacc problem +# +# CCTMPDIR is added to the CFLAGS by passing it with the CFLAGS +# macro via COPT macro on the sub make command line. +# +# Revision 1.61 1995/11/03 01:59:37 dhb +# Added TMPDIR macro to allow setting an alternate temp directory +# during the compile. +# +# Added instructions for: +# SunOS 4.1.[234] unresolved X11 symbols problem +# +# Solaris 2.4 yacc problem +# +# Now we pass down LEXLIB on make code_g so we don't hardcode the +# lex library in sys/Makefile. +# +# Revision 1.60 1995/09/27 20:35:05 dhb +# DR2-0-P1 +# +# Revision 1.59 1995/08/09 17:30:56 dhb +# REL2-0 +# +# Revision 1.58 1995/08/05 18:26:58 dhb +# Small changes to flex comments regarding SGIs. +# +# Revision 1.57 1995/08/05 02:35:42 dhb +# BETA2-0-P18 +# +# Revision 1.56 1995/08/03 20:15:30 dhb +# BETA2-0-P17 +# +# Revision 1.55 1995/08/02 01:55:41 dhb +# BETA2-0-P16 +# +# Revision 1.54 1995/07/29 17:50:21 dhb +# Added comments about using flex for SGI machines. +# +# BETA2-0-P15 +# +# Revision 1.53 1995/07/21 19:47:06 dhb +# HPUX changes. Old comments regarding the need for special X11 +# libraries removed. Machine specific settings added. +# +# BETA2-0-P14 +# / +# +# Revision 1.52 1995/07/08 19:28:40 dhb +# Removed X11R3 support as Xodus will no longer compile with +# anything less than X11R4. +# +# BETA2-0-P13 +# +# Revision 1.51 1995/06/24 00:19:01 dhb +# Addition FreeBSD related changes. +# +# Revision 1.50 1995/06/23 23:49:49 venkat +# BETA2-0-P12 +# +# Revision 1.49 1995/06/16 23:35:11 venkat +# BETA2-0-P11 +# +# Revision 1.48 1995/06/16 17:11:27 dhb +# Added support for FreeBSD. +# +# Revision 1.47 1995/06/12 17:16:25 dhb +# BETA2-0-P10 +# +# Revision 1.46 1995/06/03 00:20:12 dhb +# BETA2-0-P9 +# +# Revision 1.45 1995/05/31 01:10:29 dhb +# BETA2-0-P8 +# +# Revision 1.44 1995/05/26 17:01:44 dhb +# Additional comments about XLIB for Linux systems. +# BETA2-0-P7 +# +# Revision 1.43 1995/05/17 21:30:07 dhb +# BETA2-0-P6 +# +# Revision 1.42 1995/05/11 20:41:48 dhb +# Changed install targets to pass RANLIB value down to system makefiles +# as RANLIB_IN. +# +# Revision 1.41 1995/05/08 22:43:03 dhb +# Additional comments for Solaris using gcc. +# BETA2-0-P5 +# +# Revision 1.40 1995/04/29 01:11:24 dhb +# Added handling of YACC, LEX and LEXLIB macros to define the +# yacc and lex programs and the lex libraries respectively. +# +# Revision 1.39 1995/04/28 19:43:38 dhb +# Various system dependent suggestion changes. +# BETA2-0-P4 +# +# Revision 1.38 1995/04/16 01:22:37 dhb +# Modified suggested alpha macro settings to use cc -std0 -DGETOPT_PROBLEM +# which hopefullly will be portable across alpha platforms. +# +# Revision 1.37 1995/04/13 20:55:22 dhb +# Added info about the -DGETOPT_PROBLEM define. +# +# BETA2-0-P3 +# +# Revision 1.36 1995/04/11 23:09:53 dhb +# Removed -lICE and -lSM suggestion for Linux compiles. +# +# Revision 1.35 1995/04/07 22:42:17 dhb +# BETA2-0-P2 +# +# Revision 1.34 1995/04/05 00:55:00 dhb +# Added stuff for MACHINE=aix +# +# Revision 1.33 1995/04/01 17:11:13 dhb +# BETA2-0-P1 +# +# Revision 1.32 1995/03/29 16:45:20 dhb +# BETA2-0 +# +# Revision 1.31 1995/03/28 18:29:38 dhb +# Added CPP macro setting for Solaris SUNPro cc. +# +# Revision 1.30 1995/03/27 18:41:41 dhb +# Added DEC Alpha as an option for MACHINE with compiler +# specific macro settings. +# +# Revision 1.29 1995/03/27 18:23:28 dhb +# Missing backslash in XLIBS macro definition. +# DEVREL2-0-9-P5 +# +# Revision 1.28 1995/03/24 22:00:20 dhb +# - Changed X11 libraries from full path specs to use -L and -l +# - Added additional comments for Linux settings +# - DEVREL2-0-9-P4 +# +# Revision 1.27 1995/03/23 18:31:18 dhb +# Modified suggested macro setting for SGI and Decstation. +# +# Revision 1.26 1995/03/21 21:12:58 dhb +# DEVREL2-0-9-P3 +# +# Revision 1.25 1995/03/02 18:46:16 dhb +# DEVREL2-0-9-P2 +# +# Revision 1.24 1995/02/23 00:15:54 dhb +# Updated to DEVREL2-0-9-P1 +# +# Revision 1.23 1995/02/22 19:04:53 dhb +# Linux support. +# +# Revision 1.22 1995/02/14 01:08:28 dhb +# cleandist now removed convert and X1compat scripts +# +# Revision 1.21 1995/02/11 06:49:12 dhb +# Added convert to the SUBDIRS and NXSUBDIRS. +# +# Revision 1.20 1995/02/11 06:35:15 dhb +# Updated RCSRELEASE to DEVREL2-0-9. +# +# Revision 1.19 1995/01/25 02:24:09 dhb +# Updated for X11R6. +# +# Revision 1.18 1995/01/18 01:49:46 dhb +# 2.0.8 patch 3 update +# +# Revision 1.17 1995/01/14 01:02:46 dhb +# Update to 2.0.8 patch 2 +# +# Revision 1.16 1995/01/09 23:04:55 dhb +# Made the default XINCLUDE directory . instead of nothing. Some +# compilers will complain if given an empty -I option. +# +# Revision 1.15 1995/01/09 19:34:38 dhb +# RCSRELEASE macro change in 1.14 was wrong. +# +# Revision 1.14 1995/01/09 18:31:11 dhb +# Changed inconsistent instructions at end of user changable part of +# Makefile. +# +# Updated RCSRELEASE macro to reflect current release. +# +# Revision 1.13 1994/12/21 00:36:05 dhb +# Moved RCS log information to the end of the file. +# +# Revision 1.12 1994/12/20 23:23:26 dhb +# Added all, nxall and minall targets and updated instructions in +# Makefile to use the all targets. +# +# Revision 1.11 1994/12/06 01:45:40 dhb +# Added the XINCLUDE macro +# +# Revision 1.10 1994/09/23 17:09:28 dhb +# Added a 'make code_g' to the users instruction comments. +# +# Revision 1.9 1994/09/23 16:22:04 dhb +# Changes for move of connections out of main libraries into oldconn. +# +# Revision 1.8 1994/04/14 14:51:50 dhb +# Now passes RANLIB macro down in install targets +# +# Revision 1.7 1994/04/13 20:07:39 dhb +# Changed the makefile comments for compiler dependent options +# +# Revision 1.6 1994/04/04 21:25:45 dhb +# Added RANLIB macro to handle systems without ranlib. +# +# Moved compiler depended macro settings to src/Makefile. +# +# Revision 1.5 1994/03/23 00:23:11 dhb +# Changes for Xodus version 2 and the newconn library. +# +# Revision 1.4 1994/03/22 23:56:31 dhb +# Changed codeg target to code_g (the actual program name). +# +# Revision 1.3 1994/03/21 18:25:36 dhb +# Changes to make code_g program +# +# Revision 1.2 1993/10/19 18:53:27 dhb +# RCS changes and libsh --> ./libsh +# diff -Naur genesis-orig/src/Makefile.MacOSXDarwin genesis-mosx/src/Makefile.MacOSXDarwin --- genesis-orig/src/Makefile.MacOSXDarwin Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/Makefile.MacOSXDarwin Thu Apr 4 23:41:43 2002 @@ -0,0 +1,143 @@ +# $Id: Makefile.MacOSXDarwin,v 1.1 2001/05/10 16:09:13 mhucka Exp $ +# +# GENESIS/XODUS : network simulator +# +# Make tree altered June 1991 +# Last altered 2001-05-10 8:59 PDT +# +# YOU MUST NOT EDIT THIS MAKEFILE TO CONFIGURE GENESIS! +# All configuration is in the file Makefile. +# +# $Log: Makefile.MacOSXDarwin,v $ +# Revision 1.1 2001/05/10 16:09:13 mhucka +# First version of PPC support, based on work by Alfonso Delgado-Reyes. +# +# + +MACHINE = MacOSXDarwin +OS = $(OS_IN) +CC = $(CC_IN) +CPP = $(CPP_IN) +LD = $(LD_IN) +LDFLAGS = $(LDFLAGS_IN) +AR = $(AR_IN) +RANLIB = @echo no ranlib for +CFLAGS = $(COPT) +LLIBS = $(LIBS) $(EXTRALIBS) + +YACC = $(YACC_IN) +LEX = $(LEX_IN) +LEXLIB = $(LEXLIB_IN) + +GENESIS = $(BASECODE) \ + $(OBJLIBS) \ + loadlib.o + +NXGENESIS = $(BASECODE) \ + $(OBJLIBS) \ + nxloadlib.o + +MINGENESIS = $(BASECODE) \ + minloadlib.o + +FULLDIR = startup $(SUBDIR) +NXDIR = startup $(NXSUBDIR) +MINDIR = startup $(MINSUBDIR) + +# ========================================================================= + +default: + @echo "This is not the top level makefile" + +nxdefault: + @echo "This is not the top level makefile" + +mindefault: + @echo "This is not the top level makefile" + +genesis: libs $(GENESIS) $(XODUS) + $(CC) $(CFLAGS) $(LDFLAGS) -flat_namespace \ + $(GENESIS) $(XODUS) $(XLIBS) $(LLIBS) -o genesis + @echo "Full GENESIS Compiled -- All Done" + +nxgenesis: nxlibs $(NXGENESIS) + $(CC) $(CFLAGS) $(LDFLAGS) $(NXGENESIS) $(LLIBS) -flat_namespace -o nxgenesis + @echo "Non-X GENESIS Compiled -- All Done" + +mingenesis: minlibs $(MINGENESIS) + $(CC) $(CFLAGS) $(LDFLAGS) $(MINGENESIS) $(LLIBS) -flat_namespace -o mingenesis + @echo "Minimal GENESIS Compiled -- All Done" + +code_g: + @(echo cd sys; cd sys; make CC="$(CC)" LD="$(LD)" CPP="$(CPP)" TMPDIR="$(TMPDIR)" LDFLAGS="$(LDFLAGS)" OS="$(OS)" MACHINE="$(MACHINE)" INSTALL="$(INSTALL)" COPT="$(CFLAGS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" RCSRELEASE="$(RCSRELEASE)"; cd ..) + @(echo cd ss; cd ss; make CC="$(CC)" LD="$(LD)" CPP="$(CPP)" YACC="$(YACC)" LEX="$(LEX)" LEXLIB="$(LEXLIB)" TMPDIR="$(TMPDIR)" LDFLAGS="$(LDFLAGS)" OS="$(OS)" MACHINE="$(MACHINE)" INSTALL="$(INSTALL)" COPT="$(CFLAGS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" RCSRELEASE="$(RCSRELEASE)"; cd ..) + @(echo cd shell; cd shell; make CC="$(CC)" LD="$(LD)" CPP="$(CPP)" TMPDIR="$(TMPDIR)" LDFLAGS="$(LDFLAGS)" OS="$(OS)" MACHINE="$(MACHINE)" INSTALL="$(INSTALL)" COPT="$(CFLAGS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" RCSRELEASE="$(RCSRELEASE)" code_g; cd ..) + @(echo cd sys; cd sys; make CC="$(CC)" LD="$(LD)" CPP="$(CPP)" TMPDIR="$(TMPDIR)" LEXLIB="$(LEXLIB)" LDFLAGS="$(LDFLAGS)" OS="$(OS)" MACHINE="$(MACHINE)" INSTALL="$(INSTALL)" COPT="$(CFLAGS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)" RCSRELEASE="$(RCSRELEASE)" code_g; cd ..) + @echo "code_g Compiled" + +libs: + @(for i in $(SUBDIR); do echo cd $$i; cd $$i; make CC="$(CC)" LD="$(LD)" AR="$(AR)" RANLIB="$(RANLIB)" CPP="$(CPP)" YACC="$(YACC)" LEX="$(LEX)" LEXLIB="$(LEXLIB)" TMPDIR="$(TMPDIR)" LDFLAGS="$(LDFLAGS)" OS="$(OS)" MACHINE="$(MACHINE)" DISKIOSUBDIR="$(DISKIOSUBDIR)" INSTALL="$(INSTALL)" COPT="$(CFLAGS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)"; cd ..;done) + @echo "All Libs Compiled" + +nxlibs: + @(for i in $(NXSUBDIR); do echo cd $$i; cd $$i; make CC="$(CC)" LD="$(LD)" YACC="$(YACC)" LEX="$(LEX)" LEXLIB="$(LEXLIB)" TMPDIR="$(TMPDIR)" LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" AR="$(AR)" RANLIB="$(RANLIB)" OS="$(OS)" MACHINE="$(MACHINE)" INSTALL="$(INSTALL)" DISKIOSUBDIR="$(DISKIOSUBDIR)" COPT="$(CFLAGS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)"; cd ..;done) + @echo "Non-X Libs Compiled" + +minlibs: + @(for i in $(MINSUBDIR); do echo cd $$i; cd $$i; make CC="$(CC)" LD="$(LD)" YACC="$(YACC)" LEX="$(LEX)" LEXLIB="$(LEXLIB)" TMPDIR="$(TMPDIR)" LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" AR="$(AR)" RANLIB="$(RANLIB)" OS="$(OS)" MACHINE="$(MACHINE)" INSTALL="$(INSTALL)" COPT="$(CFLAGS)" TERMCAP="$(TERMCAP)" TERMOPT="$(TERMOPT)"; cd ..;done) + @echo "Minimal Libs Compiled" + +.c.o: + $(CC) $(CFLAGS) -D$(MACHINE) -c $(SIMINCLUDE) $< + +loadlib.c: liblist + ./libsh < liblist > loadlib.c + +nxloadlib.c: nxliblist + ./libsh < nxliblist > nxloadlib.c + +minloadlib.c: minliblist + ./libsh < minliblist > minloadlib.c + +cleandist: + @echo "You must run cleandist from the toplevel makefile" + +clean: + @(for i in $(SUBDIR); do echo cd $$i; cd $$i; make DISKIOSUBDIR="$(DISKIOSUBDIR)" MACHINE="$(MACHINE)" SPRNG_LIB="$(SPRNG_LIB)" clean; cd ..;done) + -rm -rf genesis loadlib.o loadlib.c + -rm -rf nxgenesis nxloadlib.o nxloadlib.c + -rm -rf mingenesis minloadlib.o minloadlib.c + @echo "Done with Cleaning" + +copydirs: + @(if /usr/bin/test ! ../Scripts -ef $(INSTALL)/Scripts ; then \ + echo "Copying Scripts directory to $(INSTALL) ..."; \ + cp -rp ../Scripts $(INSTALL); \ + fi) + @(if /usr/bin/test ! ../Doc -ef $(INSTALL)/Doc ; then \ + echo "Copying Doc directory to $(INSTALL) ..."; \ + cp -rp ../Doc $(INSTALL); \ + fi) + @(if /usr/bin/test ! ../Hyperdoc -ef $(INSTALL)/Hyperdoc ; then \ + echo "Copying Hyperdoc directory to $(INSTALL) ..."; \ + cp -rp ../Hyperdoc $(INSTALL); \ + fi) + @(if /usr/bin/test ! ../src -ef $(INSTALL)/src ; then \ + echo "Copying src directory to $(INSTALL) ..."; \ + cp -rp ../src $(INSTALL); \ + fi) + +install: copydirs + @(for i in $(FULLDIR); do echo cd $$i; cd $$i; make MACHINE=$(MACHINE) DISKIOSUBDIR="$(DISKIOSUBDIR)" INSTALL=$(INSTALL) INSTALLBIN=$(INSTALLBIN) RANLIB="$(RANLIB)" install; cd ..;done) + @cp genesis $(INSTALL) + @echo "Done with full install" + +nxinstall: copydirs + @(for i in $(NXDIR); do echo cd $$i; cd $$i; make MACHINE=$(MACHINE) DISKIOSUBDIR="$(DISKIOSUBDIR)" INSTALL=$(INSTALL) INSTALLBIN=$(INSTALLBIN) RANLIB="$(RANLIB)" install; cd ..;done) + -cp nxgenesis $(INSTALL) + @echo "Done with non-X install" + +mininstall: copydirs + @(for i in $(MINDIR); do echo cd $$i; cd $$i; make MACHINE=$(MACHINE) INSTALL=$(INSTALL) INSTALLBIN=$(INSTALLBIN) RANLIB="$(RANLIB)" install; cd ..;done) + -cp mingenesis $(INSTALL) + @echo "Done with minimal install" diff -Naur genesis-orig/src/Makefile.dist genesis-mosx/src/Makefile.dist --- genesis-orig/src/Makefile.dist Sun Jul 22 13:53:18 2001 +++ genesis-mosx/src/Makefile.dist Wed Apr 24 02:40:57 2002 @@ -151,6 +151,7 @@ # As of June, 2001, the GENESIS developers have not successfully # built the SPRNG libraries under SunOS 4.1. If you are running # SunOS 4.1, you should disable compiling of SPRNG. +# -- The above also applies to MacOSX and Darwin. # # If you are compiling on a 64-bit SGI, change "lfg" to "lcg64" below. @@ -945,6 +946,44 @@ # end Linux 2.x and up on PPC-based systems (LinuxPPC) +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +# System: MacOS X and Darwin (PPC-based systems) +# Compiler: Apple Computer, Inc. v.gcc-932.1, based on gcc v.2.95.2 +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +## This configuration was provided by a GENESIS user, Alfonso +## Delgado-Reyes. Please make sure that you have up-to-date and +## complete installations of flex and bison if you are using this +## configuration. If you don not have bison grab it from: +## http://www.ibiblio.org/pub/gnu/bison/ + +# MACHINE=MacOSXDarwin +# OS=BSD + +# XINCLUDE=/usr/X11R6/include +# XLIB=/usr/X11R6/lib + +# CC=cc +# CPP=/usr/libexec/gcc/darwin/`/usr/bin/arch`/default/cpp -E -P -traditional -D__STDC__ +# CFLAGS=-I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN + +# LD=ld +# LDFLAGS= + +# RANLIB=ranlib +# AR=ar + +# YACC=bison -y +# PARSER=bison + +# LEX=lex +# LEXLIB=-ll +# LIBS= $(LEXLIB) + +# TERMCAP=-lcurses +# TERMOPT=-DTERMIO -DDONT_USE_SIGIO + +# end MacOS X and Darwin (PPC-based systems) # ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ # System: FreeBSD 4.1 @@ -1413,8 +1452,11 @@ -(rm -rf $(INSTALL)/.*simrc) -(rm -f $(INSTALLBIN)/convert) -(rm -f TAGS) - -(rm -f `find . -name '*~'`) + -(find . -name '*~' -exec rm -f {} ';') @echo "Done with full clean" + +# -(rm -f `find . -name '*~'`) +# @echo "Done with full clean" clean: @make -f $(MF) MF="$(MF)" DISKIOSUBDIR="$(DISKIOSUBDIR)" SUBDIR="$(SUBDIR)" RCSRELEASE="$(RCSRELEASE)" SPRNG_LIB="$(SPRNG_LIB)" clean diff -Naur genesis-orig/src/README genesis-mosx/src/README --- genesis-orig/src/README Mon Jul 23 05:54:36 2001 +++ genesis-mosx/src/README Wed Apr 24 02:19:53 2002 @@ -7,15 +7,15 @@ You must be running X11R5 or X11R6 on a Sun SPARC (SunOS 4.x or Solaris 2.x), Linux on an Intel x86 PC (Linux, FreeBSD), SGI (IRIX 4.x, 5.x or 6.x) or IBM SP2. Users have also successfully compiled GENESIS on Macintoshes -running LinuxPPC, but our experience with this platform is limited. We -welcome feedback on experiences with these platforms. Other platforms may -be capable of running GENESIS, but the software has not been tested by -Caltech outside of these environments. We offer no guarantees on hardware -or operating systems outside of these parameters! Note that all of our -code has been built using X11 from MIT. In testing, GENESIS 2.x compiled -and ran under the vendor supplied X11 products. Should you encounter -problems with a vendor's X11 product, we suggest you obtain the MIT -distribution and install the libraries (it is free). +running LinuxPPC and MacOS X/Darwin, but our experience with this platform +is limited. We welcome feedback on experiences with these platforms. +Other platforms may be capable of running GENESIS, but the software has +not been tested by Caltech outside of these environments. We offer no +guarantees on hardware or operating systems outside of these parameters! +Note that all of our code has been built using X11 from MIT. In testing, +GENESIS 2.x compiled and ran under the vendor supplied X11 products. +Should you encounter problems with a vendor's X11 product, we suggest you +the MIT distribution and install the libraries (it is free). The GENESIS distribution may be installed in whatever directory is most convenient. The distributed compressed tar file unpacks to produce the @@ -90,7 +90,7 @@ BUILDING THE DISTRIBUTION: From the src directory type: - + (if you are using MacOS X/Darwin: limit stacksize 4096) make clean make > & ! make.out & (or for the Bourne shell: make all > make.out 2>&1 & ) diff -Naur genesis-orig/src/Xodus/Draw/Gif.c genesis-mosx/src/Xodus/Draw/Gif.c --- genesis-orig/src/Xodus/Draw/Gif.c Fri Jun 29 16:59:07 2001 +++ genesis-mosx/src/Xodus/Draw/Gif.c Thu Apr 4 21:38:52 2002 @@ -246,7 +246,7 @@ GifObject gw = (GifObject) w; if (XtIsRealized(w) && gw->gif.image) { - XPutImage(XgDisplay(), XtWindow(gw->object.parent), + XPutImage((Display *)XgDisplay(), XtWindow(gw->object.parent), gw->pix.gc, gw->gif.image, /* src coords */ gw->gif.srcx, gw->gif.srcy, diff -Naur genesis-orig/src/Xodus/Draw/Shape.c genesis-mosx/src/Xodus/Draw/Shape.c --- genesis-orig/src/Xodus/Draw/Shape.c Fri Jun 29 16:59:07 2001 +++ genesis-mosx/src/Xodus/Draw/Shape.c Thu Apr 4 21:36:27 2002 @@ -280,7 +280,7 @@ shape->shape.textmode != TEXTNODRAW) shape->shape.textmode = TEXTDRAW; - shape->shape.textcolor = XBlackPixel(XgDisplay(),0); + shape->shape.textcolor = XBlackPixel((Display *)XgDisplay(),0); shape->pix.gc=NULL; ResetGC(shape); diff -Naur genesis-orig/src/Xodus/Draw/Tree.c genesis-mosx/src/Xodus/Draw/Tree.c --- genesis-orig/src/Xodus/Draw/Tree.c Fri Jun 29 16:59:07 2001 +++ genesis-mosx/src/Xodus/Draw/Tree.c Thu Apr 4 21:38:18 2002 @@ -302,7 +302,7 @@ /* Check that the initial values are reasonable */ tree->tree.treemode = XoTreeTreeMode; - tree->tree.textcolor = XBlackPixel(XgDisplay(),0); + tree->tree.textcolor = XBlackPixel((Display *)XgDisplay(),0); tree->pix.gc=XCreateGC(disp,d,mask,&values); mask = GCForeground; diff -Naur genesis-orig/src/Xodus/Draw/Var.c genesis-mosx/src/Xodus/Draw/Var.c --- genesis-orig/src/Xodus/Draw/Var.c Fri Jun 29 16:59:07 2001 +++ genesis-mosx/src/Xodus/Draw/Var.c Thu Apr 4 21:37:40 2002 @@ -250,7 +250,7 @@ /* Check that the initial values are reasonable */ var->var.varmode = XoVarShapeMode; - var->var.textcolor = XBlackPixel(XgDisplay(),0); + var->var.textcolor = XBlackPixel((Display *)XgDisplay(),0); var->pix.gc=XCreateGC(disp,d,mask,&values); mask = GCForeground; diff -Naur genesis-orig/src/Xodus/Draw/View.c genesis-mosx/src/Xodus/Draw/View.c --- genesis-orig/src/Xodus/Draw/View.c Fri Jun 29 16:59:07 2001 +++ genesis-mosx/src/Xodus/Draw/View.c Thu Apr 4 23:38:02 2002 @@ -276,7 +276,7 @@ /* Check that the initial values are reasonable */ view->view.viewmode = XoVarShapeMode; - view->view.textcolor = XBlackPixel(XgDisplay(),0); + view->view.textcolor = XBlackPixel((Display *)XgDisplay(),0); view->pix.gc=XCreateGC(disp,d,mask,&values); mask = GCForeground; diff -Naur genesis-orig/src/Xodus/Draw/XodusMacOSXDarwinMakefile genesis-mosx/src/Xodus/Draw/XodusMacOSXDarwinMakefile --- genesis-orig/src/Xodus/Draw/XodusMacOSXDarwinMakefile Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/Xodus/Draw/XodusMacOSXDarwinMakefile Thu Apr 4 23:14:04 2002 @@ -0,0 +1,88 @@ +# $Id: Makefile,v 1.11 2000/07/03 18:09:55 mhucka Exp $ +# $Log: Makefile,v $ +# Revision 1.11 2000/07/03 18:09:55 mhucka +# Removed RCS directives and added c flag to ar command invocation. +# +# Revision 1.10 1999/11/29 07:50:08 mhucka +# Removed needless subshell () wrappers and performed other related cleanup. +# +# Revision 1.9 1996/06/18 06:51:56 dhb +# Removed redundant define for CC macro which causes recursive +# macro definition errors on some machines. +# +# Revision 1.8 1996/06/06 23:03:35 dhb +# New use AR macro for archiving command. +# +# Revision 1.7 1995/07/17 20:44:54 dhb +# Added DrawUtil.o to OBJS line. +# +# Revision 1.6 1995/02/13 21:16:25 dhb +# Removed checkout of RCSRELEASE verions. +# +# Revision 1.5 1995/01/09 23:38:44 dhb +# Commented nonportable COMPILE.c macro and added CPPFLAGS to CFLAGS. +# +# Revision 1.4 1994/12/19 22:22:01 dhb +# Added rules for RCS subdirectory. +# +# Revision 1.3 1994/12/06 02:03:23 dhb +# Added install target and ranlib handling. +# +# Revision 1.2 1994/12/06 00:17:22 dhb +# Nov 8 1994 changes from Upi Bhalla +# +# Revision 1.1.1.4 1994/04/11 22:30:14 dhb +# Missing some include dirs on RCS checkout actions +# +# Revision 1.1.1.3 1994/04/11 21:22:02 dhb +# Needed tabs on RCS checkout actions +# +# Revision 1.1.1.2 1994/04/11 21:14:14 dhb +# Added RCS checkout rules +# +# Revision 1.1.1.1 1994/04/11 17:36:01 dhb +# Update from Dave Bilitch +# +CPPFLAGS = -I.. +#CFLAGS = -g -temp=../temp +CFLAGS = $(TOPFLAGS) $(CPPFLAGS) +LIBS = -lXt -lXext -lX11 -lm -ldl -lw +#COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c + +WIDGETS = \ + CoreDraw.o \ + DumbDraw.o \ + Graph.o \ + Draw.o \ + Pix.o \ + Sphere.o \ + Shape.o \ + Plot.o \ + Axis.o \ + Cell.o \ + Var.o \ + View.o \ + Tree.o \ + Gif.o +OBJS = $(WIDGETS) DrawUtil.o + +.SUFFIXES: .c,v .c .h,v .h + +.h,v.h: + co $*.h + +.c,v.o: + co $*.c + cc -c $(CFLAGS) $(CPPFLAGS) $*.c + rm -f $*.c + +libDraw.a: $(OBJS) + $(AR) rc libDraw.a $(OBJS) + ranlib libDraw.a + +clean: + -rm -f *.[oa] + +install: + cp libDraw.a $(INSTALL)/lib + ranlib $(INSTALL)/lib/libDraw.a diff -Naur genesis-orig/src/Xodus/Makefile genesis-mosx/src/Xodus/Makefile --- genesis-orig/src/Xodus/Makefile Fri Jun 29 16:59:06 2001 +++ genesis-mosx/src/Xodus/Makefile Tue Apr 9 04:12:44 2002 @@ -19,19 +19,29 @@ ./Xo/libXo.a \ ./Widg/libWidg.a \ ./Draw/libDraw.a -INSTALL_DIR = $(INSTALL) -DISPLIB = $(INSTALL)/src/Xodus -XODUS_DIR = \ - ./xo \ - ./widg \ - ./draw +INSTALL_DIR = $(INSTALL) +DISPLIB = $(INSTALL)/src/Xodus + +ifeq (,$(findstring MacOSXDarwin, $(MAKEFLAGS))) +WIDGET_DIR = \ + ./Xo \ + ./Widg \ + ./Draw + +XODUS_DIR = $(WIDGET_DIR) +XODUSMKF = Xodus$(MACHINE)Makefile +else +XODUS_DIR = \ + ./xo \ + ./widg \ + ./draw WIDGET_DIR = \ ./Xo \ ./Widg \ ./Draw - +endif ################################################################### # nothing beyond this point should have to be modified by the user @@ -41,9 +51,12 @@ #========================================================================== default: displibs xolibs - xolibs: +ifeq (,$(findstring MacOSXDarwin, $(MAKEFLAGS))) + @(echo making the Xodus widget library; for i in $(WIDGET_DIR); do echo cd $$i; cd $$i; make -f $(XODUSMKF) MACHINE=$(MACHINE) XVERSION=$(XVERSION) INSTALL=$(INSTALL_DIR) CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" CPP="$(CPP)" DEC_HACK="$(DEC_HACK)" TOPFLAGS="$(CFLAGS)"; cd ..;done) +else @(echo making the Xodus widget library; for i in $(WIDGET_DIR); do echo cd $$i; cd $$i; make MACHINE=$(MACHINE) XVERSION=$(XVERSION) INSTALL=$(INSTALL_DIR) CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" CPP="$(CPP)" DEC_HACK="$(DEC_HACK)" TOPFLAGS="$(CFLAGS)"; cd ..;done) +endif displibs: @(for i in $(XODUS_DIR); do echo cd $$i; cd $$i; make MACHINE=$(MACHINE) XVERSION=$(XVERSION) INSTALL=$(INSTALL_DIR) CC="$(CC)" LIBEXT="$(LIBEXT)" LIBBUILD="$(LIBBUILD)" LIBBUILDFLAGS="$(LIBBUILDFLAGS)" LIBORDER="$(LIBORDER)" TMPDIR="$(TMPDIR)" CPP="$(CPP)" DEC_HACK="$(DEC_HACK)" TOPFLAGS="$(CFLAGS)"; cd ..;done) @@ -52,4 +65,9 @@ @(for i in $(XODUS_DIR) $(WIDGET_DIR) ; do echo cd $$i; cd $$i; make clean; cd ..;done) install: +ifeq (,$(findstring MacOSXDarwin, $(MAKEFLAGS))) + @(for i in $(XODUS_DIR) $(WIDGET_DIR) ; do echo cd $$i; cd $$i; make MACHINE=$(MACHINE) XVERSION=$(XVERSION) INSTALL=$(INSTALL_DIR) LIBORDER="$(LIBORDER)" LIBEXT="$(LIBEXT)" RANLIB="$(RANLIB)" DEC_HACK="$(DEC_HACK)" install; cd ..;done) + @(for i in $(XODUS_DIR) $(WIDGET_DIR) ; do echo cd $$i; cd $$i; make -f $(XODUSMKF) MACHINE=$(MACHINE) XVERSION=$(XVERSION) INSTALL=$(INSTALL_DIR) LIBORDER="$(LIBORDER)" LIBEXT="$(LIBEXT)" RANLIB="$(RANLIB)" DEC_HACK="$(DEC_HACK)" install; cd ..;done) +else @(for i in $(XODUS_DIR) $(WIDGET_DIR) ; do echo cd $$i; cd $$i; make MACHINE=$(MACHINE) XVERSION=$(XVERSION) INSTALL=$(INSTALL_DIR) LIBORDER="$(LIBORDER)" LIBEXT="$(LIBEXT)" RANLIB="$(RANLIB)" DEC_HACK="$(DEC_HACK)" install; cd ..;done) +endif diff -Naur genesis-orig/src/Xodus/Widg/XodusMacOSXDarwinMakefile genesis-mosx/src/Xodus/Widg/XodusMacOSXDarwinMakefile --- genesis-orig/src/Xodus/Widg/XodusMacOSXDarwinMakefile Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/Xodus/Widg/XodusMacOSXDarwinMakefile Thu Apr 4 23:15:25 2002 @@ -0,0 +1,139 @@ +# $Id: Makefile,v 1.15 2000/09/21 19:22:02 mhucka Exp $ +# $Log: Makefile,v $ +# Revision 1.15 2000/09/21 19:22:02 mhucka +# Added a public-domain implementation of alloca() for those systems +# like AIX that don't seem to provide one. +# +# Revision 1.14 2000/07/03 18:09:56 mhucka +# Removed RCS directives and added c flag to ar command invocation. +# +# Revision 1.13 2000/05/19 18:20:56 mhucka +# 1) Some reformatting for consistency with other GENESIS makefiles. +# 2) Added files for new xgifload. +# +# Revision 1.12 1999/11/29 07:50:09 mhucka +# Removed needless subshell () wrappers and performed other related cleanup. +# +# Revision 1.11 1998/07/15 06:18:07 dhb +# Upi update +# +# Revision 1.10 1996/06/18 06:53:22 dhb +# Removed explicit setting of CC macro which was probably benign +# since CC is set on the make command line taking precedence over +# the Makefile setting. +# +# Revision 1.9 1996/06/06 23:05:36 dhb +# Now use AR macro for archive command. +# +# Revision 1.8 1995/06/16 05:55:37 dhb +# Moved comment character commenting lines of the HEADERS macro +# to the first character of the line. This is required for some +# versions of make. +# +# Revision 1.7 1995/03/17 23:11:39 venkat +# Included XoComposit.o to the list of OBJS +# +# Revision 1.6 1995/02/22 01:37:23 venkat +# Added XoCore.o to the list of OBJS +# +# Revision 1.5 1995/02/13 21:21:10 dhb +# Removed checkout of RCSRELEASE versions. +# +# Revision 1.4 1995/01/09 23:40:06 dhb +# Commented nonportable COMPILE.c macro and added CPPFLAGS to CFLAGS. +# +# Revision 1.3 1994/12/19 22:22:39 dhb +# Added rules for RCS subdirectory. +# +# Revision 1.2 1994/12/06 02:04:49 dhb +# Added install target and ranlib handling. +# +# Revision 1.1 1994/12/06 00:15:26 dhb +# Initial revision +# +# Revision 1.4 1994/04/11 23:16:50 dhb +# Missing tab at beginning of RCS checkout actions +# +# Revision 1.3 1994/04/11 22:30:47 dhb +# Missing some include dirs on RCS checkout actions +# +# Revision 1.2 1994/04/11 21:15:04 dhb +# Added RCS checkout rules +# +# Revision 1.1 1994/04/11 17:42:49 dhb +# Initial revision +# + +CPPFLAGS = -I.. +CFLAGS = $(TOPFLAGS) $(CPPFLAGS) -I../../shell -I../../sys +LIBS = -lXt -lXext -lX11 +# COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c + +WIDGETS = \ + Label.o \ + Frame.o \ + Framed.o \ + XoCore.o \ + XoComposit.o \ + Form.o \ + Button.o \ + Text.o \ + Dialog.o \ + Image.o \ + xgifload.o \ + dgif_lib.o \ + gif_io.o \ + alloca.o \ + FastPlot.o + +OBJS = $(WIDGETS) \ + FormLayout.o + +#Label.o: LabelP.h Label.h +#Frame.o: FrameP.h Frame.h +#Framed.o: Framed.h FramedP.h +#Form.o: Form.h FormP.h +#Button.o: Button.h ButtonP.h +#Text.o: Text.h TextP.h +#Dialog.o: Dialog.h DialogP.h +#Image.o: Image.h ImageP.h +# +#HEADERS = \ +# ../Xo/XoDefs.h \ +# LabelP.h Label.h \ +# FrameP.h Frame.h \ +# Framed.h FramedP.h \ +# Form.h FormP.h \ +# Button.h ButtonP.h \ +# Text.h TextP.h \ +# Dialog.h DialogP.h \ +# Image.h ImageP.h + +#$(OBJS): ../Xo/XoDefs.h + +# I have to force a compile here every time a header is changed +#.c.o: +# $(CC) $(CFLAGS) $(CPPFLAGS) $< -c + +.SUFFIXES: .c,v .c .h,v .h + +.h,v.h: + co $*.h + +.c,v.o: + co $*.c + cc -c $(CFLAGS) $(CPPFLAGS) $*.c + rm -f $*.c + +libWidg.a: $(OBJS) $(HEADERS) + $(AR) rc libWidg.a $(OBJS) + ranlib libWidg.a + +XoFormLayout.o: Form.h + +clean: + -rm -f *.[oa] + +install: + cp libWidg.a $(INSTALL)/lib + ranlib $(INSTALL)/lib/libWidg.a diff -Naur genesis-orig/src/Xodus/Widg/xform.c genesis-mosx/src/Xodus/Widg/xform.c --- genesis-orig/src/Xodus/Widg/xform.c Fri Jun 29 16:59:16 2001 +++ genesis-mosx/src/Xodus/Widg/xform.c Wed Apr 3 00:21:24 2002 @@ -380,7 +380,7 @@ if (!(xoIsNestedForm(form) && form->nested)) { XoXtVaSetValues((Widget)form->shell, XtNtitle, form->title, NULL); - XSetIconName(XgDisplay(),XtWindow((Widget) form->shell),form->name); + XSetIconName((Display *)XgDisplay(),XtWindow((Widget) form->shell),form->name); /* This ugly stuff is here for archaic window managers like twm */ XoWMPositionHack((Widget)form->shell,(Position)atoi(form->xgeom),(Position)atoi(form->ygeom)); } diff -Naur genesis-orig/src/Xodus/Widg/xgifload.c genesis-mosx/src/Xodus/Widg/xgifload.c --- genesis-orig/src/Xodus/Widg/xgifload.c Fri Jun 29 16:59:10 2001 +++ genesis-mosx/src/Xodus/Widg/xgifload.c Thu Apr 4 21:40:53 2002 @@ -975,8 +975,8 @@ char cp[4]; } conv; - disp = XgDisplay(); - vis = XoGetUsedVisual(); + disp = (Display *)XgDisplay(); + vis = (Visual *)XoGetUsedVisual(); cmap = XoGetUsedColormap(); depth = XoGetUsedDepth(); diff -Naur genesis-orig/src/Xodus/Xo/TopLevel.c genesis-mosx/src/Xodus/Xo/TopLevel.c --- genesis-orig/src/Xodus/Xo/TopLevel.c Fri Jun 29 17:10:03 2001 +++ genesis-mosx/src/Xodus/Xo/TopLevel.c Thu Apr 4 21:33:09 2002 @@ -123,7 +123,7 @@ */ new->shell = XtVaAppCreateShell("genesis", "Genesis", topLevelShellWidgetClass, - XgDisplay(), + (Display *)XgDisplay(), XtNmappedWhenManaged, False, XtNallowShellResize, True, XtNinput, True, @@ -161,6 +161,6 @@ hints.flags = USPosition; hints.x = xpos; hints.y = ypos; - XSetSizeHints(XgDisplay(),XtWindow(toplevelshell),&hints, + XSetSizeHints((Display *)XgDisplay(),XtWindow(toplevelshell),&hints, XA_WM_NORMAL_HINTS); } diff -Naur genesis-orig/src/Xodus/Xo/XodusMacOSXDarwinMakefile genesis-mosx/src/Xodus/Xo/XodusMacOSXDarwinMakefile --- genesis-orig/src/Xodus/Xo/XodusMacOSXDarwinMakefile Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/Xodus/Xo/XodusMacOSXDarwinMakefile Thu Apr 4 23:16:41 2002 @@ -0,0 +1,85 @@ +# $Id: Makefile,v 1.10 2000/07/03 18:09:56 mhucka Exp $ +# $Log: Makefile,v $ +# Revision 1.10 2000/07/03 18:09:56 mhucka +# Removed RCS directives and added c flag to ar command invocation. +# +# Revision 1.9 1999/11/29 07:50:09 mhucka +# Removed needless subshell () wrappers and performed other related cleanup. +# +# Revision 1.8 1996/06/18 06:46:15 dhb +# Removed redundant define for CC macro which on some systems +# was causing a recursive macro definition error. +# +# Revision 1.7 1996/06/06 23:06:29 dhb +# Now use AR macro for archive command. +# +# Revision 1.6 1995/02/13 21:17:42 dhb +# Removed checkout of RCSRELEASE versions. +# +# Revision 1.5 1995/01/09 23:36:25 dhb +# Commented the COMPILE.c macro and added the CPPFLAGS to the CFLAGS +# line. Appears the COMPILE.c is not portable. +# +# Revision 1.4 1994/12/19 22:23:32 dhb +# Added rules for RCS subdirectory. +# +# Revision 1.3 1994/12/06 01:59:22 dhb +# Added install target and support for ranlib. +# +# Revision 1.2 1994/12/06 00:09:49 dhb +# Nov 8 1994 changes from Upi Bhalla +# +# Revision 1.1.1.4 1994/04/11 22:29:21 dhb +# Missing some include dirs on RCS checkout actions +# +# Revision 1.1.1.3 1994/04/11 21:28:28 dhb +# Needed tabs on RCS checkout actions +# +# Revision 1.1.1.2 1994/04/11 21:15:38 dhb +# Added RCS checkout rules +# +# Revision 1.1.1.1 1994/04/11 17:44:07 dhb +# Update from Dave Bilitch. +# +# Revision 1.1 1994/01/13 18:34:14 bhalla +# Initial revision +# + +CPPFLAGS = -I.. +CFLAGS = $(TOPFLAGS) $(CPPFLAGS) +LIBS = -lXt -lXext -lX11 +#COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c + +OBJS = \ + Initialize.o \ + Error.o \ + TopLevel.o \ + XoGeometry.o \ + XoUtil.o \ + XoChildRes.o \ + XoArgLists.o \ + XoDraw.o \ + XoColor.o \ + XoCursor.o \ + XoPS.o + +.SUFFIXES: .c,v .c .h,v .h + +.h,v.h: + co $*.h + +.c,v.o: + co $*.c + cc -c $(CFLAGS) $(CPPFLAGS) $(SIMINCLUDE) $*.c + rm -f $*.c + +libXo.a: $(OBJS) + $(AR) rc libXo.a $(OBJS) + ranlib libXo.a + +clean: + -rm -f *.[oa] + +install: + cp libXo.a $(INSTALL)/lib + ranlib $(INSTALL)/lib/libXo.a diff -Naur genesis-orig/src/Xodus/Xo/xo_cvt.c genesis-mosx/src/Xodus/Xo/xo_cvt.c --- genesis-orig/src/Xodus/Xo/xo_cvt.c Fri Jun 29 17:12:55 2001 +++ genesis-mosx/src/Xodus/Xo/xo_cvt.c Wed Apr 3 00:19:24 2002 @@ -700,7 +700,7 @@ /* We handle form widgets specially */ fW = XtParent(XtParent(XtParent(XtParent(object)))); if ( strbegins (field, "xgeom") ) { - n=xoConvertGeom(value,0,XDisplayWidth(XgDisplay(),0),1); + n=xoConvertGeom(value,0,XDisplayWidth((Display *)XgDisplay(),0),1); /* ugly hack to head off a problem I havent figured out */ /*if (n == 0) n = 1;*/ if (n>=0) { @@ -709,7 +709,7 @@ } } if ( strbegins (field, "ygeom") ) { - n=xoConvertGeom(value,0,XDisplayHeight(XgDisplay(),0),1); + n=xoConvertGeom(value,0,XDisplayHeight((Display *)XgDisplay(),0),1); /* ugly hack to head off a problem I havent figured out */ /*if (n == 0) n = 1;*/ if (n>=0) { @@ -718,14 +718,14 @@ } } if ( strbegins (field, "wgeom") ) { - n=xoConvertGeom(value,1,XDisplayWidth(XgDisplay(),0),200); + n=xoConvertGeom(value,1,XDisplayWidth((Display *)XgDisplay(),0),200); if (n>1) { XoXtVaSetValues(/*object*/fW,XtNwidth,n,NULL); return(True); } } if ( strbegins (field, "hgeom") ) { - n=xoConvertGeom(value,1,XDisplayHeight(XgDisplay(),0),200); + n=xoConvertGeom(value,1,XDisplayHeight((Display *)XgDisplay(),0),200); if (n>1) { XoXtVaSetValues(/*object*/fW,XtNheight,n,NULL); return(True); diff -Naur genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/config.log genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/config.log --- genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/config.log Sun Jul 22 13:12:40 2001 +++ genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/config.log Wed Apr 24 01:50:04 2002 @@ -1,36 +1,32 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -configure:1020: cc -c -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 +configure:1020: cc -c -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 configure:1220: cc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out -configure:2084: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c -lc 1>&5 -/tmp/ccUdu0OZ.o: In function `t': -/tmp/ccUdu0OZ.o(.text+0xc): undefined reference to `tanh' -collect2: ld returned 1 exit status -configure:2118: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c -lm 1>&5 -configure:2213: cc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out -configure:2247: cc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out -configure:2297: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:2331: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:2398: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:2428: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:2476: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:2644: cc -c -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:2702: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:2731: cc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out -configure:2796: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3014: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3052: cc -c -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3068: cc -c -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure: In function `t': -configure:3063: `not' undeclared (first use in this function) -configure:3063: (Each undeclared identifier is reported only once -configure:3063: for each function it appears in.) -configure:3063: parse error before `big' -configure:3136: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3170: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3204: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3238: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3272: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3310: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 -configure:3348: cc -o conftest -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux -DNDEBUG conftest.c 1>&5 +configure:1216: undefined type, found `Syntax' +configure:1216: illegal external declaration, missing `;' after `Error' +cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode +configure:1235: cc -E -traditional-cpp -DNDEBUG conftest.c >/dev/null 2>conftest.out +configure:2084: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c -lc 1>&5 +configure:2213: cc -E -traditional-cpp -DNDEBUG conftest.c >/dev/null 2>conftest.out +configure:2247: cc -E -traditional-cpp -DNDEBUG conftest.c >/dev/null 2>conftest.out +configure:2297: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:2331: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:2398: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:2428: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:2421: alloca.h: No such file or directory +configure:2476: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:2644: cc -c -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:2702: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:2731: cc -E -traditional-cpp -DNDEBUG conftest.c >/dev/null 2>conftest.out +configure:2796: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3014: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3052: cc -c -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3068: cc -c -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3136: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3170: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3204: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3238: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3272: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3310: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 +configure:3348: cc -o conftest -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin -DNDEBUG conftest.c 1>&5 diff -Naur genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/config.status genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/config.status --- genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/config.status Sun Jul 22 13:12:41 2001 +++ genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/config.status Wed Apr 24 01:50:02 2002 @@ -2,7 +2,7 @@ # Generated automatically by configure. # Run this file to recreate the current configuration. # This directory was configured as follows, -# on host y-wing.bbb.caltech.edu: +# on host Leibnitz: # # ./configure # @@ -34,14 +34,14 @@ s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF /^[ ]*VPATH[ ]*=[^:]*$/d -s%@CFLAGS@%-O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux %g +s%@CFLAGS@%-I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin %g s%@CPPFLAGS@%-DNDEBUG%g s%@CXXFLAGS@%%g s%@DEFS@%-DHAVE_CONFIG_H%g s%@LDFLAGS@%%g s%@LIBS@%%g s%@exec_prefix@%${prefix}%g -s%@prefix@%/free/mhucka/genesis/genesis-2/genesis/src/diskio/interface/netcdf/netcdf-3.4%g +s%@prefix@%/Volumes/Boltzmann/GENESIS/genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4%g s%@program_transform_name@%s,x,x,%g s%@bindir@%${exec_prefix}/bin%g s%@sbindir@%${exec_prefix}/sbin%g @@ -62,17 +62,17 @@ s%@FC@%%g s%@FFLAGS@%-O%g s%@FLIBS@% %g -s%@CPP@%cc -E%g -s%@FPP@%cc -E%g +s%@CPP@%cc -E -traditional-cpp%g +s%@FPP@%cc -E -traditional-cpp%g s%@COMPILE_F@%%g s%@FPPFLAGS@%%g -s%@MATHLIB@%-lm%g +s%@MATHLIB@%%g s%@AR@%ar%g s%@RANLIB@%ranlib%g s%@ALLOCA@%%g -s%@prog@%%g +s%@prog@%catman%g s%@WHATIS@%whatis%g -s%@MAKEWHATIS_CMD@%%g +s%@MAKEWHATIS_CMD@%catman -w -M $(MANDIR)%g s%@FTPBINDIR@%/home/ftp/pub/binary/dummy_system%g CEOF @@ -161,60 +161,51 @@ cp $ac_given_srcdir/$ac_file_in conftest.in cat > conftest.frag < conftest.out - rm -f conftest.in - mv conftest.out conftest.in - - cat > conftest.frag < conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out - rm -f conftest.in - mv conftest.out conftest.in - - cat > conftest.frag < conftest.frag < conftest.out - rm -f conftest.in - mv conftest.out conftest.in - - cat > conftest.frag < conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out rm -f conftest.in mv conftest.out conftest.in cat > conftest.frag < conftest.out diff -Naur genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/libsrc/ncconfig.h genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/libsrc/ncconfig.h --- genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/libsrc/ncconfig.h Fri Jun 29 16:59:32 2001 +++ genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/libsrc/ncconfig.h Mon Mar 18 03:01:33 2002 @@ -26,7 +26,7 @@ /* Define if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ +#define WORDS_BIGENDIAN 1 /* Define if you don't have the . */ /* #undef NO_STDLIB_H */ @@ -35,13 +35,13 @@ /* #undef NO_SYS_TYPES_H */ /* Define if you have the ftruncate function */ -#define HAVE_FTRUNCATE 1 +/* #undef HAVE_FTRUNCATE */ /* Define if you have alloca, as a function or macro. */ #define HAVE_ALLOCA 1 /* Define if you have and it should be used (not on Ultrix). */ -#define HAVE_ALLOCA_H 1 +/* #undef HAVE_ALLOCA_H */ /* Define if you don't have the strerror function */ /* #undef NO_STRERROR */ @@ -50,7 +50,7 @@ #define SIZEOF_SIZE_T 4 /* The number of bytes in a off_t */ -#define SIZEOF_OFF_T 4 +#define SIZEOF_OFF_T 8 /* Define to `int' if system doesn't define. */ /* #undef ssize_t */ diff -Naur genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/macros.make genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/macros.make --- genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/macros.make Sun Jul 22 13:53:18 2001 +++ genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/macros.make Wed Apr 24 01:50:02 2002 @@ -1,4 +1,4 @@ -# $Id: macros.make,v 1.7 2001/07/22 17:53:18 mhucka Exp $ +# $Id: macros.make.in,v 1.1 1999/10/13 02:32:44 mhucka Exp $ # The purpose of this file is to contain common make(1) macros. # It should be processed by every execution of that utility. @@ -9,7 +9,7 @@ # Installation Directories: -prefix = /free/mhucka/genesis/genesis-2/genesis/src/diskio/interface/netcdf/netcdf-3.4 +prefix = /Volumes/Boltzmann/GENESIS/genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4 exec_prefix = $(prefix) INCDIR = $(exec_prefix)/include LIBDIR = $(exec_prefix)/lib @@ -20,9 +20,9 @@ # Preprocessing: M4 = m4 M4FLAGS = -B10000 -CPP = cc -E +CPP = cc -E -traditional-cpp CPPFLAGS = $(INCLUDES) $(DEFINES) -DNDEBUG -FPP = cc -E +FPP = cc -E -traditional-cpp FPPFLAGS = CXXCPPFLAGS = $(CPPFLAGS) @@ -31,7 +31,7 @@ CC = cc CXX = FC = -CFLAGS = -O2 -D__GLIBC -D__NO_MATH_INLINES -Wall -Wno-implicit -Wno-return-type -Wno-unused -Wno-parentheses -Dbison -Dnetcdf -DFMT1 -DINCSPRNG -DBSD -DLinux +CFLAGS = -I/usr/include/sys -O2 -traditional-cpp -pipe -D__STDC__ -D__NO_MATH_INLINES -DBIGENDIAN -Dbison -Dnetcdf -DFMT1 -DBSD -DMacOSXDarwin CXXFLAGS = $(CFLAGS) FFLAGS = -O CC_MAKEDEPEND = false @@ -44,7 +44,7 @@ # Linking: -MATHLIB = -lm +MATHLIB = FLIBS = LIBS = LINK.c = $(CC) -o $@ $(CFLAGS) $(LDFLAGS) @@ -62,7 +62,7 @@ WHATIS = whatis # The following macro should be empty on systems that don't # allow users to create their own manual-page indexes. -MAKEWHATIS_CMD = +MAKEWHATIS_CMD = catman -w -M $(MANDIR) # Misc. Utilities: diff -Naur genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/ncgentab.c genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/ncgentab.c --- genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/ncgentab.c Fri Jun 29 16:59:36 2001 +++ genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/ncgentab.c Wed Apr 24 00:30:36 2002 @@ -82,7 +82,12 @@ #include #endif +#ifdef __APPLE__ +#include +#include +#else #include +#endif #ifdef __cplusplus diff -Naur genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.c genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.c --- genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.c Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.c Tue Apr 2 23:35:41 2002 @@ -0,0 +1,1303 @@ +#include +#ifndef lint +#if 0 +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#else +__IDSTRING(yyrcsid, "$NetBSD: skeleton.c,v 1.14 1997/10/20 03:41:16 lukem Exp $"); +#endif +#endif +#include +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define YYLEX yylex() +#define YYEMPTY -1 +#define yyclearin (yychar=(YYEMPTY)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define YYPREFIX "yy" +#line 10 "ncgen.y" +#ifndef lint +static char SccsId[] = "$Id: ncgen.y,v 1.1 1999/10/13 02:33:03 mhucka Exp $"; +#endif +#include +#include +#include +#include "generic.h" +#include "ncgen.h" +#include "genlib.h" /* for grow_darray() et al */ + +typedef struct Symbol { /* symbol table entry */ + char *name; + struct Symbol *next; + unsigned is_dim : 1; /* appears as netCDF dimension */ + unsigned is_var : 1; /* appears as netCDF variable */ + unsigned is_att : 1; /* appears as netCDF attribute */ + int dnum; /* handle as a dimension */ + int vnum; /* handle as a variable */ + } *YYSTYPE1; + +/* True if string a equals string b*/ +#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0) +#define NC_UNSPECIFIED ((nc_type)0) /* unspecified (as yet) type */ + +#define YYSTYPE YYSTYPE1 +YYSTYPE symlist; /* symbol table: linked list */ + +extern int derror_count; /* counts errors in netcdf definition */ +extern int lineno; /* line number for error messages */ + +static int not_a_string; /* whether last constant read was a string */ +static char termstring[MAXTRST]; /* last terminal string read */ +static double double_val; /* last double value read */ +static float float_val; /* last float value read */ +static int int_val; /* last int value read */ +static short short_val; /* last short value read */ +static char char_val; /* last char value read */ +static signed char byte_val; /* last byte value read */ + +static nc_type type_code; /* holds declared type for variables */ +static nc_type atype_code; /* holds derived type for attributes */ +static char *netcdfname; /* to construct netcdf file name */ +static void *att_space; /* pointer to block for attribute values */ +static nc_type valtype; /* type code for list of attribute values */ + +static char *char_valp; /* pointers used to accumulate data values */ +static signed char *byte_valp; +static short *short_valp; +static int *int_valp; +static float *float_valp; +static double *double_valp; +static void *rec_cur; /* pointer to where next data value goes */ +static void *rec_start; /* start of space for data */ +#line 74 "y.tab.c" +#define NC_UNLIMITED_K 257 +#define BYTE_K 258 +#define CHAR_K 259 +#define SHORT_K 260 +#define INT_K 261 +#define FLOAT_K 262 +#define DOUBLE_K 263 +#define IDENT 264 +#define TERMSTRING 265 +#define BYTE_CONST 266 +#define CHAR_CONST 267 +#define SHORT_CONST 268 +#define INT_CONST 269 +#define FLOAT_CONST 270 +#define DOUBLE_CONST 271 +#define DIMENSIONS 272 +#define VARIABLES 273 +#define NETCDF 274 +#define DATA 275 +#define FILLVALUE 276 +#define YYERRCODE 256 +short yylhs[] = { -1, + 2, 5, 0, 1, 1, 6, 6, 7, 7, 8, + 8, 9, 10, 3, 3, 3, 11, 11, 13, 13, + 12, 12, 16, 14, 17, 17, 17, 17, 17, 17, + 18, 18, 22, 19, 20, 21, 21, 23, 23, 24, + 26, 15, 25, 25, 28, 29, 27, 27, 30, 31, + 31, 31, 31, 31, 31, 31, 4, 4, 32, 32, + 34, 33, 35, 35, 38, 36, 37, 37, 37, 37, + 37, 37, 37, 37, +}; +short yylen[] = { 2, + 0, 0, 8, 0, 2, 2, 3, 1, 3, 3, + 3, 1, 1, 0, 2, 1, 2, 3, 1, 1, + 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 3, 0, 3, 1, 0, 3, 1, 3, 1, + 0, 4, 3, 2, 1, 1, 1, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 2, 2, 3, + 0, 4, 1, 3, 0, 2, 1, 1, 1, 1, + 1, 1, 1, 1, +}; +short yydefred[] = { 0, + 0, 0, 1, 0, 0, 0, 13, 0, 0, 8, + 0, 12, 35, 0, 0, 2, 0, 23, 0, 45, + 41, 0, 0, 6, 0, 0, 25, 26, 27, 28, + 29, 30, 0, 0, 19, 20, 0, 46, 44, 0, + 0, 21, 0, 0, 7, 9, 11, 10, 0, 17, + 0, 31, 33, 0, 0, 22, 0, 43, 18, 0, + 0, 61, 0, 0, 3, 51, 52, 50, 53, 54, + 55, 56, 0, 47, 49, 32, 0, 34, 0, 0, + 59, 0, 40, 0, 38, 65, 60, 48, 0, 37, + 0, 63, 0, 39, 65, 68, 69, 67, 70, 71, + 72, 73, 74, 66, 64, +}; +short yydgoto[] = { 2, + 6, 4, 16, 55, 40, 8, 9, 10, 11, 12, + 33, 17, 34, 35, 18, 19, 37, 51, 52, 20, + 78, 61, 84, 85, 21, 43, 73, 22, 39, 74, + 75, 63, 64, 79, 91, 92, 104, 93, +}; +short yysindex[] = { -261, + -109, 0, 0, -253, -242, -54, 0, -242, -35, 0, + -23, 0, 0, -38, -225, 0, -56, 0, -36, 0, + 0, -18, -34, 0, -242, -241, 0, 0, 0, 0, + 0, 0, -38, -9, 0, 0, -223, 0, 0, -224, + -7, 0, -8, -225, 0, 0, 0, 0, -5, 0, + 11, 0, 0, -223, -69, 0, -222, 0, 0, -223, + 17, 0, -223, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, -242, 0, 1, 2, + 0, -222, 0, -26, 0, 0, 0, 0, -242, 0, + 16, 0, -234, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, +}; +short yyrindex[] = { 0, + 0, 0, 0, -58, 0, -122, 0, -57, 0, 0, + 0, 0, 0, 0, 0, 0, -120, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -119, 0, 0, 0, 0, 0, 0, -62, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -33, 0, -59, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -36, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, +}; +short yygindex[] = { 0, + 0, 0, 0, 0, 0, 0, 61, 45, 0, -60, + 0, 0, 38, 0, -6, 55, 0, 0, 13, -30, + 0, 0, 0, -15, 0, 0, 0, -42, 31, -4, + 0, 0, 14, 0, 0, -19, 0, 0, +}; +#define YYTABLESIZE 226 +short yytable[] = { 4, + 5, 15, 14, 15, 16, 15, 53, 36, 25, 25, + 36, 62, 1, 3, 90, 47, 83, 89, 5, 15, + 62, 7, 42, 24, 45, 36, 36, 48, 83, 53, + 96, 97, 98, 99, 100, 101, 102, 26, 38, 44, + 13, 103, 66, 67, 68, 69, 70, 71, 72, 50, + 54, 56, 57, 59, 60, 65, 77, 81, 82, 95, + 87, 86, 57, 24, 62, 58, 4, 5, 23, 46, + 49, 41, 76, 94, 58, 105, 80, 88, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 14, 0, 16, 15, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 13, 0, 13, + 0, 0, 0, 0, 4, 5, 4, 5, 14, 27, + 28, 29, 30, 31, 32, 13, +}; +short yycheck[] = { 58, + 58, 58, 125, 58, 125, 125, 37, 14, 44, 44, + 44, 54, 274, 123, 41, 257, 77, 44, 272, 58, + 63, 264, 59, 59, 59, 59, 33, 269, 89, 60, + 265, 266, 267, 268, 269, 270, 271, 61, 264, 58, + 264, 276, 265, 266, 267, 268, 269, 270, 271, 59, + 275, 59, 61, 59, 44, 125, 40, 59, 44, 44, + 59, 61, 125, 59, 59, 125, 125, 125, 8, 25, + 33, 17, 60, 89, 44, 95, 63, 82, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 275, -1, 275, 275, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 264, -1, 264, -1, 264, + -1, -1, -1, -1, 273, 273, 275, 275, 273, 258, + 259, 260, 261, 262, 263, 264, +}; +#define YYFINAL 2 +#ifndef YYDEBUG +#define YYDEBUG 0 +#endif +#define YYMAXTOKEN 276 +#if YYDEBUG +char *yyname[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,"'('","')'",0,0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'","';'",0,"'='", +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +"NC_UNLIMITED_K","BYTE_K","CHAR_K","SHORT_K","INT_K","FLOAT_K","DOUBLE_K", +"IDENT","TERMSTRING","BYTE_CONST","CHAR_CONST","SHORT_CONST","INT_CONST", +"FLOAT_CONST","DOUBLE_CONST","DIMENSIONS","VARIABLES","NETCDF","DATA", +"FILLVALUE", +}; +char *yyrule[] = { +"$accept : ncdesc", +"$$1 :", +"$$2 :", +"ncdesc : NETCDF '{' $$1 dimsection vasection $$2 datasection '}'", +"dimsection :", +"dimsection : DIMENSIONS dimdecls", +"dimdecls : dimdecline ';'", +"dimdecls : dimdecls dimdecline ';'", +"dimdecline : dimdecl", +"dimdecline : dimdecline ',' dimdecl", +"dimdecl : dimd '=' INT_CONST", +"dimdecl : dimd '=' NC_UNLIMITED_K", +"dimd : dim", +"dim : IDENT", +"vasection :", +"vasection : VARIABLES vadecls", +"vasection : gattdecls", +"vadecls : vadecl ';'", +"vadecls : vadecls vadecl ';'", +"vadecl : vardecl", +"vadecl : attdecl", +"gattdecls : gattdecl ';'", +"gattdecls : gattdecls gattdecl ';'", +"gattdecl : attdecl", +"vardecl : type varlist", +"type : BYTE_K", +"type : CHAR_K", +"type : SHORT_K", +"type : INT_K", +"type : FLOAT_K", +"type : DOUBLE_K", +"varlist : varspec", +"varlist : varlist ',' varspec", +"$$3 :", +"varspec : var $$3 dimspec", +"var : IDENT", +"dimspec :", +"dimspec : '(' dimlist ')'", +"dimlist : vdim", +"dimlist : dimlist ',' vdim", +"vdim : dim", +"$$4 :", +"attdecl : att $$4 '=' attvallist", +"att : avar ':' attr", +"att : ':' attr", +"avar : var", +"attr : IDENT", +"attvallist : aconst", +"attvallist : attvallist ',' aconst", +"aconst : attconst", +"attconst : CHAR_CONST", +"attconst : TERMSTRING", +"attconst : BYTE_CONST", +"attconst : SHORT_CONST", +"attconst : INT_CONST", +"attconst : FLOAT_CONST", +"attconst : DOUBLE_CONST", +"datasection :", +"datasection : DATA datadecls", +"datadecls : datadecl ';'", +"datadecls : datadecls datadecl ';'", +"$$5 :", +"datadecl : avar $$5 '=' constlist", +"constlist : dconst", +"constlist : constlist ',' dconst", +"$$6 :", +"dconst : $$6 const", +"const : CHAR_CONST", +"const : TERMSTRING", +"const : BYTE_CONST", +"const : SHORT_CONST", +"const : INT_CONST", +"const : FLOAT_CONST", +"const : DOUBLE_CONST", +"const : FILLVALUE", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 10000 +#define YYMAXDEPTH 10000 +#endif +#endif +#define YYINITSTACKSIZE 200 +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short *yyss; +short *yysslim; +YYSTYPE *yyvs; +int yystacksize; +#line 753 "ncgen.y" + +/* PROGRAMS */ + +#ifdef vms +void +#else +int +#endif +yyerror( /* called for yacc syntax error */ + char *s) +{ + derror(s); +#ifndef vms + return -1; +#endif +} + +/* undefine yywrap macro, in case we are using bison instead of yacc */ +#ifdef yywrap +#undef yywrap +#endif + +int +yywrap(void) /* returns 1 on EOF if no more input */ +{ + return 1; +} + + +/* Symbol table operations for ncgen tool */ + +YYSTYPE lookup( /* find sname in symbol table (linear search) */ + char *sname) +{ + YYSTYPE sp; + for (sp = symlist; sp != (YYSTYPE) 0; sp = sp -> next) + if (STREQ(sp -> name, sname)) { + return sp; + } + return 0; /* 0 ==> not found */ +} + +YYSTYPE install( /* install sname in symbol table */ + char *sname) +{ + YYSTYPE sp; + + sp = (YYSTYPE) emalloc (sizeof (struct Symbol)); + sp -> name = (char *) emalloc (strlen (sname) + 1);/* +1 for '\0' */ + (void) strcpy (sp -> name, sname); + sp -> next = symlist; /* put at front of list */ + sp -> is_dim = 0; + sp -> is_var = 0; + sp -> is_att = 0; + symlist = sp; + return sp; +} + +void +clearout(void) /* reset symbol table to empty */ +{ + YYSTYPE sp, tp; + for (sp = symlist; sp != (YYSTYPE) 0;) { + tp = sp -> next; + free (sp -> name); + free ((char *) sp); + sp = tp; + } + symlist = 0; +} + +/* get lexical input routine generated by lex */ +#include "ncgenyy.c" +#line 416 "y.tab.c" +/* allocate initial stack or double stack size, up to YYMAXDEPTH */ +int yyparse __P((void)); +static int yygrowstack __P((void)); +static int yygrowstack() +{ + int newsize, i; + short *newss; + YYSTYPE *newvs; + + if ((newsize = yystacksize) == 0) + newsize = YYINITSTACKSIZE; + else if (newsize >= YYMAXDEPTH) + return -1; + else if ((newsize *= 2) > YYMAXDEPTH) + newsize = YYMAXDEPTH; + i = yyssp - yyss; + if ((newss = (short *)realloc(yyss, newsize * sizeof *newss)) == NULL) + return -1; + yyss = newss; + yyssp = newss + i; + if ((newvs = (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs)) == NULL) + return -1; + yyvs = newvs; + yyvsp = newvs + i; + yystacksize = newsize; + yysslim = yyss + newsize - 1; + return 0; +} + +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse() +{ + int yym, yyn, yystate; +#if YYDEBUG + char *yys; + + if ((yys = getenv("YYDEBUG")) != NULL) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + if (yyss == NULL && yygrowstack()) goto yyoverflow; + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if ((yyn = yydefred[yystate]) != 0) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; + goto yynewerror; +yynewerror: + yyerror("syntax error"); + goto yyerrlab; +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +#line 97 "ncgen.y" +{ init_netcdf(); } +break; +case 2: +#line 100 "ncgen.y" +{ + if (derror_count == 0) + define_netcdf(netcdfname); + } +break; +case 3: +#line 106 "ncgen.y" +{ + if (derror_count == 0) + close_netcdf(); + } +break; +case 10: +#line 121 "ncgen.y" +{ if (int_val <= 0) + derror("dimension length must be positive"); + dims[ndims].size = int_val; + ndims++; + } +break; +case 11: +#line 127 "ncgen.y" +{ if (rec_dim != -1) + derror("only one NC_UNLIMITED dimension allowed"); + rec_dim = ndims; /* the unlimited (record) dimension */ + dims[ndims].size = NC_UNLIMITED; + ndims++; + } +break; +case 12: +#line 135 "ncgen.y" +{ if (yyvsp[0]->is_dim == 1) { + derror( "duplicate dimension declaration for %s", + yyvsp[0]->name); + } + yyvsp[0]->is_dim = 1; + yyvsp[0]->dnum = ndims; + /* make sure dims array will hold dimensions */ + grow_darray(ndims, /* must hold ndims+1 dims */ + &dims); /* grow as needed */ + dims[ndims].name = (char *) emalloc(strlen(yyvsp[0]->name)+1); + (void) strcpy(dims[ndims].name, yyvsp[0]->name); + /* name for use in generated Fortran and C variables */ + dims[ndims].lname = decodify(yyvsp[0]->name); + } +break; +case 25: +#line 168 "ncgen.y" +{ type_code = NC_BYTE; } +break; +case 26: +#line 169 "ncgen.y" +{ type_code = NC_CHAR; } +break; +case 27: +#line 170 "ncgen.y" +{ type_code = NC_SHORT; } +break; +case 28: +#line 171 "ncgen.y" +{ type_code = NC_INT; } +break; +case 29: +#line 172 "ncgen.y" +{ type_code = NC_FLOAT; } +break; +case 30: +#line 173 "ncgen.y" +{ type_code = NC_DOUBLE; } +break; +case 33: +#line 179 "ncgen.y" +{ + static struct vars dummyvar; + + dummyvar.name = "dummy"; + dummyvar.type = NC_DOUBLE; + dummyvar.ndims = 0; + dummyvar.dims = 0; + dummyvar.fill_value.doublev = NC_FILL_DOUBLE; + dummyvar.has_data = 0; + + nvdims = 0; + /* make sure variable not re-declared */ + if (yyvsp[0]->is_var == 1) { + derror( "duplicate variable declaration for %s", + yyvsp[0]->name); + } + yyvsp[0]->is_var = 1; + yyvsp[0]->vnum = nvars; + /* make sure vars array will hold variables */ + grow_varray(nvars, /* must hold nvars+1 vars */ + &vars); /* grow as needed */ + vars[nvars] = dummyvar; /* to make Purify happy */ + vars[nvars].name = (char *) emalloc(strlen(yyvsp[0]->name)+1); + (void) strcpy(vars[nvars].name, yyvsp[0]->name); + /* name for use in generated Fortran and C variables */ + vars[nvars].lname = decodify(yyvsp[0]->name); + vars[nvars].type = type_code; + /* set default fill value. You can override this with + * the variable attribute "_FillValue". */ + nc_getfill(type_code, &vars[nvars].fill_value); + vars[nvars].has_data = 0; /* has no data (yet) */ + } +break; +case 34: +#line 212 "ncgen.y" +{ + vars[nvars].ndims = nvdims; + nvars++; + } +break; +case 40: +#line 226 "ncgen.y" +{ + if (nvdims >= NC_MAX_VAR_DIMS) { + derror("%s has too many dimensions",vars[nvars].name); + } + if (yyvsp[0]->is_dim == 1) + dimnum = yyvsp[0]->dnum; + else { + derror( "%s is not declared as a dimension", + yyvsp[0]->name); + dimnum = ndims; + } + if (rec_dim != -1 && dimnum == rec_dim && nvdims != 0) { + derror("unlimited dimension must be first"); + } + grow_iarray(nvdims, /* must hold nvdims+1 ints */ + &vars[nvars].dims); /* grow as needed */ + vars[nvars].dims[nvdims] = dimnum; + nvdims++; + } +break; +case 41: +#line 247 "ncgen.y" +{ + valnum = 0; + valtype = NC_UNSPECIFIED; + /* get a large block for attributes, realloc later */ + att_space = emalloc(MAX_NC_ATTSIZE); + /* make all kinds of pointers point to it */ + char_valp = (char *) att_space; + byte_valp = (signed char *) att_space; + short_valp = (short *) att_space; + int_valp = (int *) att_space; + float_valp = (float *) att_space; + double_valp = (double *) att_space; + } +break; +case 42: +#line 261 "ncgen.y" +{ + { /* check if duplicate attribute for this var */ + int i; + for(i=0; iis_var == 1) + varnum = yyvsp[0]->vnum; + else { + derror("%s not declared as a variable, fatal error", + yyvsp[0]->name); + YYABORT; + } + } +break; +case 46: +#line 309 "ncgen.y" +{ + /* make sure atts array will hold attributes */ + grow_aarray(natts, /* must hold natts+1 atts */ + &atts); /* grow as needed */ + atts[natts].name = (char *) emalloc(strlen(yyvsp[0]->name)+1); + (void) strcpy(atts[natts].name,yyvsp[0]->name); + /* name for use in generated Fortran and C variables */ + atts[natts].lname = decodify(yyvsp[0]->name); + } +break; +case 49: +#line 323 "ncgen.y" +{ + if (valtype == NC_UNSPECIFIED) + valtype = atype_code; + if (valtype != atype_code) + derror("values for attribute must be all of same type"); + } +break; +case 50: +#line 332 "ncgen.y" +{ + atype_code = NC_CHAR; + *char_valp++ = char_val; + valnum++; + } +break; +case 51: +#line 338 "ncgen.y" +{ + atype_code = NC_CHAR; + { + /* don't null-terminate attribute strings */ + size_t len = strlen(termstring); + if (len == 0) /* need null if that's only value */ + len = 1; + (void)strncpy(char_valp,termstring,len); + valnum += len; + char_valp += len; + } + } +break; +case 52: +#line 351 "ncgen.y" +{ + atype_code = NC_BYTE; + *byte_valp++ = byte_val; + valnum++; + } +break; +case 53: +#line 357 "ncgen.y" +{ + atype_code = NC_SHORT; + *short_valp++ = short_val; + valnum++; + } +break; +case 54: +#line 363 "ncgen.y" +{ + atype_code = NC_INT; + *int_valp++ = int_val; + valnum++; + } +break; +case 55: +#line 369 "ncgen.y" +{ + atype_code = NC_FLOAT; + *float_valp++ = float_val; + valnum++; + } +break; +case 56: +#line 375 "ncgen.y" +{ + atype_code = NC_DOUBLE; + *double_valp++ = double_val; + valnum++; + } +break; +case 61: +#line 390 "ncgen.y" +{ + valtype = vars[varnum].type; /* variable type */ + valnum = 0; /* values accumulated for variable */ + vars[varnum].has_data = 1; + /* compute dimensions product */ + var_size = nctypesize(valtype); + if (vars[varnum].ndims == 0) { /* scalar */ + var_len = 1; + } else if (vars[varnum].dims[0] == rec_dim) { + var_len = 1; /* one record for unlimited vars */ + } else { + var_len = dims[vars[varnum].dims[0]].size; + } + for(dimnum = 1; dimnum < vars[varnum].ndims; dimnum++) + var_len = var_len*dims[vars[varnum].dims[dimnum]].size; + /* allocate memory for variable data */ + if (var_len*var_size != (size_t)(var_len*var_size)) { + derror("variable %s too large for memory", + vars[varnum].name); + exit(9); + } + rec_len = var_len; + rec_start = malloc ((size_t)(rec_len*var_size)); + if (rec_start == 0) { + derror ("out of memory\n"); + exit(3); + } + rec_cur = rec_start; + switch (valtype) { + case NC_CHAR: + char_valp = (char *) rec_start; + break; + case NC_BYTE: + byte_valp = (signed char *) rec_start; + break; + case NC_SHORT: + short_valp = (short *) rec_start; + break; + case NC_INT: + int_valp = (int *) rec_start; + break; + case NC_FLOAT: + float_valp = (float *) rec_start; + break; + case NC_DOUBLE: + double_valp = (double *) rec_start; + break; + } + } +break; +case 62: +#line 440 "ncgen.y" +{ + if (valnum < var_len) { /* leftovers */ + nc_fill(valtype, + var_len - valnum, + rec_cur, + vars[varnum].fill_value); + } + /* put out var_len values */ + vars[varnum].nrecs = valnum / rec_len; + if (derror_count == 0) + put_variable(rec_start); + free ((char *) rec_start); + } +break; +case 65: +#line 458 "ncgen.y" +{ + if(valnum >= var_len) { + if (vars[varnum].dims[0] != rec_dim) { /* not recvar */ + derror("too many values for this variable, %d >= %d", + valnum, var_len); + exit (4); + } else { /* a record variable, so grow data + container and increment var_len by + multiple of record size */ + ptrdiff_t rec_inc = (char *)rec_cur + - (char *)rec_start; + var_len += rec_len * (1 + valnum - var_len)/rec_len; + rec_start = erealloc(rec_start, var_len*var_size); + rec_cur = (char *)rec_start + rec_inc; + char_valp = (char *) rec_cur; + byte_valp = (signed char *) rec_cur; + short_valp = (short *) rec_cur; + int_valp = (int *) rec_cur; + float_valp = (float *) rec_cur; + double_valp = (double *) rec_cur; + } + } + not_a_string = 1; + } +break; +case 66: +#line 483 "ncgen.y" +{ + if (not_a_string) { + switch (valtype) { + case NC_CHAR: + rec_cur = (void *) char_valp; + break; + case NC_BYTE: + rec_cur = (void *) byte_valp; + break; + case NC_SHORT: + rec_cur = (void *) short_valp; + break; + case NC_INT: + rec_cur = (void *) int_valp; + break; + case NC_FLOAT: + rec_cur = (void *) float_valp; + break; + case NC_DOUBLE: + rec_cur = (void *) double_valp; + break; + } + } + } +break; +case 67: +#line 510 "ncgen.y" +{ + atype_code = NC_CHAR; + switch (valtype) { + case NC_CHAR: + *char_valp++ = char_val; + break; + case NC_BYTE: + *byte_valp++ = char_val; + break; + case NC_SHORT: + *short_valp++ = char_val; + break; + case NC_INT: + *int_valp++ = char_val; + break; + case NC_FLOAT: + *float_valp++ = char_val; + break; + case NC_DOUBLE: + *double_valp++ = char_val; + break; + } + valnum++; + } +break; +case 68: +#line 535 "ncgen.y" +{ + not_a_string = 0; + atype_code = NC_CHAR; + { + size_t len = strlen(termstring); + + if(valnum + len > var_len) { + if (vars[varnum].dims[0] != rec_dim) { + derror("too many values for this variable, %d>%d", + valnum+len, var_len); + exit (5); + } else {/* a record variable so grow it */ + ptrdiff_t rec_inc = (char *)rec_cur + - (char *)rec_start; + var_len += rec_len * (len + valnum - var_len)/rec_len; + rec_start = erealloc(rec_start, var_len*var_size); + rec_cur = (char *)rec_start + rec_inc; + char_valp = (char *) rec_cur; + } + } + switch (valtype) { + case NC_CHAR: + { + int ld; + size_t i, sl; + (void)strncpy(char_valp,termstring,len); + + ld = vars[varnum].ndims-1; + if (ld > 0) {/* null-fill to size of last dim */ + sl = dims[vars[varnum].dims[ld]].size; + for (i =len;i= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff -Naur genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.h genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.h --- genesis-orig/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.h Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/diskio/interface/netcdf/netcdf-3.4/src/ncgen/y.tab.h Tue Apr 2 23:35:41 2002 @@ -0,0 +1,20 @@ +#define NC_UNLIMITED_K 257 +#define BYTE_K 258 +#define CHAR_K 259 +#define SHORT_K 260 +#define INT_K 261 +#define FLOAT_K 262 +#define DOUBLE_K 263 +#define IDENT 264 +#define TERMSTRING 265 +#define BYTE_CONST 266 +#define CHAR_CONST 267 +#define SHORT_CONST 268 +#define INT_CONST 269 +#define FLOAT_CONST 270 +#define DOUBLE_CONST 271 +#define DIMENSIONS 272 +#define VARIABLES 273 +#define NETCDF 274 +#define DATA 275 +#define FILLVALUE 276 diff -Naur genesis-orig/src/liblist genesis-mosx/src/liblist --- genesis-orig/src/liblist Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/liblist Wed Apr 24 01:25:27 2002 @@ -0,0 +1,27 @@ +# liblist - This file is generated automatically. +# DO NOT EDIT unless you are sure you +# know what you are doing. Generally +# Makefile should be edited instead. +output +hh +devices +buffer +segment +user +xo +draw +widg +olf +tools +concen +hines +param +pore +newconn +diskio +axon +synapse +personal +toolconn +simconn +kin diff -Naur genesis-orig/src/minliblist genesis-mosx/src/minliblist --- genesis-orig/src/minliblist Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/minliblist Mon Mar 18 03:01:33 2002 @@ -0,0 +1,4 @@ +# minliblist - This file is generated automatically. +# DO NOT EDIT unless you are sure you +# know what you are doing. Generally +# Makefile should be edited instead. diff -Naur genesis-orig/src/nxliblist genesis-mosx/src/nxliblist --- genesis-orig/src/nxliblist Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/nxliblist Thu Apr 4 00:28:41 2002 @@ -0,0 +1,24 @@ +# nxliblist - This file is generated automatically. +# DO NOT EDIT unless you are sure you +# know what you are doing. Generally +# Makefile should be edited instead. +output +hh +devices +buffer +segment +user +olf +tools +concen +hines +param +pore +newconn +diskio +axon +synapse +personal +toolconn +simconn +kin diff -Naur genesis-orig/src/shell/osxdarwin_param.h genesis-mosx/src/shell/osxdarwin_param.h --- genesis-orig/src/shell/osxdarwin_param.h Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/shell/osxdarwin_param.h Mon Mar 18 03:01:33 2002 @@ -0,0 +1,256 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * The contents of this file constitute Original Code as defined in and + * are subject to the Apple Public Source License Version 1.1 (the + * "License"). You may not use this file except in compliance with the + * License. Please obtain a copy of the License at + * http://www.apple.com/publicsource and read it before using this file. + * + * This Original Code and all software distributed under the License are + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the + * License for the specific language governing rights and limitations + * under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */ +/*- + * Copyright (c) 1982, 1986, 1989, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)param.h 8.3 (Berkeley) 4/4/95 + */ + +#ifndef _SYS_PARAM_H_ +#define _SYS_PARAM_H_ + +/* + Some times Apple sucks, hard... <\o Alf+ + */ +#ifndef BSD +#define BSD 199506 /* System version (year & month). */ +#endif +#define BSD4_3 1 +#define BSD4_4 1 + +#define NeXTBSD 1995064 /* NeXTBSD version (year, month, release) */ +#define NeXTBSD4_0 0 /* NeXTBSD 4.0 */ + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef LOCORE +#include +#endif + +/* + * Machine-independent constants (some used in following include files). + * Redefined constants are from POSIX 1003.1 limits file. + * + * MAXCOMLEN should be >= sizeof(ac_comm) (see ) + * MAXLOGNAME should be >= UT_NAMESIZE (see ) + */ +#include + +#define MAXCOMLEN 16 /* max command name remembered */ +#define MAXINTERP 64 /* max interpreter file name length */ +#define MAXLOGNAME 12 /* max login name length */ +#define MAXUPRC CHILD_MAX /* max simultaneous processes */ +#define NCARGS ARG_MAX /* max bytes for an exec function */ +#define NGROUPS NGROUPS_MAX /* max number groups */ +#define NOFILE 256 /* default max open files per process */ +#define NOGROUP 65535 /* marker for empty group set member */ +#define MAXHOSTNAMELEN 256 /* max hostname size */ +#define MAXDOMNAMELEN 256 /* maximum domain name length */ + +/* Machine type dependent parameters. */ +#include +#include + +/* More types and definitions used throughout the kernel. */ +#ifdef KERNEL +#include +#include +#include +#include +#include +#include +#endif + +/* Signals. */ +#include + +/* + * Priorities. Note that with 32 run queues, differences less than 4 are + * insignificant. + */ +#define PSWP 0 +#define PVM 4 +#define PINOD 8 +#define PRIBIO 16 +#define PVFS 20 +#define PZERO 22 /* No longer magic, shouldn't be here. XXX */ +#define PSOCK 24 +#define PWAIT 32 +#define PLOCK 36 +#define PPAUSE 40 +#define PUSER 50 +#define MAXPRI 127 /* Priorities range from 0 through MAXPRI. */ + +#define PRIMASK 0x0ff +#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ +#define PTTYBLOCK 0x200 /* for tty SIGTTOU and SIGTTIN blocking */ + +#define NZERO 0 /* default "nice" */ + +#define NBPW sizeof(int) /* number of bytes per word (integer) */ + +#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ +#define NODEV (dev_t)(-1) /* non-existent device */ + +/* + * Clustering of hardware pages on machines with ridiculously small + * page sizes is done here. The paging subsystem deals with units of + * CLSIZE pte's describing NBPG (from machine/param.h) pages each. + */ +#define CLBYTES (CLSIZE*NBPG) +#define CLOFSET (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */ +#define claligned(x) ((((int)(x))&CLOFSET)==0) +#define CLOFF CLOFSET +#define CLSHIFT (PGSHIFT+CLSIZELOG2) + +#if CLSIZE==1 +#define clbase(i) (i) +#define clrnd(i) (i) +#else +/* Give the base virtual address (first of CLSIZE). */ +#define clbase(i) ((i) &~ (CLSIZE-1)) +/* Round a number of clicks up to a whole cluster. */ +#define clrnd(i) (((i) + (CLSIZE-1)) &~ (CLSIZE-1)) +#endif + +#define CBLOCK 64 /* Clist block size, must be a power of 2. */ +#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */ + /* Data chars/clist. */ +#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE) +#define CROUND (CBLOCK - 1) /* Clist rounding. */ + +/* + * File system parameters and macros. + * + * The file system is made out of blocks of at most MAXBSIZE units, with + * smaller units (fragments) only in the last direct block. MAXBSIZE + * primarily determines the size of buffers in the buffer pool. It may be + * made larger without any effect on existing file systems; however making + * it smaller make make some file systems unmountable. + */ +#define MAXBSIZE MAXPHYS +#define MAXPHYSIO MAXPHYS +#define MAXFRAG 8 + +/* + * MAXPATHLEN defines the longest permissable path length after expanding + * symbolic links. It is used to allocate a temporary buffer from the buffer + * pool in which to do the name expansion, hence should be a power of two, + * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the + * maximum number of symbolic links that may be expanded in a path name. + * It should be set high enough to allow all legitimate uses, but halt + * infinite loops reasonably quickly. + */ +#define MAXPATHLEN PATH_MAX +#define MAXSYMLINKS 32 + +/* Bit map related macros. */ +#define setbit(a,i) (((char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) (((char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) (((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) ((((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0) + +/* Macros for counting and rounding. */ +#ifndef howmany +#define howmany(x, y) (((x)+((y)-1))/(y)) +#endif +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) +#define powerof2(x) ((((x)-1)&(x))==0) + +/* Macros for min/max. */ +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif /* MIN */ +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif /* MAX */ + +/* + * Constants for setting the parameters of the kernel memory allocator. + * + * 2 ** MINBUCKET is the smallest unit of memory that will be + * allocated. It must be at least large enough to hold a pointer. + * + * Units of memory less or equal to MAXALLOCSAVE will permanently + * allocate physical memory; requests for these size pieces of + * memory are quite fast. Allocations greater than MAXALLOCSAVE must + * always allocate and free physical memory; requests for these + * size allocations should be done infrequently as they will be slow. + * + * Constraints: CLBYTES <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and + * MAXALLOCSIZE must be a power of two. + */ +#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */ +#define MAXALLOCSAVE (2 * CLBYTES) + +/* + * Scale factor for scaled integers used to count %cpu time and load avgs. + * + * The number of CPU `tick's that map to a unique `%age' can be expressed + * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that + * can be calculated (assuming 32 bits) can be closely approximated using + * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15). + * + * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age', + * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024. + */ +#define FSHIFT 11 /* bits to right of fixed binary point */ +#define FSCALE (1< #include -#include +#if defined( __APPLE__ ) + #include "osxdarwin_param.h" +#else + #include +#endif #include #include "header.h" #include "hash.h" diff -Naur genesis-orig/src/shell/shell_convert.c genesis-mosx/src/shell/shell_convert.c --- genesis-orig/src/shell/shell_convert.c Fri Jun 29 17:00:00 2001 +++ genesis-mosx/src/shell/shell_convert.c Wed Apr 24 01:28:13 2002 @@ -61,7 +61,7 @@ return(0.0); } -#if !defined(mips) && !defined(Linux) && !defined(__FreeBSD__) +#if !defined(mips) && !defined(Linux) && !defined(__FreeBSD__) && !defined(__APPLE__) char tolower(c) char c; { diff -Naur genesis-orig/src/shell/shell_edit.c genesis-mosx/src/shell/shell_edit.c --- genesis-orig/src/shell/shell_edit.c Fri Jun 29 17:23:19 2001 +++ genesis-mosx/src/shell/shell_edit.c Mon Mar 18 03:01:33 2002 @@ -54,7 +54,7 @@ } } #else - if ((tmpname = mktemp(template)) == NULL + if ((tmpname = (char *)mktemp(template)) == NULL || (fp = fopen(tmpname,"w")) == NULL) { printf("cannot make temporary file\n"); return(NULL); diff -Naur genesis-orig/src/shell/shell_status.c genesis-mosx/src/shell/shell_status.c --- genesis-orig/src/shell/shell_status.c Fri Jun 29 17:00:01 2001 +++ genesis-mosx/src/shell/shell_status.c Wed Apr 3 21:20:45 2002 @@ -21,6 +21,8 @@ ** */ +// TEMPORARY! +#if !defined(__APPLE__) #include #include "header.h" #include "sim_func_ext.h" @@ -85,4 +87,8 @@ printf("\n%s\n",string); #endif /* STATUSLINE */ } +#else +RecordStartTime() {;} +ProcessStatus() {;} +#endif /* __APPLE__ */ diff -Naur genesis-orig/src/shell/shell_tty.c genesis-mosx/src/shell/shell_tty.c --- genesis-orig/src/shell/shell_tty.c Fri Jun 29 17:26:40 2001 +++ genesis-mosx/src/shell/shell_tty.c Mon Apr 22 02:02:21 2002 @@ -116,11 +116,14 @@ #include #include #include +#elif defined(__APPLE__) +#include +#include #else #include #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__APPLE__) struct termios old_tty_stdin, old_tty_stdout, new_tty_stdin, new_tty_stdout; #else struct termio old_tty_stdin, old_tty_stdout, new_tty_stdin, new_tty_stdout; @@ -439,7 +442,7 @@ * reset the terminal parameters to their original state */ #ifdef TERMIO -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__APPLE__) tcsetattr(fileno(stdin), TCSANOW, &old_tty_stdin); tcsetattr(fileno(stdout), TCSANOW, &old_tty_stdout); #else @@ -485,7 +488,7 @@ * save the old terminal parameters */ #ifdef TERMIO -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__APPLE__) tcgetattr(fileno(stdin), &old_tty_stdin); tcgetattr(fileno(stdout), &old_tty_stdout); #else @@ -651,7 +654,7 @@ /* * set the new parameters */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__APPLE__) tcsetattr(fileno(stdin), TCSANOW, &new_tty_stdin); #else ioctl(fileno(stdin), TCSETA, &new_tty_stdin); diff -Naur genesis-orig/src/sim/sim_base.c genesis-mosx/src/sim/sim_base.c --- genesis-orig/src/sim/sim_base.c Fri Jun 29 17:00:02 2001 +++ genesis-mosx/src/sim/sim_base.c Mon Mar 18 03:01:34 2002 @@ -45,7 +45,7 @@ #include #include #include -#if !defined(Solaris) && !defined(hpux) +#if !defined(Solaris) && !defined(hpux) && !defined(MacOSXDarwin) #include #endif #include "sim_ext.h" diff -Naur genesis-orig/src/sprng/Makefile genesis-mosx/src/sprng/Makefile --- genesis-orig/src/sprng/Makefile Sun Jul 22 13:50:04 2001 +++ genesis-mosx/src/sprng/Makefile Tue Apr 9 03:30:21 2002 @@ -28,8 +28,9 @@ DIRS = SRC EXAMPLES TESTS lib SRCDIR = SRC PLAT = $(MACHINE) +SPRNGLIBS = $(SPRNG_LIB) -include $(SRCDIR)/make.$(MACHINE) +include $(SRCDIR)/make.$(PLAT) # # Basic targets and rules. @@ -39,26 +40,26 @@ #--------------------------------------------------------------------------- src: - (LIB=$(LIB_DIR); export LIB; cd SRC; $(MAKE) CC="$(CC)" CFLAGS_IN="$(CFLAGS_IN)" SPRNG_LIB="$(SPRNG_LIB)" LIB_DIR='$$(LIB)' PLAT=$(PLAT); cd ..) + (LIB=$(LIB_DIR); export LIB; cd SRC; $(MAKE) CC="$(CC)" CFLAGS_IN="$(CFLAGS_IN)" SPRNGLIBS="$(SPRNG_LIB)" LIB_DIR='$$(LIB)' PLAT=$(PLAT); cd ..) examples: - (LIB=$(LIB_DIR); export LIB; cd EXAMPLES; $(MAKE) CC="$(CC)" CFLAGS_IN="$(CFLAGS_IN)" SPRNG_LIB="$(SPRNG_LIB)" LIB_DIR='$$(LIB)' PLAT=$(PLAT); cd ..) + (LIB=$(LIB_DIR); export LIB; cd EXAMPLES; $(MAKE) CC="$(CC)" CFLAGS_IN="$(CFLAGS_IN)" SPRNGLIBS="$(SPRNG_LIB)" LIB_DIR='$$(LIB)' PLAT=$(PLAT); cd ..) tests: - (LIB=$(LIB_DIR); export LIB; cd TESTS; $(MAKE) CC="$(CC)" CFLAGS_IN="$(CFLAGS_IN)" SPRNG_LIB="$(SPRNG_LIB)" LIB_DIR='$$(LIB)' PLAT=$(PLAT); cd ..) + (LIB=$(LIB_DIR); export LIB; cd TESTS; $(MAKE) CC="$(CC)" CFLAGS_IN="$(CFLAGS_IN)" SPRNGLIBS="$(SPRNG_LIB)" LIB_DIR='$$(LIB)' PLAT=$(PLAT); cd ..) #--------------------------------------------------------------------------- clean: @for l in $(DIRS) ; do \ cd $$l ; \ - $(MAKE) PLAT=$(PLAT) LIB_DIR='$$(LIB)' SPRNG_LIB="$(SPRNG_LIB)" clean ; \ + $(MAKE) PLAT=$(PLAT) LIB_DIR='$$(LIB)' SPRNGLIBS="$(SPRNG_LIB)" clean ; \ cd .. ; \ done realclean: @for l in $(DIRS) ; do \ cd $$l ; \ - $(MAKE) PLAT=$(PLAT) LIB_DIR='$$(LIB)' SPRNG_LIB="$(SPRNG_LIB)" realclean ; \ + $(MAKE) PLAT=$(PLAT) LIB_DIR='$$(LIB)' SPRNGLIBS="$(SPRNG_LIB)" realclean ; \ cd .. ; \ done @rm -f core *~ check* time* *.data diff -Naur genesis-orig/src/sprng/SRC/Makefile genesis-mosx/src/sprng/SRC/Makefile --- genesis-orig/src/sprng/SRC/Makefile Fri Jun 29 17:00:07 2001 +++ genesis-mosx/src/sprng/SRC/Makefile Tue Apr 9 03:32:49 2002 @@ -17,7 +17,7 @@ # LIBLIST = lcg lfg lcg64 cmrg mlfg # 2000-04-23 # For GENESIS, we only compile one at a time. -LIBLIST = $(SPRNG_LIB) +LIBLIST = $(SPRNGLIBS) ############################################################################## diff -Naur genesis-orig/src/sprng/SRC/make.MacOSXDarwin genesis-mosx/src/sprng/SRC/make.MacOSXDarwin --- genesis-orig/src/sprng/SRC/make.MacOSXDarwin Wed Dec 31 19:00:00 1969 +++ genesis-mosx/src/sprng/SRC/make.MacOSXDarwin Thu Apr 4 00:26:38 2002 @@ -0,0 +1,38 @@ +AR = ar +ARFLAGS = cr +#If your system does not have ranlib, then replace next statement with +#RANLIB = echo +RANLIB = ranlib +CC = cc +CLD = $(CC) +# Set f77 to echo if you do not have a FORTRAN compiler +#F77 = g77 +F77 = echo +F77LD = $(F77) +FFXN = -DAdd__ +FSUFFIX = F + +MPIF77 = $(F77) +MPICC = $(CC) +PLAT = $(MACHINE) + +# To use MPI, set the MPIDIR to location of mpi library, and MPILIB +# to name of mpi library. Remove # signs from beginning of next 3 lines. +# Also, if the previous compilation was without MPI, type: make realclean +# before compiling for mpi. +# +MPIDEF = +#MPIDEF = -DSPRNG_MPI #Only if you plan to use MPI +#MPIDIR = -L/usr/local/mpi/lib/LINUX/ch_p4 +#MPILIB = -lmpi + +# Please include mpi header file path, if needed + +CFLAGS = -I/usr/include/sys -O3 -traditional-cpp -DBigEndian $(MPIDEF) -D$(PLAT) +# -I/usr/local/mpi/include +CLDFLAGS = -O3 +FFLAGS = -O3 $(MPIDEF) -D$(PLAT) +# -I/usr/local/mpi/include +F77LDFLAGS = -O3 + +CPP = /usr/libexec/gcc/darwin/`/usr/bin/arch`/default/cpp -I/usr/include -traditional -D__STDC__ -P diff -Naur genesis-orig/src/sprng/make.CHOICES genesis-mosx/src/sprng/make.CHOICES --- genesis-orig/src/sprng/make.CHOICES Fri Jun 29 17:00:07 2001 +++ genesis-mosx/src/sprng/make.CHOICES Tue Apr 9 03:37:26 2002 @@ -24,14 +24,15 @@ #PLAT = hpux #PLAT = Linux #PLAT = LinuxPPC +#PLAT = MacOSXDarwin #PLAT = O2K -#PLAT = irix +#PLAT = irix #PLAT = Solaris #PLAT = SP2 # IBM SP2 #PLAT = sun4 -# For T3D, Use PLAT=T3E instead -#PLAT = t3e -#PLAT = GENERIC +# For T3D, Use PLAT = T3E instead +#PLAT = t3e +#PLAT = GENERIC LIB_REL_DIR = lib diff -Naur genesis-orig/src/sys/Makefile genesis-mosx/src/sys/Makefile --- genesis-orig/src/sys/Makefile Fri Jun 29 17:00:13 2001 +++ genesis-mosx/src/sys/Makefile Mon Mar 18 03:59:41 2002 @@ -82,7 +82,7 @@ # # makefile for utillib.o # -LIBS = -lm +LIBS = -lm CFLAGS = $(COPT) -D$(OS) -D$(MACHINE) $(DEC_HACK) SH = ../shell SS = ../ss @@ -115,8 +115,13 @@ ../shell/shelllib-codeg.$(LIBEXT) \ utillib.$(LIBEXT) +ifeq (,$(findstring MacOSXDarwin, $(MAKEFLAGS))) code_g: $(CODE_G_OBJ) - $(CC) $(CFLAGS) $(CODE_G_OBJ) $(LEXLIB) $(TERMCAP) -lm -o code_g + $(CC) $(CFLAGS) $(CODE_G_OBJ) $(LEXLIB) $(TERMCAP) -lm -lc -flat_namespace -o code_g +else +code_g: $(CODE_G_OBJ) + $(CC) $(CFLAGS) $(CODE_G_OBJ) $(LEXLIB) $(TERMCAP) -lm -o code_g +endif .SUFFIXES: .c,v .c .h,v .h diff -Naur genesis-orig/src/sys/code_lib.c genesis-mosx/src/sys/code_lib.c --- genesis-orig/src/sys/code_lib.c Fri Jun 29 17:00:13 2001 +++ genesis-mosx/src/sys/code_lib.c Mon Mar 18 03:01:34 2002 @@ -64,7 +64,11 @@ ** get the current date */ time(&clock); +#if defined(__APPLE__) + strcpy(date,(const char *)ctime(&clock)); +#else strcpy(date,ctime(&clock)); +#endif /* ** remove an carriage returns */ diff -Naur genesis-orig/src/sys/system.c genesis-mosx/src/sys/system.c --- genesis-orig/src/sys/system.c Fri Jun 29 17:00:13 2001 +++ genesis-mosx/src/sys/system.c Mon Mar 18 03:01:34 2002 @@ -191,7 +191,11 @@ ** pid > 0 indicates successful child has been forked ** so wait for it to complete execution and return the status */ +#if defined(__APPLE__) + while(wait(&status.w_status) != pid); +#else while(wait(&status) != pid); +#endif if(debug){ printf("child process %d done. Status = %d\n", pid, diff -Naur genesis-orig/src/sys/system_deps.c genesis-mosx/src/sys/system_deps.c --- genesis-orig/src/sys/system_deps.c Fri Jun 29 17:00:13 2001 +++ genesis-mosx/src/sys/system_deps.c Mon Mar 18 03:01:34 2002 @@ -44,3 +44,21 @@ int x; } #endif + +#if defined(__APPLE__) +#include +void BetterBcopy(src, dst, len) +char *src, *dst; +size_t len; +{ + if ((src == dst) || (len <= 0)) return; + + if ((src < dst) && ((src + len) > dst)) { + src = src + len - 1; + dst = dst + len - 1; + for (; len>0; len--, src--, dst--) *dst = *src; + } else { + for (; len>0; len--, src++, dst++) *dst = *src; + } +} +#endif diff -Naur genesis-orig/src/sys/system_deps.h genesis-mosx/src/sys/system_deps.h --- genesis-orig/src/sys/system_deps.h Fri Jun 29 17:00:13 2001 +++ genesis-mosx/src/sys/system_deps.h Mon Mar 18 03:01:34 2002 @@ -73,6 +73,22 @@ #define BZERO(s1, length) bzero((char *)(s1), length) #else #define BCMP(s1, s2, length) bcmp(s1, s2, length) +/* +#ifdef __APLE__ + #include + #define BCOPY((char *)src, (char *)dst, (size_t)len) \ + if ((src == dst) || (len <= 0)) return; \ + if ((src < dst) && ((src + len) > dst)) { \ + src = src + len - 1; \ + dst = dst + len - 1; \ + for (; len > 0; len--, src--, dst--) *dst = *src; \ + } else { \ + for (; len > 0; len--, src++, dst++) *dst = *src; \ + } +#else + #define BCOPY(s1, s2, length) bcopy(s1, s2, length) +#endif +*/ #define BCOPY(s1, s2, length) bcopy(s1, s2, length) #define BZERO(s1, length) bzero(s1, length) #endif diff -Naur genesis-orig/src/tools/nrutil.c genesis-mosx/src/tools/nrutil.c --- genesis-orig/src/tools/nrutil.c Fri Jun 29 17:00:14 2001 +++ genesis-mosx/src/tools/nrutil.c Wed Apr 3 00:35:27 2002 @@ -10,10 +10,9 @@ ** */ - -#include #include #include +#include // There! ... <\o Alf+ void nrerror(error_text) char error_text[];