# $Id: Makefile.dist,v 1.95 1997/08/12 22:04:39 dhb Exp $
#
# GENESIS/XODUS : network simulator
#
# YOU MUST EDIT THIS FILE BEFORE DOING A "make" AS DEFINED BELOW:
#
#
# 1) Uncomment the macro definitions for your system/compiler combination
#    NOTE: make sure no other system/compiler section is uncommented
# 2) execute 'make all'
# 3) execute 'make install'
# 4) execute 'make clean'
#
# If you run into problems compiling, consult the "Custom settings" section
# in which you may override the default settings.  If one of the optional
# libraries fails to compile comment 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' or a
# genesis without any libraries can be built with 'make minall' and
# 'make mininstall'.
#


#
# 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 --- System indendent binary file formats
###
### The netCDF library used by diskio is known not to compile on Paragon
### and CRAY T3E systems.

DISKIOLIB = diskio
DISKIODIR = diskio
DISKIOOBJ = $(DISKIODIR)/diskiolib.o \
	    $(DISKIODIR)/interface/netcdf-2.4.3/src/libsrc/libnetcdf.a



### oldconn --- GENESIS 1.4 network connection compatibility library
###
### 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




#
# System specific suggested settings
#
# Below are some compiler dependent settings for various system/compiler
# combinations. Uncomment the appropriate macro settings for your system
# and compiler combination.
#



#
#	SunOS 4.1.x
#

### If you get unresolved references for X11 symbols in the final link
### add
###
###    -Bstatic
###
### to the LINKFLAGS macro.  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

# MACHINE=sun4
# OS=BSD

# XVERSION=X11R4
# XINCLUDE=/usr/include
# XLIB=/usr/lib

# CC=cc
# CPP=/lib/cpp -P
# CFLAGS=-O
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end SunOS 4.1.x



#
#	Solaris 2.x (aka SunOS 5.x)
#	using SUNPro C compiler
#

# MACHINE=Solaris
# OS=SYSV

# XVERSION=X11R5
# XINCLUDE=/usr/openwin/include
# XLIB=/usr/openwin/lib

# CC=cc
# CFLAGS=-Xs -O
# CPP = /usr/ccs/lib/cpp -P

# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

### Solaris 2.4 machines, yacc is broken!  Please obtain bison and flex
### and use the following lines, substituting the location of the flex
### library for <flex-lib-path> (or removing -L<flex-lib-path> if the
### flex library is installed in a standard library path.
#
# YACC = bison -y
# PARSER = bison
# LEX = flex -l
# LEXLIB = -L<flex-lib-path> -lfl

# end	Solaris 2.x (aka SunOS 5.x)



#
#	SGI IRIX 6.x and 5.x
#	Using SGI's C compiler, 32 bit executables
#

# MACHINE=irix
# OS=SYSV

# XVERSION=X11R5
# XINCLUDE=/usr/include
# XLIB=/usr/lib

# CC=cc -cckr
# CPP=/lib/cpp -P
# CFLAGS=-O
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end SGI IRIX 6.x and 5.x 32-bit



#
#	SGI IRIX 6.x
#	Using SGI's C compiler, 64 bit executables
#
#	User reports can't compile 64-bit with SGI yacc and lex.  He
#	uses bison and flex.  See the README file for information on
#	obtaining bison and flex.
#
#	Please mail genesis@bbb.caltech.edu if you use these settings
#	and tell us about it.  If these settings don't work for you
#	the 32-bit settings should (but more slowly).
#

# MACHINE=irix
# OS=SYSV

# XVERSION=X11R5
# XINCLUDE=/usr/include
# XLIB=/usr/lib64

# CC=cc -cckr -mips4 -64 -LNO -G 0 -r10000
# CPP=/lib/cpp -P
# CFLAGS=-O2 -Ddecalpha
# LD=ld -mips4 -64 -G 0
# LINKFLAGS=-O2 -LNO -r10000 -mips4 -64 -G 0

# RANLIB=ranlib
# AR=ar

# YACC=bison -y
# PARSER=bison
# LEX=flex -l
# LEXLIB=-lfl
# LIBS= $(LEXLIB) -lm

# end SGI IRIX 6.x 64-bit



#
#	SGI IRIX 4.x
#	Using SGI's C compiler
#

# MACHINE=irix
# OS=SYSV

# XVERSION=X11R4
# XINCLUDE=/usr/include
# XLIB=/usr/lib

# CC=cc -cckr -G 5
# CPP=/lib/cpp -P
# CFLAGS=-O
# LD=ld
# LINKFLAGS=-G 5

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end SGI IRIX 4.x



#
#	DECStation running Ultrix 4.x or 3.x
#	Using DEC C compiler
#

# MACHINE=mips
# OS=BSD

