#!/bin/make
#
# (Gerneric calc makefile)
#
# Copyright (c) 1995 David I. Bell and Landon Curt Noll
# Permission is granted to use, distribute, or modify this source,
# provided that this copyright notice remains intact.
#
# Arbitrary precision calculator.
#
# calculator by David I. Bell with help/mods from others
# Makefile by Landon Curt Noll

##############################################################################
#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
##############################################################################

# Determine the type of terminal controls that you want to use
#
#	VARARG value	  meaning
#	------------	  -------
#	(nothing)	  let the makefile guess at what you need
#	-DUSE_TERMIOS	  use struct termios from <termios.h>
#	-DUSE_TERMIO 	  use struct termios from <termio.h>
#	-DUSE_SGTTY    	  use struct sgttyb from <sys/ioctl.h>
#
TERMCONTROL=
#TERMCONTROL= -DUSE_TERMIOS
#TERMCONTROL= -DUSE_TERMIO
#TERMCONTROL= -DUSE_SGTTY

# Determine the type of varargs that you want to use
#
#	VARARG value	  meaning
#	------------	  -------
#	(nothing)	  let the makefile guess at what you need
#	STDARG	    	  you have ANSI C and /usr/include/stdarg.h
#	VARARGS	    	  you have /usr/include/varargs.h
#	SIMULATE_STDARG   use simulated ./std_arg.h
#
# Try defining VARARG to be nothing.  The makefile will look for the
# needed .h files, trying for stdarg.h first.
#
VARARG=
#VARARG= STDARG
#VARARG= VARARGS
#VARARG= SIMULATE_STDARG

# If your system does not have a vsprintf() function, you could be in trouble.
#
#	vsprintf(stream, format, ap)
#
# This function works like sprintf except that the 3rd arg is a va_list
# strarg (or varargs) list.
#
# If you have vsprintf, then define DONT_HAVE_VSPRINTF to be an empty string.
# Some old systems do not have vsprintf().  If you do not have vsprintf()
# then define DONT_HAVE_VSPRINTF to be -DDONT_HAVE_VSPRINTF and hope for
# the best.
#
DONT_HAVE_VSPRINTF=
#DONT_HAVE_VSPRINTF= -DDONT_HAVE_VSPRINTF

# Determine the byte order of your machine
#
#    Big Endian:	Amdahl, 68k, Pyramid, Mips, Sparc, ...
#    Little Endian:	Vax, 32k, Spim (Dec Mips), i386, i486, ...
#
# If in doubt, leave BYTE_ORDER empty.  This makefile will attempt to
# use BYTE_ORDER in <machine/endian.h> or it will attempt to run
# the endian program.  If you get syntax errors when you compile,
# try forcing the value to be BIG_ENDIAN and run the calc regression
# tests. (see the README file)  If the calc regression tests fail, do
# a make clobber and try LITTLE_ENDIAN.  If that fails, ask a wizard
# for help.
#
BYTE_ORDER=
#BYTE_ORDER= BIG_ENDIAN
#BYTE_ORDER= LITTLE_ENDIAN

# Determine the number of bits in a long
#
# If in doubt, leave LONG_BITS empty.  This makefile will run
# the longbits program to determine the length.
#
LONG_BITS=
#LONG_BITS= 32
#LONG_BITS= 64

# Determine if your compiler supports the long long type and if so, its length
#
# If LONGLONG_BITS is set to nothing, the Makefile will run the longlong
# program to determine if it supports them and if so, their length.
# To disable the use of long longs, set LONGLONG_BITS to 0.
# One may hard code the length of a long long by setting LONGLONG_BITS
# to a non-zero value.
#
# On some machines, using long longs will make the cpu intensive
# jobs run faster.  On others, using long longs make things slower.
# On some systems, the regression test runs slower while cpu bound
# jobs run faster.  On others, the reverse is true.
#
# If in doubt, set LONGLONG_BITS to 0.
#
LONGLONG_BITS= 0
#LONGLONG_BITS=
#LONGLONG_BITS= 64

# Determine if we have the ANSI C fgetpos and fsetpos alternate interface
# to the ftell() and fseek() (with whence set to SEEK_SET) functions.
#
# If HAVE_FPOS is empty, this makefile will run the have_fpos program
# to determine if there is are fgetpos and fsetpos functions.  If HAVE_FPOS
# is set to -DHAVE_NO_FPOS, then calc will use ftell() and fseek().
#
# If in doubt, leave HAVE_FPOS empty.
#
HAVE_FPOS=
#HAVE_FPOS= -DHAVE_NO_FPOS

# Determine whether to use the standard malloc or the alternative one
# included with the calculator.  On some machines, the alternative malloc
# may be faster.  It also can help to debug malloc problems.
#
# Define MALLOC to be -DCALC_MALLOC to use the internal malloc routines.
#
# If in doubt, leave MALLOC empty.
#
MALLOC=
#MALLOC= -DCALC_MALLOC

# where to install binary files
#
BINDIR= /usr/local/bin
#BINDIR= /usr/bin
#BINDIR= /usr/contrib/bin

# where to install the *.cal, *.h and *.a files
#
# ${TOPDIR} is the directory under which the calc directory will be placed.
# ${LIBDIR} is where the *.cal, *.h, *.a, bindings and help dir are installed.
# ${HELPDIR} is where the help directory is installed.
#
TOPDIR= /usr/local/lib
#TOPDIR= /usr/lib
#TOPDIR= /usr/libdata
#TOPDIR= /usr/contrib/lib

LIBDIR= ${TOPDIR}/calc
HELPDIR= ${LIBDIR}/help

# where man pages are installed
#
# Use MANDIR= to disable installation of the calc man (source) page.
#
MANDIR=
#MANDIR=/usr/local/man/man1
#MANDIR=/usr/man/man1
#MANDIR=/usr/share/man/man1
#MANDIR=/usr/man/u_man/man1
#MANDIR=/usr/contrib/man/man1

# where cat (formatted man) pages are installed
#
# Use CATDIR= to disable installation of the calc cat (formatted) page.
#
CATDIR=
#CATDIR=/usr/local/man/cat1
#CATDIR=/usr/man/cat1
#CATDIR=/usr/share/man/cat1
#CATDIR=/usr/man/u_man/cat1
#CATDIR=/usr/contrib/man/cat1

# extenstion to add on to the calc man page filename
#
# This is ignored if CATDIR is empty.
#
MANEXT= 1
#MANEXT= l