# XVERSION=X11R4
# 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
# LINKFLAGS=-G 5

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end DECStation running Ultrix 4.x or 3.x



#
#	DEC Alpha running OSF/1 release 2 or higher
#	Using DEC cc compiler
#

# MACHINE=alpha
# OS=SYSV

# XVERSION=X11R4
# 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
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= -ldnet_stub $(LEXLIB) -lm

# end	DEC Alpha running OSF/1 release 2 or higher



#
#	Cray T3D (as installed at Pittsburgh Supercomputing Center)
#	see Makefile.t3d for other important settings
#

# MACHINE=t3d
# OS=BSD

# XVERSION=X11R4
# XINCLUDE=/usr/include
# XLIB=/usr/lib

# CC=cc
# CPP=/lib/cpp -P
# CFLAGS=-O -DCRAY
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end	Cray T3D (as installed at Pittsburgh Supercomputing Center)



#
#	Cray T3E (as installed at Pittsburgh Supercomputing Center)
#	see Makefile.t3e for other important settings
#

# MACHINE=t3e
# OS=BSD

# XVERSION=NOX
# XINCLUDE=/usr/include
# XLIB=/usr/lib

# CC=cc
# CPP=cpp -P
# CFLAGS=-O -DCRAY -DT3E
# LD=cld
# LDFLAGS=-Xm
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end	Cray T3E (as installed at Pittsburgh Supercomputing Center)



#
# Intel Paragon (as installed at Caltech)
# NOTE: 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.  I
#	suggest using gnu make which doesn't have this problem.
#

# MACHINE=paragon
# OS=BSD

# XVERSION=X11R4
# XINCLUDE=/usr/include
# XLIB=.

# CC=icc
# CPP=cpp860 -P
# CFLAGS=-nx -O
# LD=ld860
# LINKFLAGS=-nx

# RANLIB=ranlib
# AR=ar860

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end Intel Paragon (as installed at Caltech)



#
#	Linux 1.2.x and up
#	Using GCC C compiler
#

# MACHINE=Linux
# OS=BSD

# XVERSION=X11R6
# XINCLUDE=/usr/include
# XLIB=/usr/X11/lib

# CC=cc
# CPP=/lib/cpp -P
# CFLAGS=-O
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=bison -y
# PARSER=bison
# LEX=flex -l
# LEXLIB=-lfl
# LIBS= $(LEXLIB) -lm

#   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
#
#   The shell library makes reference to the termcap library.  Some
#   Linux distributions have an ncurses library which is supposed to
#   include termcap functionality.  The ncurses library is known to
#   result in core dumps when used with GENESIS.  If you have the
#   option, install a separate termcap library and use that.
#   Otherwise, you'll need to obtain termcap library sources and
#   compile them.
#
#   At one point it was thought that -lICE and -lSM were necessary
#   in the LIBS line.  Now it appears necessary only when linking
#   static libraries.  If you get undefined symbols with names beginning
#   with Smc you might try adding these to LIBS.

# end	Linux 1.2.x and up



#
#	FreeBSD
#	Using 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

# XVERSION=X11R6
# XINCLUDE=/usr/X11R6/include
# XLIB=/usr/X11R6/lib

# CC=cc
# CPP=/usr/libexec/cpp -P
# CFLAGS=-O2 -m486 -pipe
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end	FreeBSD



#
#	HP running HPUX (versions unknown)
#	HP's C compiler
#

# MACHINE=hpux
# OS=SYSV

# XVERSION=X11R5
# XINCLUDE=/usr/include/X11R5
# XLIB=/usr/lib/X11R5

# CC=cc
# CPP=/lib/cpp -P
# CFLAGS=-O
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end	HP running HPUX (versions unknown)



#
#	IBM RS6000 running AIX
#	IBM's C compiler
#
# Small hack here.  We need to pass -lcurses on for the code_g compile
# but LIBS doesn't get there.  Added -lcurses to LEXLIB which does get
# passed on.
#

# MACHINE=aix
# OS=SYSV

# XVERSION=X11R5
# XINCLUDE=/usr/include
# XLIB=/usr/lib

# CC=cc
# CPP=/lib/cpp -P
# CFLAGS=-U__STR__ -O
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll -lcurses
# LIBS= $(LEXLIB) -lm

# end	IBM RS6000 running AIX



#
#	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

# XVERSION=X11R5
# XINCLUDE=/usr/include
# XLIB=/usr/lib

# CC=cc
# CPP=/lib/cpp -P
# CFLAGS=-O
# LD=ld
# LINKFLAGS=

# RANLIB=ranlib
# AR=ar

# YACC=yacc
# PARSER=yacc
# LEX=lex
# LEXLIB=-ll
# LIBS= $(LEXLIB) -lm

# end	System specific suggested settings