# extenstion to add on to the calc man page filename
#
# This is ignored if CATDIR is empty.
#
CATEXT= 1
#CATEXT= 0
#CATEXT= l

# how to format a man page
#
# We will execute ${NROFF} ${NROFF_ARG} calc.1 to format the calc man page.
#
# This is ignored if CATDIR is empty.
NROFF= nroff
#NROFF= groff
NROFF_ARG = -man
#NROFF_ARG = -mandoc

# If the $CALCPATH environment variable is not defined, then the following
# path will be search for calc lib routines.
#
CALCPATH= .:./lib:~/lib:${LIBDIR}

# If the $CALCRC environment variable is not defined, then the following
# path will be search for calc lib routines.
#
CALCRC= ${LIBDIR}/startup:~/.calcrc

# If the $CALCBINDINGS environment variable is not defined, then the following
# file will be used for the command line and edit history key bindings.
#
#CALCBINDINGS= ${LIBDIR}/bindings
CALCBINDINGS= ${LIBDIR}/altbind

# If $PAGER is not set, use this program to display a help file
#
CALCPAGER= more
#CALCPAGER= pg
#CALCPAGER= cat
#CALCPAGER= less

# Compile/Debug options for ${CC} and ${LD}
#
#DEBUG= -O
DEBUG= -O2
#DEBUG= -O3
#DEBUG= -g
#DEBUG= -g -O
#DEBUG= -g -O2
#DEBUG= -g -O3
#DEBUG= -gx
#DEBUG= -WM,-g
#DEBUG=

# On systems that have dynamic shared libs, you want want to disable them
# for faster calc startup.
#
NO_SHARED=
#NO_SHARED= -dn

# If you are running an an old BSD system, then you may not have
# the following functions:
#
#	memcpy()	strchr()	memset()
#
# If you do not have these functions, define OLD_BSD to be -DOLD_BSD,
# otherwise define OLD_BSD to be an empty string.
#
# Modern BSD and BSD-like systems have these functions and thus don't
# need OLD_BSD.  If you don't know, try using the empty string and if
# you get complaints, try -DOLD_BSD.
#
OLD_BSD=
#OLD_BSD= -DOLD_BSD

# Some old systems don't know what a uid_t is.  Define UID_T if you get
# an error regarding 'uid_t' when compiling files such as calc.c
#
UID_T=
#UID_T= -DUID_T

# Some systems require one to use ranlib to add a symbol table to
# a *.a library.  Set RANLIB to the utility that performs this action.
# Set RANLIB to : if your system does not need such a utility.
#
#RANLIB=ranlib
RANLIB=:

# Some systems are able to form lint libs.  How it is formed depends
# on your system.  If you do not care about lint, use : as the
# LINTLIB value.
#
#    System type    LINTLIB recomendation
#
#	BSD	    ${LINT} ${LCFLAGS} ${LINTFLAGS} -u -Ccalc
#	SYSV	    ${LINT} ${LCFLAGS} ${LINTFLAGS} -u -o calc
#	disable     :
#
LINTLIB= ${LINT} ${LCFLAGS} ${LINTFLAGS} -u -Ccalc
#LINTLIB= ${LINT} ${LCFLAGS} ${LINTFLAGS} -u -o calc
#LINTLIB= :

# The lint flags vary from system to system.  Some systems have the
# opposite meaning for the flags below.  Other systems change flag
# meaning altogether.
#
#       System    LINTFLAGS recomendation
#
#	SunOs	  -a -h -v -z
#
LINTFLAGS= -a -h -v -z
#LINTFLAGS=

# Select your compiler type
#
# LCFLAGS are flags that both ${CC} and ${LINT} can use
# LDFLAGS are flags that both ${CC} amd ${LD} can use
# CCMAIN are flags for ${CC} when compiling only files with main()
# CCOPT ate flags for ${CC} only
# CFLAGS are the default flags given to ${CC}
#
# If you do not wish to use purify, leave ${PURIFY} commented out.
#
#PURIFY= /u2/purify/purify -logfile=pure.out
#PURIFY= /u2/purify/purify
#
###
#
# common cc
#
#LCFLAGS= ${MALLOC} ${OLD_BSD} ${DONT_HAVE_VSPRINTF} ${UID_T}
#LDFLAGS= ${DEBUG}
#CCMAIN=
#CCOPT=
#CFLAGS= ${CCOPT} ${LDFLAGS} ${LCFLAGS}
#CC= ${PURIFY} cc
#
# for RS6000 cc
#
#LCFLAGS= ${MALLOC} ${OLD_BSD} ${DONT_HAVE_VSPRINTF} ${UID_T}
#LDFLAGS= ${DEBUG}
#CCMAIN=
#CCOPT=
#CFLAGS= ${CCOPT} ${LDFLAGS} ${LCFLAGS} -qlanglvl=ansi
#CC= ${PURIFY} cc
#
# for gcc1	(some systems call it gcc, some call it gcc1)
#
#LCFLAGS= ${MALLOC} ${OLD_BSD} ${DONT_HAVE_VSPRINTF} ${UID_T}
#LDFLAGS= ${DEBUG}
#CCMAIN=
#CCOPT= -Wall
#CFLAGS= ${CCOPT} ${LDFLAGS} ${LCFLAGS} -ansi
#CC= ${PURIFY} gcc
#CC= ${PURIFY} gcc1
#
# for gcc2	(some systems call it gcc, some call it gcc2)
#
LCFLAGS= ${MALLOC} ${OLD_BSD} ${DONT_HAVE_VSPRINTF} ${UID_T}
LDFLAGS= ${DEBUG}
CCMAIN= -Wno-return-type
CCOPT= -Wall -Wno-implicit -Wno-comment
CFLAGS= ${CCOPT} ${LDFLAGS} ${LCFLAGS} -ansi
CC= ${PURIFY} gcc
#CC= ${PURIFY} gcc2

##############################################################################
#-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-#
##############################################################################

# standard utilities used during make
#
SHELL= /bin/sh
MAKE= make
SED= sed
TEE= tee
LINT= lint
CTAGS= ctags
LD= ${CC}

#
# the source files which are built into a math library
#
LIBSRC = alloc.c comfunc.c commath.c jump.c math_error.c pix.c prime.c \
	qfunc.c qio.c qmath.c qmod.c qtrans.c zfunc.c zio.c zmath.c zmod.c \
	zmul.c zprime.c zrand.c