#
# Custom settings
#
#	Here is the place to overide macro settings from above selectively.
#	You should uncomment one of the above sections and uncomment 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

# XVERSION =	X11R4
# 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
#


#
# LINKFLAGS are the final link options
#

# LINKFLAGS=

# 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



#
# This end the user configurable part of the Makefile.  You shouldn't
# have to change things past this point.
#

# =========================================================================

INSTALL	=	`pwd`/..

MACH_DEP_FLAGS=$(LINKFLAGS)

#
# X11 libraries
#

XLIBS	=	-L$(XLIB) \
		-lXt \
		-lXmu \
		-lXext \
		-lX11 


RCSRELEASE=REL2-1
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 \
			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

SUBDIR =        sys ss sim shell newconn $(OLDCONNDIR) \
		buffer concen device hh hines olf out segment \
                tools user pore convert $(DISKIODIR) $(KINETICSDIR) \
                Xodus
NXSUBDIR =	sys ss shell sim newconn oldconn \
		buffer concen device hh hines olf out segment \
                tools user pore convert $(DISKIODIR) $(KINETICSDIR)
MINSUBDIR =	sys ss shell sim

LIBLIST =	output \
		hh \
		devices \
		buffer \
		segment \
		user \
		xo \
		draw \
		widg \
		olf \
		tools \
		concen \
		hines \
		pore \
		newconn \
		$(DISKIOLIB) \
		$(OLDCONNLIB) \
		$(KINETICSLIB)

NXLIBLIST = 	output \
		hh \
		devices \
		buffer \
		segment \
		user \
		olf \
		tools \
		concen \
		hines \
		pore \
		newconn \
		$(DISKIOLIB) \
		$(OLDCONNLIB) \
		$(KINETICSLIB)

#
# all is now the default target
#

all: code_g default

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)" XVERSION="$(XVERSION)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER)" XLIBS="$(XLIBS)" XINCLUDE="$(XINCLUDE)" LIBS="$(LIBS)" MF="$(MF)" MACH_DEP_FLAGS_IN="$(MACH_DEP_FLAGS)" SUBDIR="$(SUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)" 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)" XVERSION="$(XVERSION)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER)" LIBS="$(LIBS)" MF="$(MF)" MACH_DEP_FLAGS_IN="$(MACH_DEP_FLAGS)" SUBDIR="$(SUBDIR)" NXSUBDIR="$(NXSUBDIR)" MINSUBDIR="$(MINSUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)"  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)" XVERSION="$(XVERSION)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER)" LIBS="$(LIBS)" MF="$(MF)" MACH_DEP_FLAGS_IN="$(MACH_DEP_FLAGS)"  SUBDIR="$(SUBDIR)" NXSUBDIR="$(NXSUBDIR)" MINSUBDIR="$(MINSUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)"  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)" XVERSION="$(XVERSION)" COPT="$(CFLAGS) $(CCTMPDIR) -D$(PARSER)" LIBS="$(LIBS)" MF="$(MF)" MACH_DEP_FLAGS_IN="$(MACH_DEP_FLAGS)"  SUBDIR="$(SUBDIR)" NXSUBDIR="$(NXSUBDIR)" MINSUBDIR="$(MINSUBDIR)" BASECODE="$(BASECODE)" OBJLIBS="$(OBJLIBS)"  code_g

nxall: code_g nxdefault

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)/lib/*)
	-(rm -rf $(INSTALL)/include/*)
	-(rm -rf $(INSTALL)/genesis)
	-(rm -rf $(INSTALL)/nxgenesis)
	-(rm -rf $(INSTALL)/mingenesis)
	-(rm -rf $(INSTALL)/convert)
	-(rm -rf $(INSTALL)/Scripts/X1compat/*)
	-(rm -rf $(INSTALL)/.*simrc)
	echo "Done with full clean"

clean:
	@make -f $(MF) MF="$(MF)" SUBDIR="$(SUBDIR)" RCSRELEASE="$(RCSRELEASE)" clean

rcsclean:
	@make -f $(MF) MF="$(MF)" SUBDIR="$(SUBDIR)" RCSRELEASE="$(RCSRELEASE)" rcsclean

install:
	@make -f $(MF) MF="$(MF)" INSTALL="$(INSTALL)" SUBDIR="$(SUBDIR)" RANLIB_IN="$(RANLIB)" install

nxinstall:
	@make -f $(MF) MF="$(MF)" INSTALL="$(INSTALL)" NXSUBDIR="$(NXSUBDIR)" RANLIB_IN="$(RANLIB)" nxinstall

mininstall:
	@make -f $(MF) MF="$(MF)" INSTALL="$(INSTALL)" MINSUBDIR="$(MINSUBDIR)" RANLIB_IN="$(RANLIB)" mininstall

# $Log: Makefile.dist,v $
# 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
#