#
# the object files which are built into a math library
#
LIBOBJS = alloc.o comfunc.o commath.o jump.o math_error.o pix.o prime.o \
	qfunc.o qio.o qmath.o qmod.o qtrans.o zfunc.o zio.o zmath.o zmod.o \
	zmul.o zprime.o zrand.o

#
# the calculator source files
#
CALCSRC = addop.c assocfunc.c calc.c codegen.c config.c const.c file.c \
	fnvhash.c func.c hist.c input.c label.c listfunc.c matfunc.c obj.c \
	opcodes.c string.c symbol.c token.c value.c version.c

#
# we build these .o files for calc
#
CALCOBJS = addop.o assocfunc.o calc.o codegen.o config.o const.o file.o \
	fnvhash.o func.o hist.o input.o label.o listfunc.o matfunc.o obj.o \
	opcodes.o string.o symbol.o token.o value.o version.o

# we build these .h files during the make
#
BUILD_H_SRC= args.h config.h endian_calc.h have_malloc.h have_stdlib.h \
	have_string.h longbits.h terminal.h longlong.h have_fpos.h fposval.h

# these .h files are needed by programs that use libcalc.a
#
LIB_H_SRC= ${BUILD_H_SRC} alloc.h cmath.h jump.h prime.h qmath.h std_arg.h \
	zmath.h qmath.h zmath.h zrand.h

# these .h files are neither built, nor required by libcalc.a
#
CALC_H_SRC= calc.h config.h func.h hist.h label.h opcodes.h std_arg.h \
	string.h symbol.h terminal.h token.h value.h

# there are the complete list of .h files
#
H_SRC = ${CALC_H_SRC} ${LIB_H_SRC}


all: calc calc.1

calc: libcalc.a ${CALCOBJS}
	${LD} ${LDFLAGS} ${CALCOBJS} libcalc.a -o calc ${NO_SHARED}

calc.o: calc.c
	${CC} ${CFLAGS} ${CCMAIN} -c calc.c

hsrc: ${BUILD_H_SRC}

hist.o: hist.c Makefile
	${CC} ${CFLAGS} ${TERMCONTROL} -c hist.c

libcalc.a: ${LIBOBJS} Makefile
	rm -f libcalc.a
	ar qc libcalc.a ${LIBOBJS}
	${RANLIB} libcalc.a

endian: endian.c
	-@rm -f endian.o endian
	${CC} ${CFLAGS} ${CCMAIN} endian.c -o endian ${NO_SHARED}

longbits: longbits.c
	-@rm -f longbits.o longbits
	${CC} ${CFLAGS} ${CCMAIN} longbits.c -o longbits ${NO_SHARED}

config.h: Makefile
	@rm -f config.h
	@echo 'forming config.h'
	@echo '/*' > config.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> config.h
	@echo ' */' >> config.h
	@echo '' >> config.h
	@echo '#if !defined(_CONFIG_H_)' >> config.h
	@echo '#define _CONFIG_H_' >> config.h
	@echo '' >> config.h
	@echo '/* the default :-separated search path */' >> config.h
	@echo '#ifndef DEFAULTCALCPATH' >> config.h
	@echo '#define DEFAULTCALCPATH "${CALCPATH}"' >> config.h
	@echo '#endif /* DEFAULTCALCPATH */' >> config.h
	@echo '' >> config.h
	@echo '/* the default :-separated startup file list */' >> config.h
	@echo '#ifndef DEFAULTCALCRC' >> config.h
	@echo '#define DEFAULTCALCRC "${CALCRC}"' >> config.h
	@echo '#endif /* DEFAULTCALCRC */' >> config.h
	@echo '' >> config.h
	@echo '/* the default key bindings file */' >> config.h
	@echo '#ifndef DEFAULTCALCBINDINGS' >> config.h
	@echo '#define DEFAULTCALCBINDINGS "${CALCBINDINGS}"' >> config.h
	@echo '#endif /* DEFAULTCALCBINDINGS */' >> config.h
	@echo '' >> config.h
	@echo '/* the location of the help directory */' >> config.h
	@echo '#ifndef HELPDIR' >> config.h
	@echo '#define HELPDIR "${HELPDIR}"' >> config.h
	@echo '#endif /* HELPDIR */' >> config.h
	@echo '' >> config.h
	@echo '/* the default pager to use */' >> config.h
	@echo '#ifndef DEFAULTCALCPAGER' >> config.h
	@echo '#define DEFAULTCALCPAGER "${CALCPAGER}"' >> config.h
	@echo '#endif /* DEFAULTCALCPAGER */' >> config.h
	@echo '' >> config.h
	@echo '#endif /* _CONFIG_H_ */' >> config.h
	@echo 'config.h formed'

endian_calc.h: endian Makefile
	@rm -f endian_calc.h
	@echo 'forming endian_calc.h'
	@echo '/*' > endian_calc.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> endian_calc.h
	@echo ' */' >> endian_calc.h
	@echo '' >> endian_calc.h
	@echo '#if !defined(_ENDIAN_CALC_H_)' >> endian_calc.h
	@echo '#define _ENDIAN_CALC_H_' >> endian_calc.h
	@echo '' >> endian_calc.h
	@echo '/* what byte order are we? */' >> endian_calc.h
	-@if [ X"${BYTE_ORDER}" = X ]; then \
		if [ -f /usr/include/machine/endian.h ]; then \
			echo '#include <machine/endian.h>' >> endian_calc.h; \
		else \
			./endian >> endian_calc.h; \
		fi; \
	else \
	    echo "#define BYTE_ORDER ${BYTE_ORDER}" >> endian_calc.h; \
	fi
	@echo '' >> endian_calc.h
	@echo '#endif /* _ENDIAN_CALC_H_ */' >> endian_calc.h
	@echo 'endian_calc.h formed'

longbits.h: longbits
	@rm -f longbits.h
	@echo 'forming longbits.h'
	@echo '/*' > longbits.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> longbits.h
	@echo ' */' >> longbits.h
	@echo '' >> longbits.h
	@echo '#if !defined(_LONGBITS_H_)' >> longbits.h
	@echo '#define _LONGBITS_H_' >> longbits.h
	@echo '' >> longbits.h
	-@if [ X"${LONG_BITS}" = X ]; then \
		./longbits >> longbits.h; \
	else \
		echo "#define LONG_BITS ${LONG_BITS}" >> longbits.h; \
	fi
	@echo '' >> longbits.h
	@echo '#endif /* _LONGBITS_H_ */' >> longbits.h
	@echo 'longbits.h formed'

have_malloc.h: Makefile
	@rm -f have_malloc.h
	@echo 'forming have_malloc.h'
	@echo '/*' > have_malloc.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> have_malloc.h
	@echo ' */' >> have_malloc.h
	@echo '' >> have_malloc.h
	@echo '#if !defined(_HAVE_MALLOC_H_)' >> have_malloc.h
	@echo '#define _HAVE_MALLOC_H_' >> have_malloc.h
	@echo '' >> have_malloc.h
	@echo '/* do we have /usr/include/malloc.h? */' >> have_malloc.h
	-@if [ -f /usr/include/malloc.h ]; then \
		echo '#define HAVE_MALLOC_H  /* yes */' >> have_malloc.h; \
	else \
		echo '#undef HAVE_MALLOC_H  /* no */' >> have_malloc.h; \
	fi
	@echo '' >> have_malloc.h
	@echo '#endif /* _HAVE_MALLOC_H_ */' >> have_malloc.h
	@echo 'have_malloc.h formed'

have_stdlib.h: Makefile
	@rm -f have_stdlib.h
	@echo 'forming have_stdlib.h'
	@echo '/*' > have_stdlib.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> have_stdlib.h
	@echo ' */' >> have_stdlib.h
	@echo '' >> have_stdlib.h
	@echo '#if !defined(_HAVE_STDLIB_H_)' >> have_stdlib.h
	@echo '#define _HAVE_STDLIB_H_' >> have_stdlib.h
	@echo '' >> have_stdlib.h
	@echo '/* do we have /usr/include/stdlib.h? */' >> have_stdlib.h
	-@if [ -f /usr/include/stdlib.h ]; then \
		echo '#define HAVE_STDLIB_H  /* yes */' >> have_stdlib.h; \
	else \
		echo '#undef HAVE_STDLIB_H  /* no */' >> have_stdlib.h; \
	fi
	@echo '' >> have_stdlib.h
	@echo '#endif /* _HAVE_STDLIB_H_ */' >> have_stdlib.h
	@echo 'have_stdlib.h formed'

have_string.h: Makefile
	@rm -f have_string.h
	@echo 'forming have_string.h'
	@echo '/*' > have_string.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> have_string.h
	@echo ' */' >> have_string.h
	@echo '' >> have_string.h
	@echo '#if !defined(_HAVE_STRING_H_)' >> have_string.h
	@echo '#define _HAVE_STRING_H_' >> have_string.h
	@echo '' >> have_string.h
	@echo '/* do we have /usr/include/string.h? */' >> have_string.h
	-@if [ -f /usr/include/string.h ]; then \
		echo '#define HAVE_STRING_H  /* yes */' >> have_string.h; \
	else \
		echo '#undef HAVE_STRING_H  /* no */' >> have_string.h; \
	fi
	@echo '' >> have_string.h
	@echo '#endif /* _HAVE_STRING_H_ */' >> have_string.h
	@echo 'have_string.h formed'

terminal.h: Makefile
	@rm -f terminal.h
	@echo 'forming terminal.h'
	@echo '/*' > terminal.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> terminal.h
	@echo ' */' >> terminal.h
	@echo '' >> terminal.h
	@echo '#if !defined(_TERMINAL_H_)' >> terminal.h
	@echo '#define _TERMINAL_H_' >> terminal.h
	@echo '' >> terminal.h
	@echo '/* determine the type of terminal interface */' >> terminal.h
	@echo '#if !defined(USE_TERMIOS)' >> terminal.h
	@echo '#if !defined(USE_TERMIO)' >> terminal.h
	@echo '#if !defined(USE_SGTTY)' >> terminal.h
	-@if [ -f /usr/include/termios.h ]; then \
		echo '#define USE_TERMIOS  /* <termios.h> */' >> terminal.h; \
		echo '#undef USE_TERMIO    /* <termio.h> */' >> terminal.h; \
		echo '#undef USE_SGTTY     /* <sys/ioctl.h> */' >> terminal.h; \
	elif [ -f /usr/include/termio.h ]; then \
		echo '#undef USE_TERMIOS   /* <termios.h> */' >> terminal.h; \
		echo '#define USE_TERMIO   /* <termio.h> */' >> terminal.h; \
		echo '#undef USE_SGTTY     /* <sys/ioctl.h> */' >> terminal.h; \
	else \
		echo '#undef USE_TERMIOS   /* <termios.h> */' >> terminal.h; \
		echo '#undef USE_TERMIO    /* <termio.h> */' >> terminal.h; \
		echo '#define USE_SGTTY    /* <sys/ioctl.h> */' >> terminal.h; \
	fi
	@echo '#endif' >> terminal.h
	@echo '#endif' >> terminal.h
	@echo '#endif' >> terminal.h
	@echo '' >> terminal.h
	@echo '#endif /* _TERMINAL_H_ */' >> terminal.h
	@echo 'terminal.h formed'

args.h: try_stdarg.c Makefile
	@rm -f args.h try_stdarg try_stdarg.o
	@echo 'forming args.h'
	@echo '/*' > args.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> args.h
	@echo ' */' >> args.h
	@echo '' >> args.h
	@echo '#if !defined(_ARGS_H_)' >> args.h
	@echo '#define _ARGS_H_' >> args.h
	@echo '' >> args.h
	@echo '/* what sort of variable args do we have? */' >> args.h
	-@if [ ! -z "${VARARG}" ]; then \
		echo '#define ${VARARG}' >> args.h; \
	elif [ -f /usr/include/stdarg.h -a -f /usr/include/varargs.h ]; then \
		${CC} ${CFLAGS} ${CCMAIN} try_stdarg.c -o try_stdarg; \
		if ./try_stdarg; then \
		    echo '#define STDARG' >> args.h; \
		else \
		    echo '#define VARARGS' >> args.h; \
		fi; \
		rm -f try_stdarg try_stdarg.o core core.try_stdarg; \
	elif [ -f /usr/include/stdarg.h ]; then \
		echo '#define STDARG' >> args.h; \
	elif [ -f /usr/include/varargs.h ]; then \
		echo '#define VARARGS' >> args.h; \
	else \
		echo '#define SIMULATE_STDARG' >> args.h; \
	fi
	@echo '' >> args.h
	@echo '#endif /* _ARGS_H_ */' >> args.h
	@echo 'args.h formed'

longlong.h: longlong.c Makefile
	@rm -f longlong longlong.o tmp_ll longlong.h
	@echo 'forming longlong.h'
	@echo '/*' > longlong.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> longlong.h
	@echo ' */' >> longlong.h
	@echo '' >> longlong.h
	@echo '#if !defined(_LONGLONG_H_)' >> longlong.h
	@echo '#define _LONGLONG_H_' >> longlong.h
	@echo '' >> longlong.h
	@echo '/* do we have or want to use a long long type? */' >> longlong.h
	-@${CC} ${CFLAGS} ${CCMAIN} longlong.c -o longlong 2>/dev/null
	-@./longlong ${LONGLONG_BITS} > tmp_ll 2>/dev/null
	-@if [ -s tmp_ll ]; then \
		cat tmp_ll >> longlong.h; \
	else \
		echo '#undef HAVE_LONGLONG' >> longlong.h; \
		echo '#define LONGLONG_BITS 0  /* no */' >> longlong.h; \
		echo '' >> longlong.h; \
		echo '/* how to form constants */' >> longlong.h; \
		echo '#if defined(__STDC__) && __STDC__ != 0' >> longlong.h; \
		echo '#define U(x) x ## UL' >> longlong.h; \
		echo '#define L(x) x ## L' >> longlong.h; \
		echo '#else' >> longlong.h; \
		echo '#define U(x) x/**/UL' >> longlong.h; \
		echo '#define L(x) x/**/L' >> longlong.h; \
		echo '#endif' >> longlong.h; \
	fi
	@echo '' >> longlong.h
	@echo '#endif /* _LONGLONG_H_ */' >> longlong.h
	@rm -f longlong longlong.o tmp_ll
	@echo 'longlong.h formed'

have_fpos.h: have_fpos.c Makefile
	@rm -f have_fpos have_fpos.o tmp_have_fpos have_fpos.h
	@echo 'forming have_fpos.h'
	@echo '/*' > have_fpos.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> have_fpos.h
	@echo ' */' >> have_fpos.h
	@echo '' >> have_fpos.h
	@echo '#if !defined(_HAVE_FPOS_H_)' >> have_fpos.h
	@echo '#define _HAVE_FPOS_H_' >> have_fpos.h
	@echo '' >> have_fpos.h
	@echo '/* do we have fgetpos and fsetpos functions? */' >> have_fpos.h
	-@${CC} ${CFLAGS} ${HAVE_FPOS} ${CCMAIN} \
		have_fpos.c -o have_fpos 2>/dev/null
	-@./have_fpos > tmp_have_fpos 2>/dev/null
	-@if [ -s tmp_have_fpos ]; then \
		cat tmp_have_fpos >> have_fpos.h; \
	else \
		echo '#undef HAVE_FPOS  /* no */' >> have_fpos.h; \
		echo '' >> have_fpos.h; \
		echo 'typedef long FILEPOS;' >> have_fpos.h; \
	fi
	@echo '' >> have_fpos.h
	@echo '#endif /* _HAVE_FPOS_H_ */' >> have_fpos.h
	@rm -f have_fpos have_fpos.o tmp_have_fpos
	@echo 'have_fpos.h formed'

fposval.h: fposval.c have_fpos.h endian_calc.h Makefile
	@rm -f tmp_fposval fposval fposval.o fposval.h
	@echo 'forming fposval.h'
	@echo '/*' > fposval.h
	@echo ' * DO NOT EDIT -- generated by the Makefile' >> fposval.h
	@echo ' */' >> fposval.h
	@echo '' >> fposval.h
	@echo '#if !defined(_FPOSVAL_H_)' >> fposval.h
	@echo '#define _FPOSVAL_H_' >> fposval.h
	@echo '' >> fposval.h
	@echo '/* what are our file position & size types like? */' >> fposval.h
	@${CC} ${CFLAGS} ${CCMAIN} fposval.c -o fposval
	-@./fposval tmp_fposval >> fposval.h 2>/dev/null
	@echo '' >> fposval.h
	@echo '#endif /* _FPOSVAL_H_ */' >> fposval.h
	@rm -f fposval fposval.o tmp_fposval
	@echo 'fposval.h formed'

calc.1: calc.man Makefile
	rm -f calc.1
	${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' < calc.man > calc.1

# The BSDI cdrom makefile expects certain files to be pre-built in a sub-dir
# called gen_h.  This rule creats this sub-directory so that the release can
# be shipped off to BSDI.  You can ignore this rule.
#
bsdi: ${LIB_H_SRC} calc.1
	-@if [ ! -d gen_h ]; then \
		echo mkdir gen_h; \
		mkdir gen_h; \
	fi
	@for i in ${LIB_H_SRC}; do \
		echo rm -f gen_h/$$i; \
		rm -f gen_h/$$i; \
		echo cp $$i gen_h; \
		cp $$i gen_h; \
		echo chmod 0444 gen_h/$$i; \
		chmod 0444 gen_h/$$i; \
	done
	cd help; ${MAKE} -f Makefile LIBDIR=${LIBDIR} HELPDIR=${HELPDIR} bsdi

llib-lcalc.ln: ${BUILD_H_SRC} ${LIBSRC} Makefile
	rm -f llib-lcalc.ln llib.out
	-touch llib-lcalc.ln
	${LINTLIB} ${LIBSRC} 2>&1 | ${SED} -f lint.sed | ${TEE} llib.out

lint: ${BUILD_H_SRC} ${CALCSRC} llib-lcalc.ln lint.sed Makefile
	rm -f lint.out
	${LINT} ${LINTFLAGS} ${LCFLAGS} llib-lcalc.ln ${CALCSRC} 2>&1 | \
	    ${SED} -f lint.sed | ${TEE} lint.out

tags: ${CALCSRC} ${LIBSRC} ${H_SRC} Makefile
	${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC}

check: calc ./lib/regress.cal ./lib/lucas.cal ./lib/lucas_chk.cal \
	./lib/test1700.cal ./lib/surd.cal
	CALCPATH="./lib" ./calc -q read regress

lintclean:
	rm -f llib-lcalc.ln llib.out lint.out

clean:
	rm -f ${LIBOBJS} ${CALCOBJS} ${CODEOBJS}
	rm -f endian.o try_stdarg.o try_stdarg
	rm -f tmp_fposval fposval.o fposval
	rm -f tmp_ll longlong.o longlong
	rm -f tmp_have_fpos have_fpos.o have_fpos
	cd help; ${MAKE} -f Makefile LIBDIR=${LIBDIR} HELPDIR=${HELPDIR} clean
	cd lib; ${MAKE} -f Makefile LIBDIR=${LIBDIR} clean

clobber: lintclean
	rm -f ${LIBOBJS} ${CALCOBJS} ${CODEOBJS}
	rm -f tags calc libcalc.a
	rm -f ${BUILD_H_SRC} calc.1 endian longbits
	rm -f *_pure_*.[oa]
	rm -f *.pure_hardlink *.pure_linkinfo
	rm -rf gen_h
	cd help; ${MAKE} -f Makefile LIBDIR=${LIBDIR} HELPDIR=${HELPDIR} clobber
	cd lib; ${MAKE} -f Makefile LIBDIR=${LIBDIR} clobber
	@: get rid of files that are obsolete
	@rm -f endian.h stdarg.h libcalcerr.a lib/obj help/obj

install: calc libcalc.a ${LIB_H_SRC} calc.1
	-@if [ ! -d ${LIBDIR} ]; then \
		echo mkdir ${LIBDIR}; \
		mkdir ${LIBDIR}; \
	fi
	-chmod 0755 ${LIBDIR}
	-@if [ ! -d ${HELPDIR} ]; then \
		echo mkdir ${HELPDIR}; \
		mkdir ${HELPDIR}; \
	fi
	-chmod 0755 ${HELPDIR}
	-@if [ ! -d ${BINDIR} ]; then \
		echo mkdir ${BINDIR}; \
		mkdir ${BINDIR}; \
	fi
	-chmod 0755 ${BINDIR}
	rm -f ${BINDIR}/calc
	cp calc ${BINDIR}
	-chmod 0555 ${BINDIR}/calc
	cd help; ${MAKE} -f Makefile \
	    LIBDIR=${LIBDIR} HELPDIR=${HELPDIR} install
	cd lib; ${MAKE} -f Makefile LIBDIR=${LIBDIR} install
	rm -f ${LIBDIR}/libcalc.a
	cp libcalc.a ${LIBDIR}/libcalc.a
	-chmod 0644 ${LIBDIR}/libcalc.a
	${RANLIB} ${LIBDIR}/libcalc.a
	@for i in ${LIB_H_SRC}; do \
		echo rm -f ${LIBDIR}/$$i; \
		rm -f ${LIBDIR}/$$i; \
		echo cp $$i ${LIBDIR}; \
		cp $$i ${LIBDIR}; \
		echo chmod 0444 ${LIBDIR}/$$i; \
		chmod 0444 ${LIBDIR}/$$i; \
	done
	@: If lint was made, install the lint library.
	-@if [ -f llib-lcalc.ln ]; then \
		echo rm -f ${LIBDIR}/llib-lcalc.ln; \
		rm -f ${LIBDIR}/llib-lcalc.ln; \
		echo cp llib-lcalc.ln ${LIBDIR}; \
		cp llib-lcalc.ln ${LIBDIR}; \
		echo chmod 0444 ${LIBDIR}/llib-lcalc.ln; \
		chmod 0444 ${LIBDIR}/llib-lcalc.ln; \
	fi
	-@if [ -z "${MANDIR}" ]; then \
	    echo "calc man page not installed, $${MANDIR} is empty"; \
	else \
	    echo "rm -f ${MANDIR}/calc.${MANEXT}"; \
	    rm -f ${MANDIR}/calc.${MANEXT}; \
	    echo "cp calc.1 ${MANDIR}/calc.${MANEXT}"; \
	    cp calc.1 ${MANDIR}/calc.${MANEXT}; \
	    echo "chmod 0444 ${MANDIR}/calc.${MANEXT}"; \
	    chmod 0444 ${MANDIR}/calc.${MANEXT}; \
	fi
	-@if [ -z "${CATDIR}" ]; then \
	    echo "calc cat page not installed, $${CATDIR} is empty"; \
	else \
	    echo "rm -f ${CATDIR}/calc.${CATEXT}"; \
	    rm -f ${CATDIR}/calc.${CATEXT}; \
	    echo "${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT}"; \
	    ${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT}; \
	    echo "chmod 0444 ${CATDIR}/calc.${CATEXT}"; \
	    chmod 0444 ${CATDIR}/calc.${CATEXT}; \
	fi
	@: get rid of files that are obsolete
	@rm -f ${LIBDIR}/endian.h ${LIBDIR}/stdarg.h endian.h stdarg.h
	@rm -f ${LIBDIR}/libcalcerr.a libcalcerr.a

# make depend stuff
#
addop.o: addop.c
addop.o: alloc.h
addop.o: calc.h
addop.o: cmath.h
addop.o: endian_calc.h
addop.o: func.h
addop.o: have_malloc.h
addop.o: have_stdlib.h
addop.o: have_string.h
addop.o: label.h
addop.o: longbits.h
addop.o: longlong.h
addop.o: opcodes.h
addop.o: qmath.h
addop.o: string.h
addop.o: symbol.h
addop.o: token.h
addop.o: value.h
addop.o: zmath.h
alloc.o: alloc.c
alloc.o: alloc.h
alloc.o: have_malloc.h
alloc.o: have_stdlib.h
alloc.o: have_string.h
assocfunc.o: alloc.h
assocfunc.o: assocfunc.c
assocfunc.o: cmath.h
assocfunc.o: endian_calc.h
assocfunc.o: have_malloc.h
assocfunc.o: have_stdlib.h
assocfunc.o: have_string.h
assocfunc.o: longbits.h
assocfunc.o: longlong.h
assocfunc.o: qmath.h
assocfunc.o: value.h
assocfunc.o: zmath.h
calc.o: alloc.h
calc.o: calc.c
calc.o: calc.h
calc.o: cmath.h
calc.o: config.h
calc.o: endian_calc.h
calc.o: func.h
calc.o: have_malloc.h
calc.o: have_stdlib.h
calc.o: have_string.h
calc.o: hist.h
calc.o: label.h
calc.o: longbits.h
calc.o: longlong.h
calc.o: opcodes.h
calc.o: qmath.h
calc.o: symbol.h
calc.o: token.h
calc.o: value.h
calc.o: zmath.h
codegen.o: alloc.h
codegen.o: calc.h
codegen.o: cmath.h
codegen.o: codegen.c
codegen.o: config.h
codegen.o: endian_calc.h
codegen.o: func.h
codegen.o: have_malloc.h
codegen.o: have_stdlib.h
codegen.o: have_string.h
codegen.o: label.h
codegen.o: longbits.h
codegen.o: longlong.h
codegen.o: opcodes.h
codegen.o: qmath.h
codegen.o: string.h
codegen.o: symbol.h
codegen.o: token.h
codegen.o: value.h
codegen.o: zmath.h
comfunc.o: alloc.h
comfunc.o: cmath.h
comfunc.o: comfunc.c
comfunc.o: endian_calc.h
comfunc.o: have_malloc.h
comfunc.o: have_stdlib.h
comfunc.o: have_string.h
comfunc.o: longbits.h
comfunc.o: longlong.h
comfunc.o: qmath.h
comfunc.o: zmath.h
commath.o: alloc.h
commath.o: cmath.h
commath.o: commath.c
commath.o: endian_calc.h
commath.o: have_malloc.h
commath.o: have_stdlib.h
commath.o: have_string.h
commath.o: longbits.h
commath.o: longlong.h
commath.o: qmath.h
commath.o: zmath.h
config.o: alloc.h
config.o: calc.h
config.o: cmath.h
config.o: config.c
config.o: endian_calc.h
config.o: have_malloc.h
config.o: have_stdlib.h
config.o: have_string.h
config.o: longbits.h
config.o: longlong.h
config.o: qmath.h
config.o: value.h
config.o: zmath.h
const.o: alloc.h
const.o: calc.h
const.o: cmath.h
const.o: const.c
const.o: endian_calc.h
const.o: have_malloc.h
const.o: have_stdlib.h
const.o: have_string.h
const.o: longbits.h
const.o: longlong.h
const.o: qmath.h
const.o: value.h
const.o: zmath.h
file.o: alloc.h
file.o: args.h
file.o: calc.h
file.o: cmath.h
file.o: endian_calc.h
file.o: file.c
file.o: fposval.h
file.o: have_fpos.h
file.o: have_malloc.h
file.o: have_stdlib.h
file.o: have_string.h
file.o: longbits.h
file.o: longlong.h
file.o: qmath.h
file.o: std_arg.h
file.o: value.h
file.o: zmath.h
fnvhash.o: alloc.h
fnvhash.o: cmath.h
fnvhash.o: endian_calc.h
fnvhash.o: fnvhash.c
fnvhash.o: have_malloc.h
fnvhash.o: have_stdlib.h
fnvhash.o: have_string.h
fnvhash.o: longbits.h
fnvhash.o: longlong.h
fnvhash.o: qmath.h
fnvhash.o: value.h
fnvhash.o: zmath.h
fnvhash.o: zrand.h
func.o: alloc.h
func.o: calc.h
func.o: cmath.h
func.o: endian_calc.h
func.o: func.c
func.o: func.h
func.o: have_malloc.h
func.o: have_stdlib.h
func.o: have_string.h
func.o: label.h
func.o: longbits.h
func.o: longlong.h
func.o: opcodes.h
func.o: prime.h
func.o: qmath.h
func.o: string.h
func.o: symbol.h
func.o: token.h
func.o: value.h
func.o: zmath.h
func.o: zrand.h
hist.o: have_string.h
hist.o: hist.c
hist.o: hist.h
hist.o: terminal.h
input.o: alloc.h
input.o: calc.h
input.o: cmath.h
input.o: config.h
input.o: endian_calc.h
input.o: have_malloc.h
input.o: have_stdlib.h
input.o: have_string.h
input.o: hist.h
input.o: input.c
input.o: longbits.h
input.o: longlong.h
input.o: qmath.h
input.o: value.h
input.o: zmath.h
jump.o: jump.c
jump.o: jump.h
label.o: alloc.h
label.o: calc.h
label.o: cmath.h
label.o: endian_calc.h
label.o: func.h
label.o: have_malloc.h
label.o: have_stdlib.h
label.o: have_string.h
label.o: label.c
label.o: label.h
label.o: longbits.h
label.o: longlong.h
label.o: opcodes.h
label.o: qmath.h
label.o: string.h
label.o: token.h
label.o: value.h
label.o: zmath.h
listfunc.o: alloc.h
listfunc.o: cmath.h
listfunc.o: endian_calc.h
listfunc.o: have_malloc.h
listfunc.o: have_stdlib.h
listfunc.o: have_string.h
listfunc.o: listfunc.c
listfunc.o: longbits.h
listfunc.o: longlong.h
listfunc.o: qmath.h
listfunc.o: value.h
listfunc.o: zmath.h
matfunc.o: alloc.h
matfunc.o: cmath.h
matfunc.o: endian_calc.h
matfunc.o: have_malloc.h
matfunc.o: have_stdlib.h
matfunc.o: have_string.h
matfunc.o: longbits.h
matfunc.o: longlong.h
matfunc.o: matfunc.c
matfunc.o: qmath.h
matfunc.o: value.h
matfunc.o: zmath.h
math_error.o: alloc.h
math_error.o: args.h
math_error.o: calc.h
math_error.o: cmath.h
math_error.o: endian_calc.h
math_error.o: have_malloc.h
math_error.o: have_stdlib.h
math_error.o: have_string.h
math_error.o: longbits.h
math_error.o: longlong.h
math_error.o: qmath.h
math_error.o: std_arg.h
math_error.o: value.h
math_error.o: zmath.h
obj.o: alloc.h
obj.o: calc.h
obj.o: cmath.h
obj.o: endian_calc.h
obj.o: func.h
obj.o: have_malloc.h
obj.o: have_stdlib.h
obj.o: have_string.h
obj.o: label.h
obj.o: longbits.h
obj.o: longlong.h
obj.o: obj.c
obj.o: opcodes.h
obj.o: qmath.h
obj.o: string.h
obj.o: symbol.h
obj.o: value.h
obj.o: zmath.h
opcodes.o: alloc.h
opcodes.o: args.h
opcodes.o: calc.h
opcodes.o: cmath.h
opcodes.o: endian_calc.h
opcodes.o: func.h
opcodes.o: have_malloc.h
opcodes.o: have_stdlib.h
opcodes.o: have_string.h
opcodes.o: hist.h
opcodes.o: label.h
opcodes.o: longbits.h
opcodes.o: longlong.h
opcodes.o: opcodes.c
opcodes.o: opcodes.h
opcodes.o: qmath.h
opcodes.o: std_arg.h
opcodes.o: symbol.h
opcodes.o: value.h
opcodes.o: zmath.h
pix.o: longlong.h
pix.o: prime.h
pix.o: qmath.h
pix.o: zmath.h
prime.o: jump.h
prime.o: longlong.h
prime.o: prime.h
prime.o: zmath.h
qfunc.o: alloc.h
qfunc.o: endian_calc.h
qfunc.o: have_malloc.h
qfunc.o: have_stdlib.h
qfunc.o: have_string.h
qfunc.o: longbits.h
qfunc.o: longlong.h
qfunc.o: qfunc.c
qfunc.o: qmath.h
qfunc.o: zmath.h
qio.o: alloc.h
qio.o: args.h
qio.o: endian_calc.h
qio.o: have_malloc.h
qio.o: have_stdlib.h
qio.o: have_string.h
qio.o: longbits.h
qio.o: longlong.h
qio.o: qio.c
qio.o: qmath.h
qio.o: std_arg.h
qio.o: zmath.h
qmath.o: alloc.h
qmath.o: endian_calc.h
qmath.o: have_malloc.h
qmath.o: have_stdlib.h
qmath.o: have_string.h
qmath.o: longbits.h
qmath.o: longlong.h
qmath.o: qmath.c
qmath.o: qmath.h
qmath.o: zmath.h
qmod.o: alloc.h
qmod.o: endian_calc.h
qmod.o: have_malloc.h
qmod.o: have_stdlib.h
qmod.o: have_string.h
qmod.o: longbits.h
qmod.o: longlong.h
qmod.o: qmath.h
qmod.o: qmod.c
qmod.o: zmath.h
qtrans.o: alloc.h
qtrans.o: endian_calc.h
qtrans.o: have_malloc.h
qtrans.o: have_stdlib.h
qtrans.o: have_string.h
qtrans.o: longbits.h
qtrans.o: longlong.h
qtrans.o: qmath.h
qtrans.o: qtrans.c
qtrans.o: zmath.h
string.o: alloc.h
string.o: calc.h
string.o: cmath.h
string.o: endian_calc.h
string.o: have_malloc.h
string.o: have_stdlib.h
string.o: have_string.h
string.o: longbits.h
string.o: longlong.h
string.o: qmath.h
string.o: string.c
string.o: string.h
string.o: value.h
string.o: zmath.h
symbol.o: alloc.h
symbol.o: calc.h
symbol.o: cmath.h
symbol.o: endian_calc.h
symbol.o: func.h
symbol.o: have_malloc.h
symbol.o: have_stdlib.h
symbol.o: have_string.h
symbol.o: label.h
symbol.o: longbits.h
symbol.o: longlong.h
symbol.o: opcodes.h
symbol.o: qmath.h
symbol.o: string.h
symbol.o: symbol.c
symbol.o: symbol.h
symbol.o: token.h
symbol.o: value.h
symbol.o: zmath.h
token.o: alloc.h
token.o: args.h
token.o: calc.h
token.o: cmath.h
token.o: endian_calc.h
token.o: have_malloc.h
token.o: have_stdlib.h
token.o: have_string.h
token.o: longbits.h
token.o: longlong.h
token.o: qmath.h
token.o: std_arg.h
token.o: string.h
token.o: token.c
token.o: token.h
token.o: value.h
token.o: zmath.h
value.o: alloc.h
value.o: calc.h
value.o: cmath.h
value.o: endian_calc.h
value.o: func.h
value.o: have_malloc.h
value.o: have_stdlib.h
value.o: have_string.h
value.o: label.h
value.o: longbits.h
value.o: longlong.h
value.o: opcodes.h
value.o: qmath.h
value.o: string.h
value.o: symbol.h
value.o: value.c
value.o: value.h
value.o: zmath.h
value.o: zrand.h
version.o: alloc.h
version.o: calc.h
version.o: cmath.h
version.o: endian_calc.h
version.o: have_malloc.h
version.o: have_stdlib.h
version.o: have_string.h
version.o: longbits.h
version.o: longlong.h
version.o: qmath.h
version.o: value.h
version.o: version.c
version.o: zmath.h
zfunc.o: alloc.h
zfunc.o: endian_calc.h
zfunc.o: have_malloc.h
zfunc.o: have_stdlib.h
zfunc.o: have_string.h
zfunc.o: longbits.h
zfunc.o: longlong.h
zfunc.o: zfunc.c
zfunc.o: zmath.h
zio.o: alloc.h
zio.o: args.h
zio.o: endian_calc.h
zio.o: have_malloc.h
zio.o: have_stdlib.h
zio.o: have_string.h
zio.o: longbits.h
zio.o: longlong.h
zio.o: std_arg.h
zio.o: zio.c
zio.o: zmath.h
zmath.o: alloc.h
zmath.o: endian_calc.h
zmath.o: have_malloc.h
zmath.o: have_stdlib.h
zmath.o: have_string.h
zmath.o: longbits.h
zmath.o: longlong.h
zmath.o: zmath.c
zmath.o: zmath.h
zmod.o: alloc.h
zmod.o: endian_calc.h
zmod.o: have_malloc.h
zmod.o: have_stdlib.h
zmod.o: have_string.h
zmod.o: longbits.h
zmod.o: longlong.h
zmod.o: zmath.h
zmod.o: zmod.c
zmul.o: alloc.h
zmul.o: endian_calc.h
zmul.o: have_malloc.h
zmul.o: have_stdlib.h
zmul.o: have_string.h
zmul.o: longbits.h
zmul.o: longlong.h
zmul.o: zmath.h
zmul.o: zmul.c
zprime.o: jump.h
zprime.o: longlong.h
zprime.o: prime.h
zprime.o: qmath.h
zprime.o: zmath.h
zprime.o: zprime.c
zrand.o: alloc.h
zrand.o: cmath.h
zrand.o: endian_calc.h
zrand.o: have_malloc.h
zrand.o: have_stdlib.h
zrand.o: have_string.h
zrand.o: longbits.h
zrand.o: longlong.h
zrand.o: qmath.h
zrand.o: value.h
zrand.o: zmath.h
zrand.o: zrand.c
zrand.o: zrand.h
