1#!/bin/make
2#
3# calc - arbitrary precision calculator
4#
5# Copyright (C) 1999-2018,2021  Landon Curt Noll
6#
7# SRC: Makefile - top level Makefile
8#
9#	The "# SRC: ... - ..." comment line above indicates
10#	the origin of this file.
11#
12# IMPORTANT: Please see the section on Makefiles near the
13#	     bottom of the HOWTO.INSTALL file.
14#
15# Calc is open software; you can redistribute it and/or modify it under
16# the terms of version 2.1 of the GNU Lesser General Public License
17# as published by the Free Software Foundation.
18#
19# Calc is distributed in the hope that it will be useful, but WITHOUT
20# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
22# Public License for more details.
23#
24# A copy of version 2.1 of the GNU Lesser General Public License is
25# distributed with calc under the filename COPYING-LGPL.  You should have
26# received a copy with calc; if not, write to Free Software Foundation, Inc.
27# 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
28#
29# Under source code control:	1990/02/15 01:48:41
30# File existed as early as:	before 1990
31#
32# chongo <was here> /\oo/\	http://www.isthe.com/chongo/
33# Share and enjoy!  :-)	http://www.isthe.com/chongo/tech/comp/calc/
34#
35# calculator by David I. Bell with help/mods from others
36# Makefile by Landon Curt Noll
37
38# The shell used by this Makefile
39#
40# On some systems, /bin/sh is a rather reduced shell with
41# deprecated behavior.
42#
43# If your system has a up to date, bash shell, then
44# you may wish to use:
45#
46#	SHELL= /bin/sh
47#
48# On some systems such as macOS, the bash shell is very
49# far behind to the point where is cannot be depended on.
50# On such systems, the sh may be a much better alternative
51# shell for this Makefile to use:
52#
53#	SHELL= /bin/sh
54#
55SHELL= /bin/sh
56#SHELL= /bin/sh
57#if 0	/* start of skip for non-Gnu makefiles */
58#
59ifeq ($(target),Darwin)
60SHELL:= /bin/sh
61endif
62#
63#endif	/* end of skip for non-Gnu makefiles */
64
65
66#if 0	/* start of skip for non-Gnu makefiles */
67#
68ifndef EXCLUDE_FROM_CUSTOM_MAKEFILE
69###################################################
70# Begin skipping lines for the custom/Makefile    #
71#						  #
72# The lines in section are NOT used by the lower  #
73# level custom/Makefile's "include ../Makefile".  #
74#						  #
75# The section continues until the next line that  #
76# starts with a '# End skipping ..' comment line. #
77###################################################
78
79# Unfortunately due to the complex dependency issues between
80# Makefile, Makefile.ship and custom/Makefile, parallel GNU make
81# is NOT recommended.  Sorry.
82#
83# XXX - fix this - XXX
84#
85.NOTPARALLEL:
86
87##############################################################################
88#-=-=-=-=-=-=-=-=- Identify the target machine, if possible -=-=-=-=-=-=-=-=-#
89##############################################################################
90
91# NOTE: You can force a target value by defining target as in:
92#
93#	make ...__optional_arguments_... target=value
94
95# Try uname -s if the target was not already set on the make command line
96#
97ifeq ($(target),)
98target=$(shell uname -s 2>/dev/null)
99endif
100ifeq ($(arch),)
101arch=$(shell uname -p 2>/dev/null)
102endif
103ifeq ($(hardware),)
104hardware=$(shell uname -m 2>/dev/null)
105endif
106#
107#endif	/* end of skip for non-Gnu makefiles */
108
109##############################################################################
110#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
111##############################################################################
112
113# PREFIX - Top level location for calc
114#
115# The PREFIX is often prepended to paths within calc and calc Makefiles.
116#
117# Starting with calc v2.13.0.1, nearly all Makefile places that used
118# /usr/local now use ${PREFIX}.  An exception is the olduninstall rule
119# and, of course, this section. :-)
120#
121# NOTE: The ${PREFIX} is not the same as ${T}.  The ${T} specifies
122#	a top level directory under which calc installs things.
123#	While usually ${T} is empty, it can be specific path
124#	as if calc where "chrooted" during an install.
125#	The ${PREFIX} value, during install, is a path between
126#	the top level ${T} install directory and the object
127#	such as an include file.
128#
129# NOTE: See also, ${T}, below.
130#
131# There are some paths that do NOT call under ${PREFIX}, such as
132# ${CALCPATH}, that include paths not under ${PREFIX}, but those
133# too are exceptions to this general rule.
134#
135# When in doubt, try:
136#
137#	PREFIX= /usr/local
138#
139PREFIX= /usr/local
140#PREFIX= /usr
141#PREFIX= /usr/global
142
143# CCBAN is given to ${CC} in order to control if banned.h is in effect.
144#
145# The banned.h attempts to ban the use of certain dangerous functions
146# that, if improperly used, could compromise the computational integrity
147# if calculations.
148#
149# In the case of calc, we are motivated in part by the desire for calc
150# to correctly calculate: even during extremely long calculations.
151#
152# If UNBAN is NOT defined, then calling certain functions
153# will result in a call to a non-existent function (link error).
154#
155# While we do NOT encourage defining UNBAN, there may be
156# a system / compiler environment where re-defining a
157# function may lead to a fatal compiler complication.
158# If that happens, consider compiling as:
159#
160#	make clobber all chk CCBAN=-DUNBAN
161#
162# as see if this is a work-a-round.
163#
164# If YOU discover a need for the -DUNBAN work-a-round, PLEASE tell us!
165# Please send us a bug report.  See the file:
166#
167#	BUGS
168#
169# or the URL:
170#
171#	http://www.isthe.com/chongo/tech/comp/calc/calc-bugrept.html
172#
173# for how to send us such a bug report.
174#
175CCBAN= -UUNBAN
176#CCBAN= -DUNBAN
177
178# Determine the type of terminal controls that you want to use
179#
180#	value		  meaning
181#	--------	  -------
182#	(nothing)	  let the Makefile guess at what you need
183#	-DUSE_TERMIOS	  use struct termios from <termios.h>
184#	-DUSE_TERMIO	  use struct termios from <termio.h>
185#	-DUSE_SGTTY	  use struct sgttyb from <sys/ioctl.h>
186#	-DUSE_NOTHING	  Windows system, don't use any of them
187#
188# Select TERMCONTROL= -DUSE_TERMIOS for DJGPP.
189#
190# If in doubt, leave TERMCONTROL empty.
191#
192TERMCONTROL=
193#TERMCONTROL= -DUSE_TERMIOS
194#TERMCONTROL= -DUSE_TERMIO
195#TERMCONTROL= -DUSE_SGTTY
196#TERMCONTROL= -DUSE_WIN32
197
198# If your system does not have a vsnprintf() function, you could be in trouble.
199#
200#	vsnprintf(string, size, format, ap)
201#
202# This function works like spnrintf except that the 4th arg is a va_list
203# strarg (or varargs) list.  Some old systems do not have vsnprintf().
204# If you do not have vsnprintf(), then calc will try snprintf() and hope
205# for the best.
206#
207# A similar problem occurs if your system does not have a vsnprintf()
208# function.  This function is like the vsnprintf() function except that
209# there is an extra second argument that controls the maximum size
210# string that is produced.
211#
212# If HAVE_VSNPRINTF is empty, this Makefile will run the have_stdvs.c and/or
213# have_varvs.c program to determine if vsnprintf() is supported.  If
214# HAVE_VSNPRINTF is set to -DDONT_HAVE_VSNPRINTF then calc will hope that
215# snprintf() will work.
216#
217# If in doubt, leave HAVE_VSNPRINTF empty.
218#
219HAVE_VSNPRINTF=
220#HAVE_VSNPRINTF= -DDONT_HAVE_VSNPRINTF
221
222# Determine the byte order of your machine
223#
224#    Big Endian:	Amdahl, 68k, Pyramid, Mips, Sparc, ...
225#    Little Endian:	Vax, 32k, Spim (Dec Mips), i386, i486, ...
226#
227# If in doubt, leave CALC_BYTE_ORDER empty.  This Makefile will attempt to
228# use BYTE_ORDER in <machine/endian.h> or it will attempt to run
229# the endian program.  If you get syntax errors when you compile,
230# try forcing the value to be -DBIG_ENDIAN and run the calc regression
231# tests. (see the README.FIRST file) If the calc regression tests fail, do
232# a make clobber and try -DCALC_LITTLE_ENDIAN.   If that fails, ask a wizard
233# for help.
234#
235# Select CALC_BYTE_ORDER= -DCALC_LITTLE_ENDIAN for DJGPP.
236#
237CALC_BYTE_ORDER=
238#CALC_BYTE_ORDER= -DBIG_ENDIAN
239#CALC_BYTE_ORDER= -DLITTLE_ENDIAN
240
241# Determine the number of bits in a byte
242#
243# If in doubt, leave CALC_CHARBIT empty.  This Makefile will run
244# the charbits program to determine the length.
245#
246# In order to avoid make brain damage in some systems, we avoid placing
247# a space after the ='s below.
248#
249# Select CALC_CHARBIT= 8 for DJGPP.
250#
251CALC_CHARBIT=
252#CALC_CHARBIT= 8
253
254# Determine the number of bits in a long
255#
256# If in doubt, leave LONG_BITS empty.  This Makefile will run
257# the longbits program to determine the length.
258#
259# In order to avoid make brain damage in some systems, we avoid placing
260# a space after the ='s below.
261#
262# Select LONG_BITS= 32 for DJGPP.
263#
264LONG_BITS=
265#LONG_BITS= 32
266#LONG_BITS= 64
267
268# Determine if we have the ANSI C fgetpos and fsetpos alternate interface
269# to the ftell() and fseek() (with whence set to SEEK_SET) functions.
270#
271# If HAVE_FPOS is empty, this Makefile will run the have_fpos program
272# to determine if there is are fgetpos and fsetpos functions.  If HAVE_FPOS
273# is set to -DHAVE_NO_FPOS, then calc will use ftell() and fseek().
274#
275# If in doubt, leave HAVE_FPOS empty and this Makefile will figure it out.
276#
277HAVE_FPOS=
278#HAVE_FPOS= -DHAVE_NO_FPOS
279
280# Determine if we have an __pos element of a file position (fpos_t) structure.
281#
282# If HAVE_FPOS_POS is empty, this Makefile will run the have_fpos_pos program
283# to determine if fpos_t has a __pos structure element.  If HAVE_FPOS_POS
284# is set to -DHAVE_NO_FPOS_POS, then calc assume there is no __pos element.
285#
286# Select HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS for DJGPP.
287#
288# If in doubt, leave HAVE_FPOS_POS empty and this Makefile will figure it out.
289#
290HAVE_FPOS_POS=
291#HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS
292
293# Determine the size of the __pos element in fpos_t, if it exists.
294#
295# If FPOS_POS_BITS is empty, then the Makefile will determine the size of
296# the file position value of the __pos element.
297#
298# If there is no __pos element in fpos_t (say because fpos_t is a scalar),
299# leave FPOS_POS_BITS blank.
300#
301# If in doubt, leave FPOS_POS_BITS empty and this Makefile will figure it out.
302#
303FPOS_POS_BITS=
304#FPOS_POS_BITS= 32
305#FPOS_POS_BITS= 64
306
307# Determine the size of a file position value.
308#
309# If FPOS_BITS is empty, then the Makefile will determine the size of
310# the file position value.
311#
312# Select FPOS_BITS= 32 for DJGPP.
313#
314# If in doubt, leave FPOS_BITS empty and this Makefile will figure it out.
315#
316FPOS_BITS=
317#FPOS_BITS= 32
318#FPOS_BITS= 64
319
320# Determine the size of the off_t file offset element
321#
322# If OFF_T_BITS is empty, then the Makefile will determine the size of
323# the file offset value.
324#
325# Select OFF_T_BITS= 32 for DJGPP.
326#
327# If in doubt, leave OFF_T_BITS empty and this Makefile will figure it out.
328#
329OFF_T_BITS=
330#OFF_T_BITS= 32
331#OFF_T_BITS= 64
332
333# Determine the size of the dev_t device value
334#
335# If DEV_BITS is empty, then the Makefile will determine the size of
336# the dev_t device value
337#
338# Select DEV_BITS= 32 for DJGPP.
339#
340# If in doubt, leave DEV_BITS empty and this Makefile will figure it out.
341#
342DEV_BITS=
343#DEV_BITS= 16
344#DEV_BITS= 32
345#DEV_BITS= 64
346
347# Determine the size of the ino_t device value
348#
349# If INODE_BITS is empty, then the Makefile will determine the size of
350# the ino_t inode value
351#
352# Select INODE_BITS= 32 for DJGPP.
353#
354# If in doubt, leave INODE_BITS empty and this Makefile will figure it out.
355#
356INODE_BITS=
357#INODE_BITS= 16
358#INODE_BITS= 32
359#INODE_BITS= 64
360
361# Determine if we have an off_t which one can perform arithmetic operations,
362# assignments and comparisons.  On some systems off_t is some sort of union
363# or struct.
364#
365# If HAVE_OFFSCL is empty, this Makefile will run the have_offscl program
366# to determine if off_t is a scalar.  If HAVE_OFFSCL is set to the value
367# -DOFF_T_NON_SCALAR when calc will assume that off_t some sort of
368# union or struct.
369#
370# If in doubt, leave HAVE_OFFSCL empty and this Makefile will figure it out.
371#
372HAVE_OFFSCL=
373#HAVE_OFFSCL= -DOFF_T_NON_SCALAR
374
375# Determine if we have an fpos_t which one can perform arithmetic operations,
376# assignments and comparisons.  On some systems fpos_t is some sort of union
377# or struct.  Some systems do not have an fpos_t and long is as a file
378# offset instead.
379#
380# If HAVE_POSSCL is empty, this Makefile will run the have_offscl program
381# to determine if off_t is a scalar, or if there is no off_t and long
382# (a scalar) should be used instead.  If HAVE_POSSCL is set to the value
383# -DFILEPOS_NON_SCALAR when calc will assume that fpos_t exists and is
384# some sort of union or struct.
385#
386# If in doubt, leave HAVE_POSSCL empty and this Makefile will figure it out.
387#
388HAVE_POSSCL=
389#HAVE_POSSCL= -DFILEPOS_NON_SCALAR
390
391# Determine if we have ANSI C const.
392#
393# If HAVE_CONST is empty, this Makefile will run the have_const program
394# to determine if const is supported.  If HAVE_CONST is set to -DHAVE_NO_CONST,
395# then calc will not use const.
396#
397# If in doubt, leave HAVE_CONST empty and this Makefile will figure it out.
398#
399HAVE_CONST=
400#HAVE_CONST= -DHAVE_NO_CONST
401
402# Determine if we have uid_t
403#
404# If HAVE_UID_T is empty, this Makefile will run the have_uid_t program
405# to determine if uid_t is supported.  If HAVE_UID_T is set to -DHAVE_NO_UID_T,
406# then calc will treat uid_t as an unsigned short.  This only matters if
407# $HOME is not set and calc must look up the home directory in /etc/passwd.
408#
409# If in doubt, leave HAVE_UID_T empty and this Makefile will figure it out.
410#
411HAVE_UID_T=
412#HAVE_UID_T= -DHAVE_NO_UID_T
413
414# Determine if we have a non-NULL user environment external:
415#
416#	extern char **environ;	/* user environment */
417#
418# If HAVE_ENVIRON is empty, this Makefile will run the have_environ program
419# to determine if environ exists and is non-NULL.  If HAVE_ENVIRON is set
420# to -DHAVE_NO_ENVIRON, then calc will assume there is no external environ
421# symbol.
422#
423# If in doubt, leave HAVE_ENVIRON empty and this Makefile will figure it out.
424#
425HAVE_ENVIRON=
426#HAVE_ENVIRON= -DHAVE_NO_ENVIRON
427
428# Determine if we have the arc4random_buf() function
429#
430# If HAVE_ARC4RANDOM is empty, this Makefile will run the have_arc4random
431# program to determine if arc4random_buf() function exists.  If
432# HAVE_ARC4RANDOM is set to -DHAVE_NO_ARC4RANDOM, then calc will assume
433# there is no arc4random_buf() function.
434#
435# If in doubt, leave HAVE_ARC4RANDOM empty and this Makefile will figure it out.
436#
437HAVE_ARC4RANDOM=
438#HAVE_ARC4RANDOM= -DHAVE_NO_ARC4RANDOM
439
440# Determine if we have memcpy(), memset() and strchr()
441#
442# If HAVE_NEWSTR is empty, this Makefile will run the have_newstr program
443# to determine if memcpy(), memset() and strchr() are supported.  If
444# HAVE_NEWSTR is set to -DHAVE_NO_NEWSTR, then calc will use bcopy() instead
445# of memcpy(), use bfill() instead of memset(), and use index() instead of
446# strchr().
447#
448# If in doubt, leave HAVE_NEWSTR empty and this Makefile will figure it out.
449#
450HAVE_NEWSTR=
451#HAVE_NEWSTR= -DHAVE_NO_NEWSTR
452
453# Determine if we have memmove()
454#
455# If HAVE_MEMMOVE is empty, this Makefile will run the have_memmv program
456# to determine if memmove() is supported.  If HAVE_MEMMOVE is set to
457# -DHAVE_NO_MEMMOVE, then calc will use internal functions to simulate
458# the memory move function that does correct overlapping memory moves.
459#
460# If in doubt, leave HAVE_MEMMOVE empty and this Makefile will figure it out.
461#
462HAVE_MEMMOVE=
463#HAVE_MEMMOVE= -DHAVE_NO_MEMMOVE
464
465# Determine if we have ustat()
466#
467# If HAVE_USTAT is empty, this Makefile will run the have_ustat program
468# to determine if ustat() is supported.  If HAVE_USTAT is set to
469# -DHAVE_NO_USTAT, then calc will use internal functions to simulate
470# the ustat() function that gets file system statistics.
471#
472# Select HAVE_USTAT= -DHAVE_NO_USTAT for DJGPP.
473#
474# If in doubt, leave HAVE_USTAT empty and this Makefile will figure it out.
475#
476HAVE_USTAT=
477#HAVE_USTAT= -DHAVE_NO_USTAT
478
479# Determine if we have getsid()
480#
481# If HAVE_GETSID is empty, this Makefile will run the have_getsid program
482# to determine if getsid() is supported.  If HAVE_GETSID is set to
483# -DHAVE_NO_GETSID, then calc will use internal functions to simulate
484# the getsid() function that gets session ID.
485#
486# Select HAVE_GETSID= -DHAVE_NO_GETSID for DJGPP.
487#
488# If in doubt, leave HAVE_GETSID empty and this Makefile will figure it out.
489#
490HAVE_GETSID=
491#HAVE_GETSID= -DHAVE_NO_GETSID
492
493# Determine if we have getpgid()
494#
495# If HAVE_GETPGID is empty, this Makefile will run the have_getpgid program
496# to determine if getpgid() is supported.  If HAVE_GETPGID is set to
497# -DHAVE_NO_GETPGID, then calc will use internal functions to simulate
498# the getpgid() function that sets the process group ID.
499#
500# Select HAVE_GETPGID= -DHAVE_NO_GETPGID for DJGPP.
501#
502# If in doubt, leave HAVE_GETPGID empty and this Makefile will figure it out.
503#
504HAVE_GETPGID=
505#HAVE_GETPGID= -DHAVE_NO_GETPGID
506
507# Determine if we have clock_gettime()
508#
509# If HAVE_GETTIME is empty, this Makefile will run the have_gettime program
510# to determine if clock_gettime() is supported.  If HAVE_GETTIME is set to
511# -DHAVE_NO_GETTIME, then calc will use internal functions to simulate
512# the clock_gettime() function.
513#
514# Select HAVE_GETTIME= -DHAVE_NO_GETTIME for DJGPP.
515#
516# If in doubt, leave HAVE_GETTIME empty and this Makefile will figure it out.
517#
518HAVE_GETTIME=
519#HAVE_GETTIME= -DHAVE_NO_GETTIME
520
521# Determine if we have getprid()
522#
523# If HAVE_GETPRID is empty, this Makefile will run the have_getprid program
524# to determine if getprid() is supported.  If HAVE_GETPRID is set to
525# -DHAVE_NO_GETPRID, then calc will use internal functions to simulate
526# the getprid() function.
527#
528# Select HAVE_GETPRID= -DHAVE_NO_GETPRID for DJGPP.
529#
530# If in doubt, leave HAVE_GETPRID empty and this Makefile will figure it out.
531#
532HAVE_GETPRID=
533#HAVE_GETPRID= -DHAVE_NO_GETPRID
534
535# Determine if we have the /dev/urandom
536#
537#    HAVE_URANDOM_H=		let the Makefile look for /dev/urandom
538#    HAVE_URANDOM_H= YES	assume that /dev/urandom exists
539#    HAVE_URANDOM_H= NO		assume that /dev/urandom does not exist
540#
541# Select HAVE_URANDOM_H= NO for DJGPP.
542#
543# When in doubt, leave HAVE_URANDOM_H empty.
544#
545HAVE_URANDOM_H=
546#HAVE_URANDOM_H= YES
547#HAVE_URANDOM_H= NO
548
549# Determine if we have getrusage()
550#
551# If HAVE_GETRUSAGE is empty, this Makefile will run the have_rusage program
552# to determine if getrusage() is supported.  If HAVE_GETRUSAGE is set to
553# -DHAVE_NO_GETRUSAGE, then calc will use internal functions to simulate
554# the getrusage() function.
555#
556# If in doubt, leave HAVE_GETRUSAGE empty and this Makefile will figure it out.
557#
558HAVE_GETRUSAGE=
559#HAVE_GETRUSAGE= -DHAVE_NO_GETRUSAGE
560
561# Determine if we have strdup()
562#
563# If HAVE_STRDUP is empty, this Makefile will run the have_strdup program
564# to determine if strdup() is supported.  If HAVE_STRDUP is set to
565# -DHAVE_NO_STRDUP, then calc will use internal functions to simulate
566# the strdup() function.
567#
568# If in doubt, leave HAVE_STRDUP empty and this Makefile will figure it out.
569#
570HAVE_STRDUP=
571#HAVE_STRDUP= -DHAVE_NO_STRDUP
572
573# Some architectures such as Sparc do not allow one to access 32 bit values
574# that are not aligned on a 32 bit boundary.
575#
576# The Dec Alpha running OSF/1 will produce alignment error messages when
577# align32.c tries to figure out if alignment is needed.  Use the
578# ALIGN32= -DMUST_ALIGN32 to force alignment and avoid such error messages.
579#
580# ALIGN32=		     let align32.c figure out if alignment is needed
581# ALIGN32= -DMUST_ALIGN32    force 32 bit alignment
582# ALIGN32= -UMUST_ALIGN32    allow non-alignment of 32 bit accesses
583#
584# Select ALIGN32= -UMUST_ALIGN32 for DJGPP.
585#
586# When in doubt, be safe and pick ALIGN32=-DMUST_ALIGN32.
587#
588ALIGN32=
589#ALIGN32= -DMUST_ALIGN32
590#ALIGN32= -UMUST_ALIGN32
591
592# Determine if we have the <stdlib.h> include file.
593#
594#    HAVE_STDLIB_H=		let the Makefile look for the include file
595#    HAVE_STDLIB_H= YES		assume that the include file exists
596#    HAVE_STDLIB_H= NO		assume that the include file does not exist
597#
598# Select HAVE_STDLIB_H= YES for DJGPP.
599#
600# When in doubt, leave HAVE_STDLIB_H empty.
601#
602HAVE_STDLIB_H=
603#HAVE_STDLIB_H= YES
604#HAVE_STDLIB_H= NO
605
606# Determine if we have the <string.h> include file.
607#
608#    HAVE_STRING_H=		let the Makefile look for the include file
609#    HAVE_STRING_H= YES		assume that the include file exists
610#    HAVE_STRING_H= NO		assume that the include file does not exist
611#
612# Select HAVE_STRING_H= YES for DJGPP.
613#
614# When in doubt, leave HAVE_STRING_H empty.
615#
616HAVE_STRING_H=
617#HAVE_STRING_H= YES
618#HAVE_STRING_H= NO
619
620# Determine if we have the <times.h> include file.
621#
622#    HAVE_TIMES_H=		let the Makefile look for the include file
623#    HAVE_TIMES_H= YES		assume that the include file exists
624#    HAVE_TIMES_H= NO		assume that the include file does not exist
625#
626# Select HAVE_TIMES_H= NO for DJGPP.
627#
628# When in doubt, leave HAVE_TIMES_H empty.
629#
630HAVE_TIMES_H=
631#HAVE_TIMES_H= YES
632#HAVE_TIMES_H= NO
633
634# Determine if we have the <sys/times.h> include file.
635#
636#    HAVE_SYS_TIMES_H=		let the Makefile look for the include file
637#    HAVE_SYS_TIMES_H= YES	assume that the include file exists
638#    HAVE_SYS_TIMES_H= NO	assume that the include file does not exist
639#
640# Select HAVE_SYS_TIMES_H= YES for DJGPP.
641#
642# When in doubt, leave HAVE_SYS_TIMES_H empty.
643#
644HAVE_SYS_TIMES_H=
645#HAVE_SYS_TIMES_H= YES
646#HAVE_SYS_TIMES_H= NO
647
648# Determine if we have the <time.h> include file.
649#
650#    HAVE_TIME_H=		let the Makefile look for the include file
651#    HAVE_TIME_H= YES		assume that the include file exists
652#    HAVE_TIME_H= NO		assume that the include file does not exist
653#
654# Select HAVE_TIME_H= YES for DJGPP.
655#
656# When in doubt, leave HAVE_TIME_H empty.
657#
658HAVE_TIME_H=
659#HAVE_TIME_H= YES
660#HAVE_TIME_H= NO
661
662# Determine if we have the <sys/time.h> include file.
663#
664#    HAVE_SYS_TIME_H=		let the Makefile look for the include file
665#    HAVE_SYS_TIME_H= YES	assume that the include file exists
666#    HAVE_SYS_TIME_H= NO	assume that the include file does not exist
667#
668# Select HAVE_SYS_TIME_H= YES for DJGPP.
669#
670# When in doubt, leave HAVE_SYS_TIME_H empty.
671#
672HAVE_SYS_TIME_H=
673#HAVE_SYS_TIME_H= YES
674#HAVE_SYS_TIME_H= NO
675
676# Determine if we have the <unistd.h> include file.
677#
678#    HAVE_UNISTD_H=		let the Makefile look for the include file
679#    HAVE_UNISTD_H= YES		assume that the include file exists
680#    HAVE_UNISTD_H= NO		assume that the include file does not exist
681#
682# Select HAVE_UNISTD_H= YES for DJGPP.
683#
684# When in doubt, leave HAVE_UNISTD_H empty.
685#
686HAVE_UNISTD_H=
687#HAVE_UNISTD_H= YES
688#HAVE_UNISTD_H= NO
689
690# Determine if we have the <limits.h> include file.
691#
692#    HAVE_LIMITS_H=		let the Makefile look for the include file
693#    HAVE_LIMITS_H= YES		assume that the include file exists
694#    HAVE_LIMITS_H= NO		assume that the include file does not exist
695#
696# Select HAVE_LIMITS_H= YES for DJGPP.
697#
698# When in doubt, leave HAVE_LIMITS_H empty.
699#
700HAVE_LIMITS_H=
701#HAVE_LIMITS_H= YES
702#HAVE_LIMITS_H= NO
703
704# Determine if our compiler allows the unused attribute
705#
706# If HAVE_UNUSED is empty, this Makefile will run the have_unused program
707# to determine if the unused attribute is supported.  If HAVE_UNUSED is set to
708# -DHAVE_NO_UNUSED, then the unused attribute will not be used.
709#
710# Select HAVE_UNUSED= for DJGPP.
711#
712# If in doubt, leave HAVE_UNUSED empty and this Makefile will figure it out.
713#
714HAVE_UNUSED=
715#HAVE_UNUSED= -DHAVE_NO_UNUSED
716
717# Determine if we allow use of "#pragma GCC poison func_name"
718#
719# If HAVE_PRAGMA_GCC_POSION is empty, then Makefile will run the
720# have_bprag program to determine if the "#pragma GCC poison func_name"
721# is supported.  If HAVE_PRAGMA_GCC_POSION is set to
722# -DHAVE_NO_PRAGMA_GCC_POSION. then the "#pragma GCC poison func_name"
723# is not used.
724#
725# If in doubt, leave HAVE_PRAGMA_GCC_POSION empty and this Makefile
726# will figure it out.
727#
728HAVE_PRAGMA_GCC_POSION=
729#HAVE_PRAGMA_GCC_POSION= -DHAVE_NO_PRAGMA_GCC_POSION
730
731# Determine if we have strlcpy()
732#
733# If HAVE_STRLCPY is empty, this Makefile will run the have_strlcpy program
734# to determine if strlcpy() is supported.  If HAVE_STRLCPY is set to
735# -DHAVE_NO_STRLCPY, then calc will use internal functions to simulate
736# the strlcpy() function.
737#
738# If in doubt, leave HAVE_STRLCPY empty and this Makefile will figure it out.
739#
740HAVE_STRLCPY=
741#HAVE_STRLCPY= -DHAVE_NO_STRLCPY
742
743# Determine if we have strlcat()
744#
745# If HAVE_STRLCAT is empty, this Makefile will run the have_strlcat program
746# to determine if strlcat() is supported.  If HAVE_STRLCAT is set to
747# -DHAVE_NO_STRLCAT, then calc will use internal functions to simulate
748# the strlcat() function.
749#
750# If in doubt, leave HAVE_STRLCAT empty and this Makefile will figure it out.
751#
752HAVE_STRLCAT=
753#HAVE_STRLCAT= -DHAVE_NO_STRLCAT
754
755# System include files
756#
757# ${INCDIR}		where the system include (.h) files are kept
758#
759# For DJGPP, select:
760#
761#	INCDIR= /dev/env/DJDIR/include
762#
763# If in doubt, for non-macOS hosts set:
764#
765#	INCDIR= /usr/include
766#
767# However, if you are on macOS then set:
768#
769#	INCDIR= ${PREFIX}/include
770#if 0	/* start of skip for non-Gnu makefiles */
771#
772ifeq ($(target),Darwin)
773
774# default INCDIR for macOS
775INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include
776
777else
778#
779#endif	/* end of skip for non-Gnu makefiles */
780
781# default INCDIR for non-macOS
782INCDIR= /usr/include
783#INCDIR= ${PREFIX}/include
784#INCDIR= /dev/env/DJDIR/include
785
786#if 0	/* start of skip for non-Gnu makefiles */
787#
788endif
789#
790#endif	/* end of skip for non-Gnu makefiles */
791
792# Where to install calc related things
793#
794# ${BINDIR}		where to install calc binary files
795# ${LIBDIR}		where calc link library (*.a) files are installed
796# ${CALC_SHAREDIR}	where to install calc help, .cal, startup, config files
797# ${CALC_INCDIR}	where the calc include files are installed
798#
799# NOTE: The install rule prepends installation paths with ${T}, which
800#	by default is empty.  If ${T} is non-empty, then installation
801#	locations will be relative to the ${T} directory.
802#
803# NOTE: If you change LIBDIR to a non-standard location, you will need
804#	to make changes to your execution environment so that executables
805#	will search LIBDIR when they are resolving dynamic shared libraries.
806#
807#	On OS X, this means you need to export $DYLD_LIBRARY_PATH
808#	to include the LIBDIR path in the value.
809#
810#	On Linux and BSD, this means you need to export $LD_LIBRARY_PATH
811#	to include the LIBDIR path in the value.
812#
813#	You might be better off not changing LIBDIR in the first place.
814#
815# For DJGPP, select:
816#
817#	BINDIR= /dev/env/DJDIR/bin
818#	LIBDIR= /dev/env/DJDIR/lib
819#	CALC_SHAREDIR= /dev/env/DJDIR/share/calc
820#
821# If in doubt, for non-macOS hosts set:
822#
823#	BINDIR= /usr/bin
824#	LIBDIR= /usr/lib
825#	CALC_SHAREDIR= /usr/share/calc
826#
827# However, if you are on macOS then set:
828#
829#	BINDIR= ${PREFIX}/bin
830#	LIBDIR= ${PREFIX}/lib
831#	CALC_SHAREDIR= ${PREFIX}/share/calc
832#
833#	NOTE: Starting with macOS El Capitan OS X 10.11, root by default
834#	      could not mkdir under system locations, so macOS must now
835#	      use the ${PREFIX} tree.
836
837#if 0	/* start of skip for non-Gnu makefiles */
838#
839ifeq ($(target),Darwin)
840
841# default BINDIR for macOS
842BINDIR= ${PREFIX}/bin
843
844else
845#
846#endif	/* end of skip for non-Gnu makefiles */
847
848# default BINDIR for non-macOS
849BINDIR= /usr/bin
850#BINDIR= ${PREFIX}/bin
851#BINDIR= /dev/env/DJDIR/bin
852
853#if 0	/* start of skip for non-Gnu makefiles */
854#
855endif
856
857ifeq ($(target),Darwin)
858
859# default LIBDIR for macOS
860LIBDIR= ${PREFIX}/lib
861
862else
863#
864#endif	/* end of skip for non-Gnu makefiles */
865
866# default LIBDIR for non-macOS
867LIBDIR= /usr/lib
868#LIBDIR= ${PREFIX}/lib
869#LIBDIR= /dev/env/DJDIR/lib
870
871#if 0	/* start of skip for non-Gnu makefiles */
872#
873endif
874
875ifeq ($(target),Darwin)
876
877# default CALC_SHAREDIR for macOS
878CALC_SHAREDIR= ${PREFIX}/share/calc
879
880else
881#
882#endif	/* end of skip for non-Gnu makefiles */
883
884# default CALC_SHAREDIR for non-macOS
885CALC_SHAREDIR= /usr/share/calc
886#CALC_SHAREDIR= ${PREFIX}/lib/calc
887#CALC_SHAREDIR= /dev/env/DJDIR/share/calc
888
889#if 0	/* start of skip for non-Gnu makefiles */
890#
891endif
892#
893#endif	/* end of skip for non-Gnu makefiles */
894
895# NOTE: Do not set CALC_INCDIR to /usr/include or ${PREFIX}/include!!!
896#	Always be sure that the CALC_INCDIR path ends in /calc to avoid
897#	conflicts with system or other application include files!!!
898#
899#CALC_INCDIR= ${PREFIX}/include/calc
900#CALC_INCDIR= /dev/env/DJDIR/include/calc
901CALC_INCDIR= ${INCDIR}/calc
902
903# By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR
904# ---------------------------------------------------------------
905# ${HELPDIR}		where the help directory is installed
906# ${CUSTOMCALDIR}	where custom *.cal files are installed
907# ${CUSTOMHELPDIR}	where custom help files are installed
908# ${CUSTOMINCDIR}	where custom .h files are installed
909# ${SCRIPTDIR}		where calc shell scripts are installed
910#
911# NOTE: The install rule prepends installation paths with ${T}, which
912#	by default is empty.  If ${T} is non-empty, then installation
913#	locations will be relative to the ${T} directory.
914#
915# If in doubt, set:
916#
917#	HELPDIR= ${CALC_SHAREDIR}/help
918#	CALC_INCDIR= ${INCDIR}/calc
919#	CUSTOMCALDIR= ${CALC_SHAREDIR}/custom
920#	CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp
921#	CUSTOMINCDIR= ${CALC_INCDIR}/custom
922#	SCRIPTDIR= ${BINDIR}/cscript
923#
924HELPDIR= ${CALC_SHAREDIR}/help
925CUSTOMCALDIR= ${CALC_SHAREDIR}/custom
926CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp
927CUSTOMINCDIR= ${CALC_INCDIR}/custom
928SCRIPTDIR= ${BINDIR}/cscript
929
930# T - top level directory under which calc will be installed
931#
932# The calc install is performed under ${T}, the calc build is
933# performed under /.  The purpose for ${T} is to allow someone
934# to install calc somewhere other than into the system area.
935#
936# For example, if:
937#
938#     BINDIR= /usr/bin
939#     LIBDIR= /usr/lib
940#     CALC_SHAREDIR= /usr/share/calc
941#
942# and if:
943#
944#     T= /var/tmp/testing
945#
946# Then the installation locations will be:
947#
948#     calc binary files:	/var/tmp/testing/usr/bin
949#     calc link library:	/var/tmp/testing/usr/lib
950#     calc help, .cal ...:	/var/tmp/testing/usr/share/calc
951#     ... etc ...               /var/tmp/testing/...
952#
953# If ${T} is empty, calc is installed under /, which is the same
954# top of tree for which it was built.  If ${T} is non-empty, then
955# calc is installed under ${T}, as if one had to chroot under
956# ${T} for calc to operate.
957#
958# NOTE: The ${PREFIX} is not the same as ${T}.  The ${T} specifies
959#	a top level directory under which calc installs things.
960#	While usually ${T} is empty, it can be specific path
961#	as if calc where "chrooted" during an install.
962#	The ${PREFIX} value, during install, is a path between
963#	the top level ${T} install directory and the object
964#	such as an include file.
965#
966#	See ${PREFIX} above.
967#
968# If in doubt, use T=
969#
970T=
971
972# where man section 1 pages are installed
973#
974# Select MANDIR= /dev/env/DJDIR/man/man1 for DJGPP.
975#
976# Use MANDIR= to disable installation of the calc man (source) page.
977#
978# NOTE: man pages not installed by macOS must go under,
979# (according to MANPATH as found in /private/etc/man.conf):
980#
981#	MANDIR= ${PREFIX}/share/man/man1
982#
983#MANDIR=
984#MANDIR= ${PREFIX}/man/man1
985#MANDIR= /usr/man/man1
986#
987#if 0	/* start of skip for non-Gnu makefiles */
988#
989ifeq ($(target),Darwin)
990MANDIR= ${PREFIX}/share/man/man1
991else
992#
993#endif	/* end of skip for non-Gnu makefiles */
994MANDIR= /usr/share/man/man1
995#if 0	/* start of skip for non-Gnu makefiles */
996#
997endif
998#
999#endif	/* end of skip for non-Gnu makefiles */
1000#MANDIR= /dev/env/DJDIR/man/man1
1001#MANDIR= /usr/man/u_man/man1
1002#MANDIR= /usr/contrib/man/man1
1003
1004# where cat (formatted man) pages are installed
1005#
1006# Select CATDIR= /dev/env/DJDIR/man/cat1 for DJGPP.
1007#
1008# Use CATDIR= to disable installation of the calc cat (formatted) page.
1009#
1010# NOTE: If CATDIR is non-empty, then one should have either the
1011#	${NROFF} executable and/or the ${MANMAKE} executable.
1012#
1013CATDIR=
1014#CATDIR= ${PREFIX}/man/cat1
1015#CATDIR= ${PREFIX}/catman/cat1
1016#CATDIR= /usr/man/cat1
1017#CATDIR= /usr/share/man/cat1
1018#CATDIR= /dev/env/DJDIR/man/cat1
1019#CATDIR= /var/cache/man/cat1
1020#CATDIR= /usr/man/u_man/cat1
1021#CATDIR= /usr/contrib/man/cat1
1022
1023# extension to add on to the calc man page filename
1024#
1025# This is ignored if CATDIR is empty.
1026#
1027MANEXT= 1
1028#MANEXT= l
1029
1030# extension to add on to the calc man page filename
1031#
1032# This is ignored if CATDIR is empty.
1033#
1034CATEXT= 1
1035#CATEXT= 1.gz
1036#CATEXT= 0
1037#CATEXT= l
1038
1039# how to format a man page
1040#
1041# If CATDIR is non-empty, then
1042#
1043#     If NROFF is non-empty, then
1044#
1045#	  ${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT}
1046#		   is used to build and install the cat page
1047#
1048#     else (NROFF is empty)
1049#
1050#	  ${MANMAKE} calc.1 ${CATDIR}
1051#		     is used to build and install the cat page
1052# else
1053#
1054#     The cat page is not built or installed
1055#
1056# Select NROFF= groff for DJGPP.
1057#
1058# If in doubt and you don't want to fool with man pages, set MANDIR
1059# and CATDIR to empty and ignore the NROFF, NROFF_ARG and MANMAKE
1060# lines below.
1061#
1062#NROFF= nroff
1063NROFF=
1064#NROFF= groff
1065NROFF_ARG= -man
1066#NROFF_ARG= -mandoc
1067MANMAKE= ${PREFIX}/bin/manmake
1068#MANMAKE= manmake
1069MANMODE= 0444
1070CATMODE= 0444
1071
1072# By default, custom builtin functions may only be executed if calc
1073# is given the -C option.  This is because custom builtin functions
1074# may invoke non-standard or non-portable code.  One may completely
1075# disable custom builtin functions by not compiling any custom code
1076#
1077# ALLOW_CUSTOM= -DCUSTOM	# allow custom only if -C is given
1078# ALLOW_CUSTOM=			# disable custom even if -C is given
1079#
1080# If in doubt, use ALLOW_CUSTOM= -DCUSTOM
1081#
1082ALLOW_CUSTOM= -DCUSTOM
1083#ALLOW_CUSTOM=
1084
1085# If the $CALCPATH environment variable is not defined, then the following
1086# path will be searched for calc resource file routines.
1087#
1088# Select CALCPATH= .;./cal;~/.cal;${CALC_SHAREDIR};${CUSTOMCALDIR} for DJGPP.
1089#
1090#if 0	/* start of skip for non-Gnu makefiles */
1091#
1092ifdef RPM_TOP
1093ifdef ALLOW_CUSTOM
1094CALCPATH= .:./cal:~/.cal:${CALC_SHAREDIR}:${CUSTOMCALDIR}
1095else
1096CALCPATH= .:./cal:~/.cal:${CALC_SHAREDIR}
1097endif
1098else
1099ifdef ALLOW_CUSTOM
1100#
1101#endif	/* end of skip for non-Gnu makefiles */
1102CALCPATH= .:./cal:~/.cal:${T}${CALC_SHAREDIR}:${T}${CUSTOMCALDIR}
1103#if 0	/* start of skip for non-Gnu makefiles */
1104#
1105else
1106CALCPATH= .:./cal:~/.cal:${T}${CALC_SHAREDIR}
1107endif
1108endif
1109#
1110#endif	/* end of skip for non-Gnu makefiles */
1111
1112# If the $CALCRC environment variable is not defined, then the following
1113# path will be searched for calc resource files.
1114#
1115# Select CALCRC= ./.calcinit:~/.calcrc:${CALC_SHAREDIR}/startup for DJGPP.
1116#
1117CALCRC= ./.calcinit:~/.calcrc:${CALC_SHAREDIR}/startup
1118#CALCRC= ./.calcinit;~/.calcrc;${CALC_SHAREDIR}/startup
1119
1120# Determine of the GNU-readline facility will be used instead of the
1121# builtin calc binding method.
1122#
1123# USE_READLINE=			    Do not use GNU-readline, use calc bindings
1124# USE_READLINE= -DUSE_READLINE	    Use GNU-readline, do not use calc bindings
1125#
1126# NOTE: If you select the 'USE_READLINE= -DUSE_READLINE' mode, you must set:
1127#
1128#	READLINE_LIB		The flags needed to link in the readline
1129#				and history link libraries
1130#	READLINE_EXTRAS		Flags and libs needed to use the readline
1131#				and history link libraries
1132#	READLINE_INCLUDE	Where the readline include files reside
1133#				(leave blank if they are /usr/include/readline)
1134#
1135# NOTE: The GNU-readline code is not shipped with calc.  You must have
1136#	the appropriate headers and link libs installed on your system in
1137#	order to use it.
1138#
1139# If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing.
1140#
1141#USE_READLINE=
1142USE_READLINE= -DUSE_READLINE
1143#
1144#READLINE_LIB=
1145#READLINE_EXTRAS=
1146#
1147READLINE_LIB= -lreadline
1148READLINE_EXTRAS= -lhistory -lncurses
1149#
1150#READLINE_LIB= -L/usr/gnu/lib -lreadline
1151#READLINE_EXTRAS= -lhistory -lncurses
1152#
1153#READLINE_LIB= -L${PREFIX}/lib -lreadline
1154#READLINE_EXTRAS= -lhistory -lncurses
1155#
1156# For Apple OS X: install fink from http://fink.sourceforge.net
1157#		  and then do a 'fink install readline' and then use:
1158#
1159#READLINE_LIB= -L/sw/lib -lreadline
1160#READLINE_EXTRAS= -lhistory -lncurses
1161#
1162# For Apple OS X: install HomeBrew and then:
1163#
1164#	brew install readline
1165#
1166# and use:
1167#
1168#READLINE_LIB= -L${PREFIX}/opt/readline/lib -lreadline
1169#READLINE_EXTRAS= -lhistory -lncurses
1170#
1171READLINE_INCLUDE=
1172#READLINE_INCLUDE= -I/usr/gnu/include
1173#READLINE_INCLUDE= -I${PREFIX}/include
1174
1175#if 0   /* start of skip for non-Gnu makefiles */
1176#
1177#
1178# Handle the case where macOS is being used with HomeBrew
1179# # and using the readline, history, and ncurses libraries.
1180# #
1181ifneq ($(HOMEBREW_PREFIX),)
1182READLINE_LIB:= -L${HOMEBREW_PREFIX}/opt/readline/lib -lreadline
1183READLINE_INCLUDE:= -I${HOMEBREW_PREFIX}/opt/readline/include
1184endif
1185#
1186#endif  /* end of skip for non-Gnu makefiles */
1187
1188# If $PAGER is not set, use this program to display a help file
1189#
1190# Select CALCPAGER= less.exe -ci for DJGPP.
1191#
1192#CALCPAGER= more
1193#CALCPAGER= pg
1194#CALCPAGER= cat
1195CALCPAGER= less
1196#CALCPAGER= less.exe -ci
1197
1198# Debug/Optimize options for ${CC} and ${LCC}
1199#
1200# Select DEBUG= -O2 -gstabs+ -DWINDOZ for DJGPP.
1201#
1202#DEBUG=
1203#DEBUG= -g
1204#DEBUG= -g3
1205#
1206#DEBUG= -O
1207#DEBUG= -O -g
1208#DEBUG= -O -g3
1209#
1210#DEBUG= -O1
1211#DEBUG= -O1 -g
1212#DEBUG= -O1 -g3
1213#
1214#DEBUG= -O2
1215#DEBUG= -O2 -g
1216#DEBUG= -O2 -g3
1217#DEBUG= -O2 -ipa
1218#DEBUG= -O2 -g3 -ipa
1219#
1220#DEBUG= -O3
1221#DEBUG= -O3 -g
1222DEBUG= -O3 -g3
1223#DEBUG= -O3 -ipa
1224#DEBUG= -O3 -g3 -ipa
1225
1226# Some systems require one to use ranlib to add a symbol table to
1227# a *.a link library.  Set RANLIB to the utility that performs this
1228# action.  Set RANLIB to : if your system does not need such a utility.
1229#
1230RANLIB=ranlib
1231#RANLIB=:
1232
1233# Normally certain files depend on the Makefile.  If the Makefile is
1234# changed, then certain steps should be redone.  If MAKE_FILE is
1235# set to Makefile, then these files will depend on Makefile.  If
1236# MAKE_FILE is empty, then they won't.
1237#
1238# If in doubt, set MAKE_FILE to Makefile
1239#
1240MAKE_FILE= Makefile
1241
1242# Local file that is included just prior to the first rule,
1243# that allows one to override any values set in this Makefile.
1244#
1245LOC_MKF= Makefile.local
1246
1247# If you do not wish to use purify, set PURIFY to an empty string.
1248#
1249# If in doubt, use PURIFY=
1250#
1251#PURIFY= purify
1252#PURIFY= purify -m71-engine
1253#PURIFY= purify -logfile=pure.out
1254#PURIFY= purify -m71-engine -logfile=pure.out
1255PURIFY=
1256
1257# If you want to use a debugging link library such as a malloc debug link
1258# library, or need to add special ld flags after the calc link libraries
1259# are included, set ${LD_DEBUG} below.
1260#
1261# If in doubt, set LD_DEBUG to empty.
1262#
1263#LD_DEBUG= -lmalloc_cv
1264LD_DEBUG=
1265
1266# When doing a:
1267#
1268#	make check
1269#	make chk
1270#	make debug
1271#
1272# the ${CALC_ENV} is used to supply the proper environment variables
1273# to calc.  Most people will simply need 'CALCPATH=./cal' to ensure
1274# that these debug rules will only use calc resource files under the
1275# local source directory.
1276#
1277# If in doubt, use:
1278#
1279#	CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.:./custom DYLD_LIBRARY_PATH=.
1280#
1281CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=. DYLD_LIBRARY_PATH=. CALCHELP=./help \
1282	  CALCCUSTOMHELP=./custom
1283
1284# Some out of date operating systems require/want an executable to
1285# end with a certain file extension.  Some compiler systems such as
1286# Windows build calc as calc.exe.  The EXT variable is used to denote
1287# the extension required by such.  Note that Cygwin requires EXT to be
1288# the same as Linux/Un*x/GNU, even though it runs under Windows.
1289#
1290# EXT=				# normal Un*x / Linux / GNU/Linux / Cygwin
1291# EXT=.exe			# Windows
1292#
1293# If in doubt, use EXT=
1294#
1295EXT=
1296#EXT=.exe
1297
1298# The default calc versions
1299#
1300VERSION= 2.14.0.14
1301
1302# Names of shared libraries with versions
1303#
1304LIB_EXT= .so
1305LIB_EXT_VERSION= ${LIB_EXT}.${VERSION}
1306
1307# standard utilities used during make
1308#
1309AR= ar
1310AWK= awk
1311CAT= cat
1312CHMOD= chmod
1313CMP= cmp
1314CO= co
1315COL= col
1316CP= cp
1317CTAGS= ctags
1318DATE= date
1319DIFF= diff
1320FMT= fmt
1321GREP= egrep
1322HOSTNAME= hostname
1323LANG= C
1324LDCONFIG= ldconfig
1325LN= ln
1326LS= ls
1327MAKE= make
1328MAKEDEPEND= makedepend
1329MKDIR= mkdir
1330MV= mv
1331PWDCMD= pwd
1332RM= rm
1333RMDIR= rmdir
1334SED= sed
1335SORT= sort
1336SPLINT= splint
1337SPLINT_OPTS=
1338STRIP= strip
1339TEE= tee
1340TAIL= tail
1341TOUCH= touch
1342TRUE= true
1343UNAME= uname
1344XARGS= xargs
1345
1346# NOTE: On some shells, echo is a builtin that does
1347#	not understand -n, so we call /bin/echo -n
1348#	directly to get around such shells.
1349#
1350ECHON= /bin/echo -n
1351
1352# Extra compiling and linking flags
1353#
1354# EXTRA_CFLAGS are flags given to ${CC} when compiling C files
1355# EXTRA_LDFLAGS are flags given to ${CC} when linking programs
1356#
1357# Both CFLAGS and LDFLAGS are left blank in this Makefile by
1358# default so that users may use them on the make command line
1359# to always set the way that C is compiled and files are linked
1360# respectively.  For example:
1361#
1362#	make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic"
1363#
1364# NOTE: These should be left blank in this Makefile to make it
1365#       easier to add stuff on the command line.  If you want to
1366#	to change the way calc is compiled by this Makefile, change
1367#	the appropriate host target section below or a flag above.
1368#
1369EXTRA_CFLAGS=
1370EXTRA_LDFLAGS=
1371
1372# Architecture compile flags
1373#
1374# The ARCH_CFLAGS are ${CC} when compiling C files. They follow
1375# CCMISC and precede EXTRA_CFLAGS.
1376#
1377ARCH_CFLAGS=
1378#ARCH_CFLAGS= -march=native
1379
1380# COMMON_CFLAGS are the common ${CC} flags used for all programs, both
1381#	    intermediate and final calc and calc related programs
1382#
1383#if 0	/* start of skip for non-Gnu makefiles */
1384#
1385ifdef ALLOW_CUSTOM
1386#
1387#endif	/* end of skip for non-Gnu makefiles */
1388COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} \
1389    ${CCMISC} ${ARCH_CFLAGS} ${EXTRA_CFLAGS}
1390#if 0	/* start of skip for non-Gnu makefiles */
1391#
1392else
1393COMMON_CFLAGS= -DCALC_SRC -UCUSTOM ${CCWARN} \
1394    ${CCMISC} ${ARCH_CFLAGS} ${EXTRA_CFLAGS}
1395endif
1396#
1397#endif	/* end of skip for non-Gnu makefiles */
1398
1399# COMMON_LDFLAGS are the common flags used for linking all programs, both
1400#	     intermediate and final calc and calc related programs
1401#
1402COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
1403
1404###################################################
1405# End skipping lines for the custom/Makefile      #
1406#						  #
1407# The lines in section are NOT used by the lower  #
1408# level custom/Makefile's "include ../Makefile".  #
1409#						  #
1410# The section starts with the next line that has  #
1411# a line that starts with '# Begin skipping ..'.  #
1412###################################################
1413#if 0	/* start of skip for non-Gnu makefiles */
1414#
1415endif
1416#
1417#endif	/* end of skip for non-Gnu makefiles */
1418# include start from top Makefile - keep this line
1419######################################################
1420# NOTE: Start of section from the middle of Makefile #
1421#						     #
1422# These lines are shared in common with the lower    #
1423# custom/Makefile. That is, until the comment line   #
1424# that starts with '# NOTE: End of section ..' line, #
1425# these Makefile lines are used in BOTH Makefiles.   #
1426######################################################
1427
1428##############################################################################
1429#-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-#
1430##############################################################################
1431
1432# Common values set in targets
1433#
1434# BLD_TYPE determines if calc is built with static and/or dynamic libs.
1435#	       Set this value to one of:
1436#
1437#	BLD_TYPE= calc-dynamic-only
1438#	BLD_TYPE= calc-static-only
1439#
1440# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs
1441# DEFAULT_LIB_INSTALL_PATH is where calc programs look for calc shared libs
1442# LD_SHARE are common flags given to ${CC} to link with shared libraries
1443# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared libraries
1444# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib
1445#
1446#	NOTE: The above 5 values are unused if BLD_TYPE= calc-static-only
1447#
1448# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs
1449# LD_STATIC are common flags given to ${CC} to link with static libraries
1450# LIBCALC_STATIC are flags given to ${CC} to build libcalc static libraries
1451# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib
1452#
1453#	NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only
1454#
1455# CCOPT are flags given to ${CC} for optimization
1456# CCWARN are flags given to ${CC} for warning message control
1457#
1458# The following are given to ${CC}:
1459#
1460#	WNO_IMPLICT
1461#	WNO_ERROR_LONG_LONG
1462#	WNO_LONG_LONG
1463#
1464# when compiling special .o files that may need special compile options:
1465#
1466#	NOTE: These flags simply turn off certain compiler warnings,
1467#	      which is useful only when CCWERR is set to -Werror.
1468#
1469#	NOTE: If your compiler does not have these -Wno files, just
1470#	      set these variables to nothing as in:
1471#
1472#		WNO_IMPLICT=
1473#		WNO_ERROR_LONG_LONG=
1474#		WNO_LONG_LONG=
1475#
1476# CCWERR are flags given to ${CC} to make warnings fatal errors
1477#	NOTE: CCWERR is only set in development Makefiles and must only be
1478#	      used with ${CC}, not ${LCC}.  If you do not want the compiler
1479#	      to abort on warnings, then leave CCWERR blank.
1480# CCMISC are misc flags given to ${CC}
1481#
1482# CCBAN is given to ${CC} in order to control if banned.h is in effect.
1483#	NOTE: See where CCBAN is defined above for details.
1484#
1485# LCC is how the C compiler is invoked on locally executed intermediate programs
1486# CC is how the C compiler is invoked (with an optional Purify)
1487#
1488# Specific target overrides or modifications to default values
1489
1490##########################################################################
1491# NOTE: If your target is not supported below and the default target	 #
1492#	is not suitable for your needs, please send to the:		 #
1493#									 #
1494#		calc-contrib at asthe dot com				 #
1495#									 #
1496#	Email address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" #
1497#	set of lines so that we can consider them for the next release.  #
1498##########################################################################
1499
1500#if 0	/* start of skip for non-Gnu makefiles */
1501#
1502################
1503# Linux target #
1504################
1505
1506ifeq ($(target),Linux)
1507#
1508BLD_TYPE= calc-dynamic-only
1509#
1510CC_SHARE= -fPIC
1511DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:${PREFIX}/lib
1512LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
1513    "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
1514LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
1515ifdef ALLOW_CUSTOM
1516LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
1517else
1518LIBCUSTCALC_SHLIB=
1519endif
1520#
1521CC_STATIC=
1522LD_STATIC=
1523LIBCALC_STATIC=
1524LIBCUSTCALC_STATIC=
1525#
1526# If you want to add flags to all compiler and linker
1527# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
1528# set ${COMMON_ADD}.
1529#
1530# For example to use gcc's -Werror to force warnings
1531# to become errors, call make with:
1532#
1533#   make .. COMMON_ADD='-Werror'
1534#
1535# This facility requires a Gnu Makefile, or a make command
1536# that understands the += make operand.
1537#
1538COMMON_CFLAGS+= ${COMMON_ADD}
1539COMMON_LDFLAGS+= ${COMMON_ADD}
1540#
1541#CCWARN= -Wall
1542CCWARN= -Wall -Wextra -pedantic
1543WNO_IMPLICT= -Wno-implicit
1544WNO_ERROR_LONG_LONG= -Wno-error=long-long
1545WNO_LONG_LONG= -Wno-long-long
1546CCWERR=
1547CCOPT= ${DEBUG}
1548CCMISC=
1549#
1550LCC= gcc
1551CC= ${PURIFY} ${LCC} ${CCWERR}
1552#
1553endif
1554
1555###############################
1556# Apple macOS / Darwin target #
1557###############################
1558
1559ifeq ($(target),Darwin)
1560#
1561BLD_TYPE= calc-dynamic-only
1562#
1563CC_SHARE= -fPIC
1564DEFAULT_LIB_INSTALL_PATH= ${PWD}:${LIBDIR}:${PREFIX}/lib
1565LD_SHARE= ${DARWIN_ARCH}
1566#SET_INSTALL_NAME= no
1567SET_INSTALL_NAME= yes
1568ifeq ($(SET_INSTALL_NAME),yes)
1569LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
1570    -install_name ${LIBDIR}/libcalc${LIB_EXT_VERSION} ${DARWIN_ARCH}
1571else
1572LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
1573    ${DARWIN_ARCH}
1574endif
1575ifdef ALLOW_CUSTOM
1576ifeq ($(SET_INSTALL_NAME),yes)
1577LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
1578    -install_name ${LIBDIR}/libcustcalc${LIB_EXT_VERSION} ${DARWIN_ARCH}
1579else
1580LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib \
1581    ${DARWIN_ARCH}
1582endif
1583else
1584LIBCUSTCALC_SHLIB=
1585endif
1586#
1587CC_STATIC=
1588LD_STATIC= ${DARWIN_ARCH}
1589LIBCALC_STATIC=
1590LIBCUSTCALC_STATIC=
1591#
1592# If you want to add flags to all compiler and linker
1593# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
1594# set ${COMMON_ADD}.
1595#
1596# For example to use clang's -fsanitize for calc testing,
1597# which requires a common set of flags to be passed to
1598# every compile and link, then call make with:
1599#
1600#   make .. COMMON_ADD='-fsanitize=undefined -fsanitize=address'
1601#
1602# This facility requires a Gnu Makefile, or a make command
1603# that understands the += make operand.
1604#
1605COMMON_CFLAGS+= ${COMMON_ADD}
1606COMMON_LDFLAGS+= ${COMMON_ADD}
1607#
1608#CCWARN= -Wall
1609CCWARN= -Wall -Wextra -pedantic
1610WNO_IMPLICT= -Wno-implicit
1611WNO_ERROR_LONG_LONG= -Wno-error=long-long
1612WNO_LONG_LONG= -Wno-long-long
1613CCWERR=
1614CCOPT= ${DEBUG}
1615CCMISC= ${DARWIN_ARCH}
1616#
1617LCC= clang
1618CC= ${PURIFY} ${LCC} ${CCWERR}
1619#
1620# Darwin dynamic shared lib filenames
1621LIB_EXT:= .dylib
1622LIB_EXT_VERSION:= .${VERSION}${LIB_EXT}
1623# LDCONFIG not required on this platform, so we redefine it to an empty string
1624LDCONFIG:=
1625# DARWIN_ARCH= -arch i386 -arch ppc	# Universal binary
1626# DARWIN_ARCH= -arch i386		# Intel binary
1627# DARWIN_ARCH= -arch ppc		# PPC binary
1628# DARWIN_ARCH= -arch x86_64		# native 64-bit binary
1629DARWIN_ARCH=				# native binary
1630endif
1631
1632##################
1633# DragonFly target #
1634##################
1635
1636########################################################################
1637# NOTE: You MUST either use gmake (GNU Make) or you must try your luck #
1638#       with Makefile.simple and custom/Makefile.simple versions.      #
1639#	See HOWTO.INSTALL for more information.                        #
1640########################################################################
1641
1642ifeq ($(target),DragonFly)
1643#
1644BLD_TYPE= calc-dynamic-only
1645#
1646CC_SHARE= -fPIC
1647DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:${PREFIX}/lib
1648LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
1649    "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
1650LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
1651ifdef ALLOW_CUSTOM
1652LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
1653else
1654LIBCUSTCALC_SHLIB=
1655endif
1656#
1657CC_STATIC=
1658LD_STATIC=
1659LIBCALC_STATIC=
1660LIBCUSTCALC_STATIC=
1661#
1662# If you want to add flags to all compiler and linker
1663# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
1664# set ${COMMON_ADD}.
1665#
1666# For example to use gcc's -Werror to force warnings
1667# to become errors, call make with:
1668#
1669#   make .. COMMON_ADD='-Werror'
1670#
1671# This facility requires a Gnu Makefile, or a make command
1672# that understands the += make operand.
1673#
1674COMMON_CFLAGS+= ${COMMON_ADD}
1675COMMON_LDFLAGS+= ${COMMON_ADD}
1676#
1677#CCWARN= -Wall
1678CCWARN= -Wall -Wextra -pedantic
1679WNO_IMPLICT= -Wno-implicit
1680WNO_ERROR_LONG_LONG= -Wno-error=long-long
1681WNO_LONG_LONG= -Wno-long-long
1682CCWERR=
1683CCOPT= ${DEBUG}
1684CCMISC=
1685#
1686LCC= gcc
1687CC= ${PURIFY} ${LCC} ${CCWERR}
1688#
1689MAKE= gmake
1690#
1691endif
1692
1693##################
1694# OpenBSD target #
1695##################
1696
1697########################################################################
1698# NOTE: You MUST either use gmake (GNU Make) or you must try your luck #
1699#       with Makefile.simple and custom/Makefile.simple versions.      #
1700#	See HOWTO.INSTALL for more information.                        #
1701########################################################################
1702
1703ifeq ($(target),OpenBSD)
1704#
1705BLD_TYPE= calc-dynamic-only
1706#
1707CC_SHARE= -fPIC
1708DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:${PREFIX}/lib
1709LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
1710    "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
1711LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
1712ifdef ALLOW_CUSTOM
1713LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
1714else
1715LIBCUSTCALC_SHLIB=
1716endif
1717#
1718CC_STATIC=
1719LD_STATIC=
1720LIBCALC_STATIC=
1721LIBCUSTCALC_STATIC=
1722#
1723# If you want to add flags to all compiler and linker
1724# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
1725# set ${COMMON_ADD}.
1726#
1727# For example to use gcc's -Werror to force warnings
1728# to become errors, call make with:
1729#
1730#   make .. COMMON_ADD='-Werror'
1731#
1732# This facility requires a Gnu Makefile, or a make command
1733# that understands the += make operand.
1734#
1735COMMON_CFLAGS+= ${COMMON_ADD}
1736COMMON_LDFLAGS+= ${COMMON_ADD}
1737#
1738#CCWARN= -Wall
1739CCWARN= -Wall -Wextra -pedantic
1740WNO_IMPLICT= -Wno-implicit
1741WNO_ERROR_LONG_LONG= -Wno-error=long-long
1742WNO_LONG_LONG= -Wno-long-long
1743CCWERR=
1744CCOPT= ${DEBUG}
1745CCMISC=
1746#
1747LCC= gcc
1748CC= ${PURIFY} ${LCC} ${CCWERR}
1749#
1750MAKE= gmake
1751#
1752endif
1753
1754#################
1755# Cygwin target #
1756#################
1757
1758ifeq ($(target),Cygwin)
1759#
1760BLD_TYPE= calc-static-only
1761#
1762CC_SHARE= -fPIC
1763DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:${PREFIX}/lib
1764LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
1765    "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
1766LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
1767ifdef ALLOW_CUSTOM
1768LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
1769else
1770LIBCUSTCALC_SHLIB=
1771endif
1772#
1773CC_STATIC=
1774LIBCALC_STATIC=
1775LIBCUSTCALC_STATIC=
1776LD_STATIC=
1777#
1778# If you want to add flags to all compiler and linker
1779# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
1780# set ${COMMON_ADD}.
1781#
1782# For example to use gcc's -Werror to force warnings
1783# to become errors, call make with:
1784#
1785#   make .. COMMON_ADD='-Werror'
1786#
1787# This facility requires a Gnu Makefile, or a make command
1788# that understands the += make operand.
1789#
1790COMMON_CFLAGS+= ${COMMON_ADD}
1791COMMON_LDFLAGS+= ${COMMON_ADD}
1792#
1793#CCWARN= -Wall
1794CCWARN= -Wall -Wextra -pedantic
1795WNO_IMPLICT= -Wno-implicit
1796WNO_ERROR_LONG_LONG= -Wno-error=long-long
1797WNO_LONG_LONG= -Wno-long-long
1798CCWERR=
1799CCOPT= ${DEBUG}
1800CCMISC=
1801#
1802LCC= gcc
1803CC= ${PURIFY} ${LCC} ${CCWERR}
1804#
1805endif
1806
1807#######################################################
1808# simple target - values used to form Makefile.simple #
1809#######################################################
1810
1811# NOTE: This is not a real host target.  The simple target
1812#	exists only to form the Makefile.simple file.
1813
1814ifeq ($(target),simple)
1815#
1816#endif	/* end of skip for non-Gnu makefiles */
1817#
1818BLD_TYPE= calc-static-only
1819#
1820CC_SHARE= -fPIC
1821DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:${PREFIX}/lib
1822LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
1823    "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
1824LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
1825LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
1826#
1827CC_STATIC=
1828LD_STATIC=
1829LIBCALC_STATIC=
1830LIBCUSTCALC_STATIC=
1831#
1832#CCWARN= -Wall
1833CCWARN= -Wall -Wextra -pedantic
1834WNO_IMPLICT= -Wno-implicit
1835WNO_ERROR_LONG_LONG= -Wno-error=long-long
1836WNO_LONG_LONG= -Wno-long-long
1837CCWERR=
1838CCOPT= ${DEBUG}
1839CCMISC=
1840#
1841LCC= cc
1842CC= ${PURIFY} ${LCC} ${CCWERR}
1843#
1844# The simple makefile forces the use of static ${CC} flags
1845#
1846# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
1847# CFLAGS are given to ${CC} for calc programs other than intermediate programs
1848# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
1849# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
1850#
1851ICFLAGS= ${COMMON_CFLAGS} ${CCBAN} ${CC_STATIC}
1852CFLAGS= ${ICFLAGS} ${CCOPT}
1853#
1854ILDFLAGS= ${COMMON_LDFLAGS} ${LD_STATIC}
1855LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} ${LIBCALC_STATIC} ${LIBCUSTCALC_STATIC}
1856#
1857#if 0	/* start of skip for non-Gnu makefiles */
1858#
1859endif
1860
1861###################################################
1862# default target - when no specific target exists #
1863###################################################
1864
1865# NOTE: This is the default generic host target.  Used when no other
1866#	host target matches.
1867
1868ifeq ($(target),)
1869#
1870BLD_TYPE= calc-static-only
1871#
1872CC_SHARE= -fPIC
1873DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:${PREFIX}/lib
1874LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
1875    "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
1876LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
1877ifdef ALLOW_CUSTOM
1878LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
1879else
1880LIBCUSTCALC_SHLIB=
1881endif
1882#
1883CC_STATIC=
1884LIBCALC_STATIC=
1885LIBCUSTCALC_STATIC=
1886LD_STATIC=
1887#
1888# If you want to add flags to all compiler and linker
1889# run (via ${COMMON_CFLAGS} and ${COMMON_LDFLAGS}),
1890# set ${COMMON_ADD}.
1891#
1892# For example to use gcc's -Werror to force warnings
1893# to become errors, call make with:
1894#
1895#   make .. COMMON_ADD='-Werror'
1896#
1897# This facility requires a Gnu Makefile, or a make command
1898# that understands the += make operand.
1899#
1900COMMON_CFLAGS+= ${COMMON_ADD}
1901COMMON_LDFLAGS+= ${COMMON_ADD}
1902#
1903#CCWARN= -Wall
1904CCWARN= -Wall -Wextra -pedantic
1905WNO_IMPLICT= -Wno-implicit
1906WNO_ERROR_LONG_LONG= -Wno-error=long-long
1907WNO_LONG_LONG= -Wno-long-long
1908CCWERR=
1909CCOPT= ${DEBUG}
1910CCMISC=
1911#
1912LCC= gcc
1913CC= ${PURIFY} ${LCC} ${CCWERR}
1914endif
1915
1916###########################################
1917# Set the default compile flags for ${CC} #
1918###########################################
1919
1920# Required flags to compile C files for calc
1921#
1922# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
1923# CFLAGS are given to ${CC} for calc programs other than intermediate programs
1924#
1925# NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only
1926#
1927ifeq ($(BLD_TYPE),calc-static-only)
1928ICFLAGS= ${COMMON_CFLAGS} ${CCBAN} ${CC_STATIC}
1929else
1930ICFLAGS= ${COMMON_CFLAGS} ${CCBAN} ${CC_SHARE}
1931endif
1932CFLAGS= ${ICFLAGS} ${CCOPT}
1933
1934# Required flags to link files for calc
1935#
1936# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
1937# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
1938#
1939ILDFLAGS= ${COMMON_LDFLAGS}
1940LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
1941#
1942#endif	/* end of skip for non-Gnu makefiles */
1943
1944#######################################################################
1945#-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-#
1946#######################################################################
1947
1948######################################################
1949# NOTE: End of section from the middle of Makefile   #
1950#						     #
1951# These lines are shared in common with the lower    #
1952# custom/Makefile. That is, starting with the line   #
1953# that starts with '# NOTE: End of section ..' line, #
1954# these Makefile lines are used in BOTH Makefiles.   #
1955######################################################
1956# include end from top Makefile - keep this line
1957
1958#if 0	/* start of skip for non-Gnu makefiles */
1959#
1960ifndef EXCLUDE_FROM_CUSTOM_MAKEFILE
1961###################################################
1962# Begin 2nd skip of lines for the custom/Makefile #
1963#						  #
1964# The lines in section are NOT used by the lower  #
1965# level custom/Makefile's "include ../Makefile".  #
1966#						  #
1967# The section continues until the next line that  #
1968# starts with the '# End 2nd skip ..' line.       #
1969###################################################
1970#
1971#endif	/* end of skip for non-Gnu makefiles */
1972# end of host target cut - Do not remove this line
1973
1974##########################################################################
1975#=-=-=-=-=- Be careful if you change something below this line -=-=-=-=-=#
1976##########################################################################
1977
1978# Makefile debug
1979#
1980# Q=@	do not echo internal Makefile actions (quiet mode)
1981# Q=	echo internal Makefile actions (debug / verbose mode)
1982#
1983# H=@:	do not report hsrc file formation progress
1984# H=@	do echo hsrc file formation progress
1985#
1986# S= >/dev/null 2>&1	silence ${CC} output during hsrc file formation
1987# S=			full ${CC} output during hsrc file formation
1988#
1989# E= 2>/dev/null	silence command stderr during hsrc file formation
1990# E=			full command stderr during hsrc file formation
1991#
1992# V=@:	do not echo debug statements (quiet mode)
1993# V=@	do echo debug statements (debug / verbose mode)
1994#
1995#Q=
1996Q=@
1997#
1998S= >/dev/null 2>&1
1999#S=
2000#
2001E= 2>/dev/null
2002#E=
2003#
2004#H=@:
2005H=@
2006#
2007V=@:
2008#V=@
2009
2010# the source files which are built into a math link library
2011#
2012# There MUST be a .o for every .c in LIBOBJS
2013#
2014LIBSRC= addop.c assocfunc.c blkcpy.c block.c byteswap.c \
2015	codegen.c comfunc.c commath.c config.c const.c custom.c \
2016	file.c func.c hash.c help.c hist.c input.c jump.c label.c \
2017	lib_calc.c lib_util.c listfunc.c matfunc.c math_error.c \
2018	obj.c opcodes.c pix.c poly.c prime.c qfunc.c qio.c \
2019	qmath.c qmod.c qtrans.c quickhash.c seed.c sha1.c size.c \
2020	str.c strl.c symbol.c token.c value.c version.c zfunc.c zio.c \
2021	zmath.c zmod.c zmul.c zprime.c zrand.c zrandom.c
2022
2023# the object files which are built into a math link library
2024#
2025# There MUST be a .o for every .c in LIBSRC plus calcerr.o
2026# which is built via this Makefile.
2027#
2028LIBOBJS= addop.o assocfunc.o blkcpy.o block.o byteswap.o calcerr.o \
2029	codegen.o comfunc.o commath.o config.o const.o custom.o \
2030	file.o func.o hash.o help.o hist.o input.o jump.o label.o \
2031	lib_calc.o lib_util.o listfunc.o matfunc.o math_error.o \
2032	obj.o opcodes.o pix.o poly.o prime.o qfunc.o qio.o \
2033	qmath.o qmod.o qtrans.o quickhash.o seed.o sha1.o size.o \
2034	str.o strl.o symbol.o token.o value.o version.o zfunc.o zio.o \
2035	zmath.o zmod.o zmul.o zprime.o zrand.o zrandom.o
2036
2037# the calculator source files
2038#
2039# There MUST be a .c for every .o in CALCOBJS.
2040#
2041CALCSRC= calc.c
2042
2043# we build these .o files for calc
2044#
2045# There MUST be a .o for every .c in CALCSRC.
2046#
2047CALCOBJS= calc.o
2048
2049# these .h files are needed to build the math link library
2050#
2051LIB_H_SRC= alloc.h banned.h blkcpy.h block.h byteswap.h calc.h cmath.h \
2052	config.h custom.h decl.h file.h func.h hash.h hist.h jump.h \
2053	label.h lib_util.h lib_calc.h nametype.h \
2054	opcodes.h prime.h qmath.h sha1.h str.h strl.h \
2055	symbol.h token.h value.h zmath.h zrand.h zrandom.h
2056
2057# we build these .h files during the make
2058#
2059BUILD_H_SRC= align32.h args.h calcerr.h conf.h endian_calc.h \
2060	fposval.h have_ban_pragma.h have_const.h have_fpos.h \
2061	have_fpos_pos.h have_getpgid.h have_getprid.h have_getsid.h \
2062	have_gettime.h have_memmv.h have_newstr.h have_offscl.h \
2063	have_posscl.h have_rusage.h have_stdlib.h have_strdup.h \
2064	have_string.h have_strlcat.h have_strlcpy.h have_times.h \
2065	have_uid_t.h have_unistd.h have_unused.h have_urandom.h \
2066	have_ustat.h longbits.h terminal.h have_environ.h \
2067	have_arc4random.h have_limits.h charbit.h
2068
2069# we build these .c files during the make
2070#
2071BUILD_C_SRC= calcerr.c
2072
2073# these .c files may be used in the process of building BUILD_H_SRC
2074#
2075# There MUST be a .c for every .o in UTIL_OBJS.
2076#
2077UTIL_C_SRC= align32.c endian.c longbits.c have_newstr.c have_uid_t.c \
2078	have_const.c have_stdvs.c have_varvs.c fposval.c have_fpos.c \
2079	have_fpos_pos.c have_offscl.c have_posscl.c have_memmv.c \
2080	have_ustat.c have_getsid.c have_getpgid.c have_environ.c \
2081	have_gettime.c have_getprid.c have_rusage.c have_strdup.c \
2082	have_unused.c have_ban_pragma.c have_strlcpy.c have_strlcat.c \
2083	have_arc4random.c charbit.c
2084
2085# these awk and sed tools are used in the process of building BUILD_H_SRC
2086# and BUILD_C_SRC
2087#
2088UTIL_MISC_SRC= calcerr_h.sed calcerr_h.awk calcerr_c.sed calcerr_c.awk \
2089	calcerr.tbl check.awk win32.mkdef fposval.h.def
2090
2091# these .o files may get built in the process of building BUILD_H_SRC
2092#
2093# There MUST be a .o for every .c in UTIL_C_SRC.
2094#
2095UTIL_OBJS= endian.o longbits.o have_newstr.o have_uid_t.o \
2096	have_const.o fposval.o have_fpos.o have_fpos_pos.o \
2097	try_strarg.o have_stdvs.o have_varvs.o have_posscl.o have_memmv.o \
2098	have_ustat.o have_getsid.o have_getpgid.o have_environ.o \
2099	have_gettime.o have_getprid.o ver_calc.o have_rusage.o have_strdup.o \
2100	have_unused.o have_ban_pragma.o have_strlcpy.o have_strlcat.o \
2101	have_arc4random.o charbit.o
2102
2103# these temp files may be created (and removed) during the build of BUILD_C_SRC
2104#
2105UTIL_TMP= ll_tmp fpos_tmp fposval_tmp const_tmp uid_tmp newstr_tmp vs_tmp \
2106	memmv_tmp offscl_tmp posscl_tmp newstr_tmp \
2107	getsid_tmp gettime_tmp getprid_tmp rusage_tmp strdup_tmp
2108
2109# these utility executables may be created in the process of
2110# building the BUILD_H_SRC file set
2111#
2112UTIL_PROGS= align32${EXT} fposval${EXT} have_uid_t${EXT} have_const${EXT} \
2113	endian${EXT} longbits${EXT} have_newstr${EXT} have_stdvs${EXT} \
2114	have_varvs${EXT} have_ustat${EXT} have_getsid${EXT} \
2115	have_getpgid${EXT} have_gettime${EXT} have_getprid${EXT} \
2116	ver_calc${EXT} have_strdup${EXT} have_environ{EXT} \
2117	have_unused${EXT} have_fpos${EXT} have_fpos_pos${EXT} \
2118	have_offscl${EXT} have_rusage${EXT} have_ban_pragma${EXT} \
2119	have_strlcpy${EXT} have_strlcat${EXT} have_arc4random${EXT} \
2120	charbit${EXT}
2121
2122# these utility files and scripts may be created in the process of building
2123# the BUILD_H_SRC file set
2124#
2125UTIL_FILES= have_args.sh
2126
2127# Any .h files that are needed to compile sample code.
2128#
2129SAMPLE_H_SRC=
2130
2131# Any .c files that are needed to compile sample code.
2132#
2133# There MUST be a .c in SAMPLE_C_SRC for every .o in SAMPLE_OBJ.
2134#
2135SAMPLE_C_SRC= sample_many.c sample_rand.c
2136
2137# Any .o files that are needed to compile sample code.
2138#
2139# There MUST be a .c in SAMPLE_C_SRC for every .o in SAMPLE_OBJ.
2140#
2141SAMPLE_OBJ= sample_many.o sample_rand.o
2142
2143# The complete list of Makefile vars passed down to custom/Makefile.
2144#
2145CUSTOM_PASSDOWN=  \
2146    ALLOW_CUSTOM="${ALLOW_CUSTOM}" \
2147    AR=${AR} \
2148    ARCH_CFLAGS=${ARCH_CFLAGS} \
2149    AWK=${AWK} \
2150    BINDIR="${BINDIR}" \
2151    BLD_TYPE="${BLD_TYPE}" \
2152    CALC_INCDIR="${CALC_INCDIR}" \
2153    CALC_SHAREDIR="${CALC_SHAREDIR}" \
2154    CAT=${CAT} \
2155    CC="${CC}" \
2156    CCBAN="${CCBAN}" \
2157    CCERR="${CCERR}" \
2158    CCMISC="${CCMISC}" \
2159    CCOPT="${CCOPT}" \
2160    CCWARN="${CCWARN}" \
2161    CC_SHARE="${CC_SHARE}" \
2162    CFLAGS="${CFLAGS} -I.." \
2163    CHMOD=${CHMOD} \
2164    CMP=${CMP} \
2165    CO=${CO} \
2166    COMMON_ADD="${COMMON_ADD}" \
2167    COMMON_CFLAGS="${COMMON_CFLAGS} -I.." \
2168    COMMON_LDFLAGS="${COMMON_LDFLAGS}" \
2169    CP=${CP} \
2170    CUSTOMCALDIR="${CUSTOMCALDIR}" \
2171    CUSTOMHELPDIR="${CUSTOMHELPDIR}" \
2172    CUSTOMINCDIR="${CUSTOMINCDIR}" \
2173    DEBUG="${DEBUG}" \
2174    DEFAULT_LIB_INSTALL_PATH="${DEFAULT_LIB_INSTALL_PATH}" \
2175    DIFF="${DIFF}" \
2176    E="${E}" \
2177    FMT=${FMT} \
2178    GREP=${GREP} \
2179    H="${H}" \
2180    HELPDIR="${HELPDIR}" \
2181    ICFLAGS="${ICFLAGS} -I.." \
2182    ILDFLAGS="${ILDFLAGS}" \
2183    INCDIR="${INCDIR}" \
2184    LANG=${LANG} \
2185    LCC="${LCC}" \
2186    LDCONFIG=${LDCONFIG} \
2187    LDFLAGS="${LDFLAGS}" \
2188    LD_SHARE="${LD_SHARE}" \
2189    LIBCUSTCALC_SHLIB="${LIBCUSTCALC_SHLIB}" \
2190    LIBDIR="${LIBDIR}" \
2191    LN=${LN} \
2192    LS=${LS} \
2193    MAKE=${MAKE} \
2194    MAKEDEPEND=${MAKEDEPEND} \
2195    MAKE_FILE=Makefile \
2196    MKDIR=${MKDIR} \
2197    MV=${MV} \
2198    PREFIX="${PREFIX}" \
2199    PURIFY="${PURIFY}" \
2200    Q="${Q}" \
2201    RANLIB="${RANLIB}" \
2202    RM=${RM} \
2203    RMDIR=${RMDIR} \
2204    S="${S}" \
2205    SCRIPTDIR="${SCRIPTDIR}" \
2206    SED=${SED} \
2207    SHELL=${SHELL} \
2208    SORT=${SORT} \
2209    T=${T} \
2210    TAIL=${TAIL} \
2211    TOUCH=${TOUCH} \
2212    TRUE=${TRUE} \
2213    V=${V} \
2214    VERSION=${VERSION} \
2215    WNO_IMPLICT=${WNO_IMPLICT} \
2216    WNO_ERROR_LONG_LONG=${WNO_ERROR_LONG_LONG} \
2217    WNO_LONG_LONG=${WNO_LONG_LONG} \
2218    target=${target}
2219
2220# The complete list of Makefile vars passed down to help/Makefile.
2221#
2222HELP_PASSDOWN= \
2223    AR=${AR} \
2224    BINDIR="${BINDIR}" \
2225    CALC_INCDIR="${CALC_INCDIR}" \
2226    CALC_SHAREDIR="${CALC_SHAREDIR}" \
2227    CAT=${CAT} \
2228    CFLAGS="${CFLAGS}" \
2229    CHMOD=${CHMOD} \
2230    CMP=${CMP} \
2231    CO=${CO} \
2232    COMMON_ADD="${COMMON_ADD}" \
2233    COMMON_CFLAGS="${COMMON_CFLAGS}" \
2234    COMMON_LDFLAGS="${COMMON_LDFLAGS}" \
2235    CP=${CP} \
2236    E="${E}" \
2237    EXT=${EXT} \
2238    FMT=${FMT} \
2239    GREP=${GREP} \
2240    H="${H}" \
2241    HELPDIR="${HELPDIR}" \
2242    ICFLAGS="${ICFLAGS}" \
2243    ILDFLAGS="${ILDFLAGS}" \
2244    INCDIR="${INCDIR}" \
2245    LANG=${LANG} \
2246    LCC="${LCC}" \
2247    LIBDIR="${LIBDIR}" \
2248    MAKE_FILE=Makefile \
2249    MKDIR=${MKDIR} \
2250    MV=${MV} \
2251    PREFIX="${PREFIX}" \
2252    Q="${Q}" \
2253    RM=${RM} \
2254    RMDIR=${RMDIR} \
2255    S="${S}" \
2256    SCRIPTDIR="${SCRIPTDIR}" \
2257    SED=${SED} \
2258    SHELL=${SHELL} \
2259    T=${T} \
2260    TOUCH=${TOUCH} \
2261    TRUE=${TRUE} \
2262    V=${V}
2263
2264# The complete list of Makefile vars passed down to cal/Makefile.
2265#
2266CAL_PASSDOWN= \
2267    AR=${AR} \
2268    BINDIR="${BINDIR}" \
2269    CALC_INCDIR="${CALC_INCDIR}" \
2270    CALC_SHAREDIR="${CALC_SHAREDIR}" \
2271    CAT=${CAT} \
2272    CHMOD=${CHMOD} \
2273    CMP=${CMP} \
2274    CO=${CO} \
2275    CP=${CP} \
2276    E="${E}" \
2277    H="${H}" \
2278    HELPDIR="${HELPDIR}" \
2279    INCDIR="${INCDIR}" \
2280    LANG=${LANG} \
2281    LIBDIR="${LIBDIR}" \
2282    MAKE_FILE=Makefile \
2283    MKDIR=${MKDIR} \
2284    MV=${MV} \
2285    PREFIX="${PREFIX}" \
2286    Q="${Q}" \
2287    RM=${RM} \
2288    RMDIR=${RMDIR} \
2289    S="${S}" \
2290    SCRIPTDIR="${SCRIPTDIR}" \
2291    SHELL=${SHELL} \
2292    T=${T} \
2293    TOUCH=${TOUCH} \
2294    TRUE=${TRUE} \
2295    V=${V}
2296
2297# The complete list of Makefile vars passed down to cscript/Makefile.
2298#
2299CSCRIPT_PASSDOWN= \
2300    AR=${AR} \
2301    BINDIR="${BINDIR}" \
2302    CALC_INCDIR="${CALC_INCDIR}" \
2303    CALC_SHAREDIR="${CALC_SHAREDIR}" \
2304    CAT=${CAT} \
2305    CHMOD=${CHMOD} \
2306    CMP=${CMP} \
2307    CO=${CO} \
2308    CP=${CP} \
2309    E="${E}" \
2310    ECHON="${ECHON}" \
2311    FMT=${FMT} \
2312    H="${H}" \
2313    HELPDIR="${HELPDIR}" \
2314    INCDIR="${INCDIR}" \
2315    LANG=${LANG} \
2316    LIBDIR="${LIBDIR}" \
2317    MAKE_FILE=Makefile \
2318    MKDIR=${MKDIR} \
2319    MV=${MV} \
2320    PREFIX="${PREFIX}" \
2321    Q="${Q}" \
2322    RM=${RM} \
2323    RMDIR=${RMDIR} \
2324    S="${S}" \
2325    SCRIPTDIR="${SCRIPTDIR}" \
2326    SED=${SED} \
2327    SHELL=${SHELL} \
2328    SORT=${SORT} \
2329    T=${T} \
2330    TOUCH=${TOUCH} \
2331    TRUE=${TRUE} \
2332    V=${V}
2333
2334# complete list of .h files found (but not built) in the distribution
2335#
2336H_SRC= ${LIB_H_SRC} ${SAMPLE_H_SRC}
2337
2338# complete list of .c files found (but not built) in the distribution
2339#
2340C_SRC= ${LIBSRC} ${CALCSRC} ${UTIL_C_SRC} ${SAMPLE_C_SRC}
2341
2342# The list of files that describe calc's GNU Lesser General Public License
2343#
2344LICENSE= COPYING COPYING-LGPL
2345
2346# These files are found (but not built) in the distribution
2347#
2348DISTLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} BUGS CHANGES LIBRARY README.FIRST \
2349	  README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \
2350	  sample.README calc.spec.in rpm.mk README.md QUESTIONS CONTRIB-CODE \
2351	  ${LOC_MKF} Makefile.simple README.RELEASE
2352
2353# These files are used to make (but not build) a calc .a link library
2354#
2355CALCLIBLIST= ${LIBSRC} ${UTIL_C_SRC} ${LIB_H_SRC} ${MAKE_FILE} \
2356	     ${UTIL_MISC_SRC} BUGS CHANGES LIBRARY
2357
2358# complete list of .o files
2359#
2360OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJ}
2361
2362# static library build
2363#
2364#if 0	/* start of skip for non-Gnu makefiles */
2365#
2366ifdef ALLOW_CUSTOM
2367#
2368#endif	/* end of skip for non-Gnu makefiles */
2369CALC_STATIC_LIBS= libcalc.a libcustcalc.a
2370#if 0	/* start of skip for non-Gnu makefiles */
2371#
2372else
2373CALC_STATIC_LIBS= libcalc.a
2374endif
2375#
2376#endif	/* end of skip for non-Gnu makefiles */
2377
2378# Libraries created and used to build calc
2379#
2380#if 0	/* start of skip for non-Gnu makefiles */
2381#
2382ifdef ALLOW_CUSTOM
2383#
2384#endif	/* end of skip for non-Gnu makefiles */
2385CALC_DYNAMIC_LIBS= libcalc${LIB_EXT_VERSION} libcustcalc${LIB_EXT_VERSION}
2386#if 0	/* start of skip for non-Gnu makefiles */
2387#
2388else
2389CALC_DYNAMIC_LIBS= libcalc${LIB_EXT_VERSION}
2390endif
2391#
2392#endif	/* end of skip for non-Gnu makefiles */
2393
2394# Symlinks of dynamic shared libraries
2395#
2396#if 0	/* start of skip for non-Gnu makefiles */
2397#
2398ifdef ALLOW_CUSTOM
2399#
2400#
2401#endif	/* end of skip for non-Gnu makefiles */
2402SYM_DYNAMIC_LIBS= libcalc${LIB_EXT} \
2403	libcustcalc${LIB_EXT_VERSION}  libcustcalc${LIB_EXT}
2404#if 0	/* start of skip for non-Gnu makefiles */
2405#
2406else
2407SYM_DYNAMIC_LIBS= libcalc${LIB_EXT}
2408endif
2409#
2410#endif	/* end of skip for non-Gnu makefiles */
2411
2412# list of sample programs that need to be built to satisfy sample rule
2413#
2414# NOTE: The ${SAMPLE_TARGETS} and ${SAMPLE_STATIC_TARGETS} are built but
2415#	not installed at this time.
2416#
2417# NOTE: There must be a foo-static${EXT} in SAMPLE_STATIC_TARGETS for
2418#	every foo${EXT} in ${SAMPLE_TARGETS}.
2419#
2420SAMPLE_TARGETS= sample_rand${EXT} sample_many${EXT}
2421SAMPLE_STATIC_TARGETS= sample_rand-static${EXT} sample_many-static${EXT}
2422
2423# list of cscript programs that need to be built to satisfy cscript/.all
2424#
2425# NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable
2426#	in the cscript/Makefile
2427#
2428CSCRIPT_TARGETS= cscript/mersenne cscript/piforever cscript/plus \
2429		 cscript/square cscript/fproduct cscript/powerterm
2430
2431# dynamic first targets
2432#
2433DYNAMIC_FIRST_TARGETS= ${LICENSE} .dynamic
2434
2435# static first targets
2436#
2437STATIC_FIRST_TARGETS= ${LICENSE} .static
2438
2439# early targets - things needed before the main build phase can begin
2440#
2441#if 0	/* start of skip for non-Gnu makefiles */
2442#
2443ifdef ALLOW_CUSTOM
2444#
2445#endif	/* end of skip for non-Gnu makefiles */
2446EARLY_TARGETS= hsrc .hsrc custom/.all custom/Makefile
2447#if 0	/* start of skip for non-Gnu makefiles */
2448#
2449else
2450EARLY_TARGETS= hsrc .hsrc
2451endif
2452#
2453#endif	/* end of skip for non-Gnu makefiles */
2454
2455# late targets - things needed after the main build phase is complete
2456#
2457LATE_TARGETS= calc.1 calc.usage \
2458	      cal/.all help/.all help/builtin cscript/.all \
2459	      Makefile.simple
2460
2461# complete list of targets
2462#
2463TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS}
2464
2465#if 0	/* start of skip for non-Gnu makefiles */
2466#
2467###
2468#
2469# Allow Makefile.local to override any of the above settings
2470#
2471###
2472include ${LOC_MKF}
2473#
2474#endif	/* end of skip for non-Gnu makefiles */
2475
2476###
2477#
2478# The main reason for this Makefile	:-)
2479#
2480###
2481
2482all: check_include ${BLD_TYPE} CHANGES
2483
2484check_include:
2485	${Q} if ! echo '#include <stdio.h>' | ${CC} -E - >/dev/null 2>&1; then \
2486	    echo "ERROR: Missing critical <stdio.h> include file." 1>&2; \
2487	    echo "Without critical include files, we cannot compile." 1>&2; \
2488	    echo "Perhaps your system isn't setup to compile C source?" 1>&2; \
2489	    echo 1>&2; \
2490	    echo "For example, Apple macOS / Darwin requires that XCode" 1>&2; \
2491	    echo "must be installed." 1>&2; \
2492	    echo 1>&2; \
2493	    echo "Also macOS users might later to run this command:" 1>&2; \
2494	    echo 1>&2; \
2495	    echo "    xcode-select --install" 1>&2; \
2496	    echo 1>&2; \
2497	    exit 1; \
2498	fi
2499
2500prep:
2501	${Q} ${MAKE} -f ${MAKE_FILE} all DEBUG='-g3'
2502
2503calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \
2504		   ${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} calc${EXT} \
2505		   ${SAMPLE_TARGETS} ${LATE_TARGETS}
2506
2507.dynamic: ${MAKE_FILE} ${LOC_MKF}
2508	${Q} r="calc-dynamic-only"; \
2509	    if [ "${BLD_TYPE}" != "$$r" ]; then \
2510	    echo "NOTE: The host target $(target) defaults to a build" 1>&2; \
2511	    echo "      type of: ${BLD_TYPE}, so you need to use" 1>&2; \
2512	    echo "      the following make command:" 1>&2; \
2513	    echo "" 1>&2; \
2514	    echo "      ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
2515	    echo "      ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
2516	    echo "" 1>&2; \
2517	    echo "NOTE: It is a very good idea to first clobber any" 1>&2; \
2518	    echo "      previously built .o, libs and executables" 1>&2; \
2519	    echo "      before switching to $$r!" 1>&2; \
2520	    echo "" 1>&2; \
2521	    echo "=== aborting make ===" 1>&2; \
2522	    exit 1; \
2523	fi
2524	${Q} for i in .static calc-static${EXT} ${SAMPLE_STATIC_TARGETS} \
2525		      libcalc.a custom/libcustcalc.a; do \
2526	    r="calc-dynamic-only"; \
2527	    if [ -r "$$i" ]; then \
2528		echo "Found the static target $$i file.  You must:" 1>&2; \
2529		echo "" 1>&2; \
2530		echo "      ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
2531		echo "      ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
2532		echo "" 1>&2; \
2533		echo "to clean out any previously built static files." 1>&2; \
2534		echo "" 1>&2; \
2535		echo "=== aborting make ===" 1>&2; \
2536		exit 2; \
2537	    fi; \
2538	done
2539	 -${Q} ${TOUCH} $@
2540
2541calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \
2542		  ${CALC_STATIC_LIBS} calc-static${EXT} \
2543		  ${SAMPLE_STATIC_TARGETS} ${LATE_TARGETS}
2544	${Q} for i in calc${EXT} ${SAMPLE_TARGETS}; do \
2545	    if ${CMP} -s "$$i-static" "$$i"; then \
2546		${TRUE}; \
2547	    else \
2548		${RM} -f "$$i"; \
2549		${LN} "$$i-static" "$$i"; \
2550	    fi; \
2551	done
2552
2553.static: ${MAKE_FILE} ${LOC_MKF}
2554	${Q} r="calc-static-only"; \
2555	    if [ "${BLD_TYPE}" != "$$r" ]; then \
2556	    echo "NOTE: The host target $(target) defaults to a build" 1>&2; \
2557	    echo "      type of: ${BLD_TYPE}, so you need to use" 1>&2; \
2558	    echo "      the following make command:" 1>&2; \
2559	    echo "" 1>&2; \
2560	    echo "      ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
2561	    echo "      ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
2562	    echo "" 1>&2; \
2563	    echo "NOTE: It is a very good idea to first clobber any" 1>&2; \
2564	    echo "      previously built .o, libs and executables" 1>&2; \
2565	    echo "      before switching to $$r!" 1>&2; \
2566	    echo "" 1>&2; \
2567	    echo "=== aborting make ===" 1>&2; \
2568	    exit 3; \
2569	fi
2570	${Q} for i in .dynamic ${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} \
2571		      custom/libcustcalc${LIB_EXT_VERSION}; do \
2572	    r="calc-static-only"; \
2573	    if [ -r "$$i" ]; then \
2574		echo "Found the dynamic target $$i file.  You must:" 1>&2; \
2575		echo "" 1>&2; \
2576		echo "      ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
2577		echo "      ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
2578		echo "" 1>&2; \
2579		echo "to clean out any previously built dynamic files." 1>&2; \
2580		echo "" 1>&2; \
2581		echo "=== aborting make ===" 1>&2; \
2582		exit 4; \
2583	    fi; \
2584	done
2585	 -${Q} ${TOUCH} $@
2586
2587calc${EXT}: .hsrc ${CALCOBJS} ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} ${LOC_MKF}
2588	${RM} -f $@
2589	${CC} ${CALCOBJS} ${LDFLAGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \
2590	      ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
2591
2592libcalc${LIB_EXT_VERSION}: ${LIBOBJS} ver_calc${EXT} ${MAKE_FILE} ${LOC_MKF}
2593	${CC} ${LIBCALC_SHLIB} ${LIBOBJS} \
2594	      ${READLINE_LIB} ${READLINE_EXTRAS} -o libcalc${LIB_EXT_VERSION}
2595
2596libcalc${LIB_EXT}: libcalc${LIB_EXT_VERSION}
2597	${Q} ${RM} -f $@
2598	${LN} -s $? $@
2599
2600###
2601#
2602# calc documentation
2603#
2604###
2605
2606calc.1: calc.man ${MAKE_FILE} ${LOC_MKF}
2607	${RM} -f $@
2608	${Q} echo forming calc.1 from calc.man
2609	@${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \
2610	        -e 's,$${BINDIR},${BINDIR},g' \
2611	        -e 's,$${VERSION},${VERSION},g' \
2612	        -e 's,$${CALCPATH},${CALCPATH},g' \
2613	        -e 's,$${SCRIPTDIR},${SCRIPTDIR},g' \
2614	        -e 's,$${CALC_INCDIR},${CALC_INCDIR},g' \
2615	        -e 's,$${CUSTOMCALDIR},${CUSTOMCALDIR},g' \
2616	        -e 's,$${CUSTOMINCDIR},${CUSTOMINCDIR},g' \
2617	        -e 's,$${HELPDIR},${HELPDIR},g' \
2618	        -e 's,$${CUSTOMHELPDIR},${CUSTOMHELPDIR},g' \
2619	        -e 's,$${CALCRC},${CALCRC},g' < calc.man > calc.1
2620	${Q} echo calc.1 formed
2621
2622calc.usage: calc.1 ${MAKE_FILE} ${LOC_MKF}
2623	${RM} -f $@
2624	${Q} echo forming calc.usage from calc.1
2625	${Q} if [ -z "${NROFF}" ]; then \
2626	    LESSCHARSET=iso8859 ${CALCPAGER} calc.1; \
2627	else \
2628	    ${NROFF} -man calc.1; \
2629	fi 2>&1 | ${GREP} -v 'cannot adjust line' | ${COL} -b > $@
2630	${Q} echo calc.usage formed
2631
2632
2633##
2634#
2635# These rules compile the sample code against the calc library
2636#
2637##
2638
2639sample: ${SAMPLE_TARGETS}
2640
2641sample_rand${EXT}: sample_rand.o ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} ${LOC_MKF}
2642	${CC} sample_rand.o ${LDFLAGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \
2643	      ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
2644
2645sample_many${EXT}: sample_many.o ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} ${LOC_MKF}
2646	${CC} sample_many.o ${LDFLAGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \
2647	      ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
2648
2649###
2650#
2651# Special .o files that may need special compile options
2652#
2653###
2654
2655hist.o: hist.c ${MAKE_FILE} ${LOC_MKF}
2656	${CC} ${CFLAGS} ${TERMCONTROL} ${USE_READLINE} ${READLINE_INCLUDE} \
2657	    -c hist.c
2658
2659seed.o: seed.c ${MAKE_FILE} ${LOC_MKF}
2660	${CC} ${CFLAGS} ${WNO_IMPLICT} ${WNO_ERROR_LONG_LONG} \
2661	    ${WNO_LONG_LONG} -c seed.c
2662
2663file.o: file.c ${MAKE_FILE} ${LOC_MKF}
2664	${CC} ${CFLAGS} ${WNO_ERROR_LONG_LONG} ${WNO_LONG_LONG} -c file.c
2665
2666###
2667#
2668# The next set of rules cause the .h files BUILD_H_SRC files to be built
2669# according to the system and the Makefile variables above.  The hsrc rule
2670# is a convenient rule to invoke to build all of the BUILD_H_SRC.
2671#
2672# We add in the BUILD_C_SRC files because they are similar to the
2673# BUILD_H_SRC files in terms of the build process.
2674#
2675# NOTE: Due to bogus shells found on one common system we must have
2676#	an non-empty else clause for every if condition.  *sigh*
2677#	We also place ; ${TRUE} at the end of some commands to avoid
2678#	meaningless cosmetic messages by the same system.
2679#
2680###
2681
2682hsrc: ${BUILD_H_SRC} ${BUILD_C_SRC}
2683
2684.hsrc: ${BUILD_H_SRC} ${BUILD_C_SRC}
2685	${Q} ${RM} -f .hsrc
2686	-${Q} ${TOUCH} .hsrc
2687
2688conf.h: ${MAKE_FILE} ${LOC_MKF}
2689	${Q} ${RM} -f $@
2690	${H} echo 'forming $@'
2691	${Q} echo '/*' > $@
2692	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
2693	${Q} echo ' */' >> $@
2694	${Q} echo '' >> $@
2695	${Q} echo '' >> $@
2696	${Q} echo '#if !defined(CALC_CONF_H)' >> $@
2697	${Q} echo '#define CALC_CONF_H' >> $@
2698	${Q} echo '' >> $@
2699	${Q} echo '' >> $@
2700	${Q} echo '/* the default :-separated search path */' >> $@
2701	${Q} echo '#if !defined(DEFAULTCALCPATH)' >> $@
2702	${Q} echo '#define DEFAULTCALCPATH "${CALCPATH}"' >> $@
2703	${Q} echo '#endif /* DEFAULTCALCPATH */' >> $@
2704	${Q} echo '' >> $@
2705	${Q} echo '/* the default :-separated startup file list */' >> $@
2706	${Q} echo '#if !defined(DEFAULTCALCRC)' >> $@
2707	${Q} echo '#define DEFAULTCALCRC "${CALCRC}"' >> $@
2708	${Q} echo '#endif /* DEFAULTCALCRC */' >> $@
2709	${Q} echo '' >> $@
2710	${Q} echo '/* the location of the help directory */' >> $@
2711	${Q} echo '#if !defined(HELPDIR)' >> $@
2712#if 0	/* start of skip for non-Gnu makefiles */
2713#
2714ifdef RPM_TOP
2715	${Q} echo '#define HELPDIR "${HELPDIR}"' >> $@
2716else
2717#
2718#endif	/* end of skip for non-Gnu makefiles */
2719	${Q} echo '#define HELPDIR "${T}${HELPDIR}"' >> $@
2720#if 0	/* start of skip for non-Gnu makefiles */
2721#
2722endif
2723#
2724#endif	/* end of skip for non-Gnu makefiles */
2725	${Q} echo '#endif /* HELPDIR */' >> $@
2726	${Q} echo '' >> $@
2727#if 0	/* start of skip for non-Gnu makefiles */
2728#
2729ifdef ALLOW_CUSTOM
2730#
2731#endif	/* end of skip for non-Gnu makefiles */
2732	${Q} echo '/* the location of the custom help directory */' >> $@
2733	${Q} echo '#if !defined(CUSTOMHELPDIR)' >> $@
2734#if 0	/* start of skip for non-Gnu makefiles */
2735#
2736ifdef RPM_TOP
2737	${Q} echo '#define CUSTOMHELPDIR "${CUSTOMHELPDIR}"' >> $@
2738else
2739#
2740#endif	/* end of skip for non-Gnu makefiles */
2741	${Q} echo '#define CUSTOMHELPDIR "${T}${CUSTOMHELPDIR}"' >> $@
2742#if 0	/* start of skip for non-Gnu makefiles */
2743#
2744endif
2745#
2746#endif	/* end of skip for non-Gnu makefiles */
2747	${Q} echo '#endif /* CUSTOMHELPDIR */' >> $@
2748	${Q} echo '' >> $@
2749#if 0	/* start of skip for non-Gnu makefiles */
2750#
2751endif
2752#
2753#endif	/* end of skip for non-Gnu makefiles */
2754	${Q} echo '/* the default pager to use */' >> $@
2755	${Q} echo '#if !defined(DEFAULTCALCPAGER)' >> $@
2756	${Q} echo '#define DEFAULTCALCPAGER "${CALCPAGER}"' >> $@
2757	${Q} echo '#endif /* DEFAULTCALCPAGER */' >> $@
2758	${Q} echo '' >> $@
2759	${Q} echo '' >> $@
2760	${Q} echo '#endif /* !CALC_CONF_H */' >> $@
2761	${H} echo '$@ formed'
2762	-@if [ -z "${Q}" ]; then \
2763	    echo ''; \
2764	    echo '=-=-= start of $@ =-=-='; \
2765	    ${CAT} $@; \
2766	    echo '=-=-= end of $@ =-=-='; \
2767	    echo ''; \
2768	else \
2769	    ${TRUE}; \
2770	fi
2771
2772endian_calc.h: endian.c have_stdlib.h have_unistd.h \
2773	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
2774	${Q} ${RM} -f endian.o endian${EXT} $@
2775	${H} echo 'forming $@'
2776	${Q} echo '/*' > $@
2777	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
2778	${Q} echo ' */' >> $@
2779	${Q} echo '' >> $@
2780	${Q} echo '' >> $@
2781	${Q} echo '#if !defined(ENDIAN_CALC_H)' >> $@
2782	${Q} echo '#define ENDIAN_CALC_H' >> $@
2783	${Q} echo '' >> $@
2784	${Q} echo '' >> $@
2785	${Q} echo '/* what byte order are we? */' >> $@
2786	-${Q} if [ X"${CALC_BYTE_ORDER}" = X ]; then \
2787	    if echo '#include <endian.h>' | ${CC} -E - ${S}; then \
2788		echo '#include <endian.h>' >> $@; \
2789		echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> $@; \
2790	    elif echo '#include <machine/endian.h>' | \
2791		 ${CC} -E - ${S}; then \
2792		echo '#include <machine/endian.h>' >> $@; \
2793		echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> $@; \
2794	    elif echo '#include <sys/endian.h>' | \
2795		 ${CC} -E- ${S}; then \
2796		echo '#include <sys/endian.h>' >> $@; \
2797		echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> $@; \
2798	    else \
2799		${LCC} ${ICFLAGS} ${CALC_BYTE_ORDER} endian.c -c ${S}; \
2800		${LCC} ${ILDFLAGS} endian.o -o endian${EXT} ${S}; \
2801		./endian${EXT} >> $@; \
2802		${RM} -f endian.o endian${EXT}; \
2803	    fi; \
2804	else \
2805	    ${LCC} ${ICFLAGS} ${CALC_BYTE_ORDER} endian.c -c ${S}; \
2806	    ${LCC} ${ILDFLAGS} endian.o -o endian${EXT} ${S}; \
2807	    ./endian${EXT} >> $@; \
2808	    ${RM} -f endian.o endian${EXT}; \
2809	fi
2810	${Q} echo '' >> $@
2811	${Q} echo '' >> $@
2812	${Q} echo '#endif /* !ENDIAN_CALC_H */' >> $@
2813	${H} echo '$@ formed'
2814	-@if [ -z "${Q}" ]; then \
2815	    echo ''; \
2816	    echo '=-=-= start of $@ =-=-='; \
2817	    ${CAT} $@; \
2818	    echo '=-=-= end of $@ =-=-='; \
2819	    echo ''; \
2820	else \
2821	    ${TRUE}; \
2822	fi
2823
2824charbit.h: charbit.c have_limits.h \
2825	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
2826	${Q} ${RM} -f charbit.o charbit${EXT} $@
2827	${H} echo 'forming $@'
2828	${Q} echo '/*' > $@
2829	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
2830	${Q} echo ' */' >> $@
2831	${Q} echo '' >> $@
2832	${Q} echo '' >> $@
2833	${Q} echo '#if !defined(CALC_CHARBIT_H)' >> $@
2834	${Q} echo '#define CALC_CHARBIT_H' >> $@
2835	${Q} echo '' >> $@
2836	${Q} echo '' >> $@
2837	-@if [ -z ${CALC_CHARBIT} ]; then \
2838	    ${LCC} ${ICFLAGS} charbit.c -c ${S}; \
2839	    ${LCC} ${ILDFLAGS} charbit.o -o charbit${EXT} ${S}; \
2840	    ./charbit${EXT} >> $@ ${E}; \
2841	else \
2842	    echo '#define CALC_CHARBIT ${CALC_CHARBIT} ' \
2843		 '/* set by Makefile.ship */' >> $@; \
2844	fi
2845	${Q} echo '' >> $@
2846	${Q} echo '' >> $@
2847	${Q} echo '#endif /* !CALC_CHARBIT_H */' >> $@
2848	${H} echo '$@ formed'
2849	${Q} ${RM} -f charbit.o charbit${EXT}
2850	-@if [ -z "${Q}" ]; then \
2851	    echo ''; \
2852	    echo '=-=-= start of $@ =-=-='; \
2853	    ${CAT} $@; \
2854	    echo '=-=-= end of $@ =-=-='; \
2855	    echo ''; \
2856	else \
2857	    ${TRUE}; \
2858	fi
2859
2860longbits.h: longbits.c charbit.h have_unistd.h have_stdlib.h \
2861	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
2862	${Q} ${RM} -f longbits.o longbits${EXT} $@
2863	${H} echo 'forming $@'
2864	${Q} echo '/*' > $@
2865	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
2866	${Q} echo ' */' >> $@
2867	${Q} echo '' >> $@
2868	${Q} echo '' >> $@
2869	${Q} echo '#if !defined(CALC_LONGBITS_H)' >> $@
2870	${Q} echo '#define CALC_LONGBITS_H' >> $@
2871	${Q} echo '' >> $@
2872	${Q} echo '' >> $@
2873	${Q} ${LCC} ${ICFLAGS} longbits.c -c ${S}
2874	${Q} ${LCC} ${ILDFLAGS} longbits.o -o longbits${EXT} ${S}
2875	${Q} ./longbits${EXT} ${LONG_BITS} >> $@ ${E}
2876	${Q} echo '' >> $@
2877	${Q} echo '' >> $@
2878	${Q} echo '#endif /* !CALC_LONGBITS_H */' >> $@
2879	${H} echo '$@ formed'
2880	${Q} ${RM} -f longbits.o longbits${EXT}
2881	-@if [ -z "${Q}" ]; then \
2882	    echo ''; \
2883	    echo '=-=-= start of $@ =-=-='; \
2884	    ${CAT} $@; \
2885	    echo '=-=-= end of $@ =-=-='; \
2886	    echo ''; \
2887	else \
2888	    ${TRUE}; \
2889	fi
2890
2891have_times.h: ${MAKE_FILE} ${LOC_MKF}
2892	${Q} ${RM} -f $@
2893	${H} echo 'forming $@'
2894	${Q} echo '/*' > $@
2895	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
2896	${Q} echo ' */' >> $@
2897	${Q} echo '' >> $@
2898	${Q} echo '' >> $@
2899	${Q} echo '#if !defined(CALC_HAVE_TIMES_H)' >> $@
2900	${Q} echo '#define CALC_HAVE_TIMES_H' >> $@
2901	${Q} echo '' >> $@
2902	${Q} echo '' >> $@
2903	${Q} echo '/* do we have <times.h>? */' >> $@
2904	-${Q} if [ X"${HAVE_TIMES_H}" = X"YES" ]; then \
2905	    echo '#define HAVE_TIMES_H	/* yes */' >> $@; \
2906	elif [ X"${HAVE_TIMES_H}" = X"NO" ]; then \
2907	    echo '#undef HAVE_TIMES_H  /* no */' >> $@; \
2908	elif echo '#include <times.h>' | ${CC} -E - ${S}; then \
2909	    echo '#define HAVE_TIMES_H	/* yes */' >> $@; \
2910	else \
2911	    echo '#undef HAVE_TIMES_H  /* no */' >> $@; \
2912	fi
2913	${Q} echo '/* do we have <sys/times.h>? */' >> $@
2914	-${Q} if [ X"${HAVE_SYS_TIMES_H}" = X"YES" ]; then \
2915	    echo '#define HAVE_SYS_TIMES_H	/* yes */' >> $@; \
2916	elif [ X"${HAVE_SYS_TIMES_H}" = X"NO" ]; then \
2917	    echo '#undef HAVE_SYS_TIMES_H  /* no */' >> $@; \
2918	elif echo '#include <sys/times.h>' | ${CC} -E - ${S}; then \
2919	    echo '#define HAVE_SYS_TIMES_H  /* yes */' >> $@; \
2920	else \
2921	    echo '#undef HAVE_SYS_TIMES_H  /* no */' >> $@; \
2922	fi
2923	${Q} echo '/* do we have <time.h>? */' >> $@
2924	-${Q} if [ X"${HAVE_TIME_H}" = X"YES" ]; then \
2925	    echo '#define HAVE_TIME_H	/* yes */' >> $@; \
2926	elif [ X"${HAVE_TIME_H}" = X"NO" ]; then \
2927	    echo '#undef HAVE_TIME_H  /* no */' >> $@; \
2928	elif echo '#include <time.h>' | ${CC} -E - ${S}; then \
2929	    echo '#define HAVE_TIME_H  /* yes */' >> $@; \
2930	else \
2931	    echo '#undef HAVE_TIME_H  /* no */' >> $@; \
2932	fi
2933	${Q} echo '/* do we have <sys/time.h>? */' >> $@
2934	-${Q} if [ X"${HAVE_SYS_TIME_H}" = X"YES" ]; then \
2935	    echo '#define HAVE_SYS_TIME_H	/* yes */' >> $@; \
2936	elif [ X"${HAVE_SYS_TIME_H}" = X"NO" ]; then \
2937	    echo '#undef HAVE_SYS_TIME_H  /* no */' >> $@; \
2938	elif echo '#include <sys/time.h>' | ${CC} -E - ${S}; then \
2939	    echo '#define HAVE_SYS_TIME_H  /* yes */' >> $@; \
2940	else \
2941	    echo '#undef HAVE_SYS_TIME_H  /* no */' >> $@; \
2942	fi
2943	${Q} echo '' >> $@
2944	${Q} echo '' >> $@
2945	${Q} echo '#endif /* !CALC_HAVE_TIMES_H */' >> $@
2946	${H} echo '$@ formed'
2947	-@if [ -z "${Q}" ]; then \
2948	    echo ''; \
2949	    echo '=-=-= start of $@ =-=-='; \
2950	    ${CAT} $@; \
2951	    echo '=-=-= end of $@ =-=-='; \
2952	    echo ''; \
2953	else \
2954	    ${TRUE}; \
2955	fi
2956
2957have_stdlib.h: ${MAKE_FILE} ${LOC_MKF}
2958	${Q} ${RM} -f $@
2959	${H} echo 'forming $@'
2960	${Q} echo '/*' > $@
2961	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
2962	${Q} echo ' */' >> $@
2963	${Q} echo '' >> $@
2964	${Q} echo '' >> $@
2965	${Q} echo '#if !defined(CALC_HAVE_STDLIB_H)' >> have_stdlib.h
2966	${Q} echo '#define CALC_HAVE_STDLIB_H' >> have_stdlib.h
2967	${Q} echo '' >> $@
2968	${Q} echo '' >> $@
2969	${Q} echo '/* do we have <stdlib.h>? */' >> $@
2970	-${Q} if [ X"${HAVE_STDLIB_H}" = X"YES" ]; then \
2971	    echo '#define HAVE_STDLIB_H	/* yes */' >> have_stdlib.h; \
2972	elif [ X"${HAVE_STDLIB_H}" = X"NO" ]; then \
2973	    echo '#undef HAVE_STDLIB_H  /* no */' >> have_stdlib.h; \
2974	elif echo '#include <stdlib.h>' | ${CC} -E - ${S}; then \
2975	    echo '#define HAVE_STDLIB_H	 /* yes */' >> have_stdlib.h; \
2976	else \
2977	    echo '#undef HAVE_STDLIB_H	/* no */' >> have_stdlib.h; \
2978	fi
2979	${Q} echo '' >> $@
2980	${Q} echo '' >> $@
2981	${Q} echo '#endif /* !CALC_HAVE_STDLIB_H */' >> have_stdlib.h
2982	${H} echo '$@ formed'
2983	-@if [ -z "${Q}" ]; then \
2984	    echo ''; \
2985	    echo '=-=-= start of $@ =-=-='; \
2986	    ${CAT} $@; \
2987	    echo '=-=-= end of $@ =-=-='; \
2988	    echo ''; \
2989	else \
2990	    ${TRUE}; \
2991	fi
2992
2993have_unistd.h: ${MAKE_FILE} ${LOC_MKF}
2994	${Q} ${RM} -f $@
2995	${H} echo 'forming $@'
2996	${Q} echo '/*' > $@
2997	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
2998	${Q} echo ' */' >> $@
2999	${Q} echo '' >> $@
3000	${Q} echo '' >> $@
3001	${Q} echo '#if !defined(CALC_HAVE_UNISTD_H)' >> $@
3002	${Q} echo '#define CALC_HAVE_UNISTD_H' >> $@
3003	${Q} echo '' >> $@
3004	${Q} echo '' >> $@
3005	${Q} echo '/* do we have <unistd.h>? */' >> $@
3006	-${Q} if [ X"${HAVE_UNISTD_H}" = X"YES" ]; then \
3007	    echo '#define HAVE_UNISTD_H	/* yes */' >> $@; \
3008	elif [ X"${HAVE_UNISTD_H}" = X"NO" ]; then \
3009	    echo '#undef HAVE_UNISTD_H  /* no */' >> $@; \
3010	elif echo '#include <unistd.h>' | ${CC} -E - ${S}; then \
3011	    echo '#define HAVE_UNISTD_H	 /* yes */' >> $@; \
3012	else \
3013	    echo '#undef HAVE_UNISTD_H	/* no */' >> $@; \
3014	fi
3015	${Q} echo '' >> $@
3016	${Q} echo '' >> $@
3017	${Q} echo '#endif /* !CALC_HAVE_UNISTD_H */' >> $@
3018	${H} echo '$@ formed'
3019	-@if [ -z "${Q}" ]; then \
3020	    echo ''; \
3021	    echo '=-=-= start of $@ =-=-='; \
3022	    ${CAT} $@; \
3023	    echo '=-=-= end of $@ =-=-='; \
3024	    echo ''; \
3025	else \
3026	    ${TRUE}; \
3027	fi
3028
3029have_limits.h: ${MAKE_FILE} ${LOC_MKF}
3030	${Q} ${RM} -f $@
3031	${H} echo 'forming $@'
3032	${Q} echo '/*' > $@
3033	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3034	${Q} echo ' */' >> $@
3035	${Q} echo '' >> $@
3036	${Q} echo '' >> $@
3037	${Q} echo '#if !defined(CALC_HAVE_LIMITS_H)' >> $@
3038	${Q} echo '#define CALC_HAVE_LIMITS_H' >> $@
3039	${Q} echo '' >> $@
3040	${Q} echo '' >> $@
3041	${Q} echo '/* do we have <limits.h>? */' >> $@
3042	-${Q} if [ X"${HAVE_LIMITS_H}" = X"YES" ]; then \
3043	    echo '#define HAVE_LIMITS_H	/* yes */' >> $@; \
3044	elif [ X"${HAVE_LIMITS_H}" = X"NO" ]; then \
3045	    echo '#undef HAVE_LIMITS_H  /* no */' >> $@; \
3046	elif echo '#include <limits.h>' | ${CC} -E - ${S}; then \
3047	    echo '#define HAVE_LIMITS_H	 /* yes */' >> $@; \
3048	else \
3049	    echo '#undef HAVE_LIMITS_H	/* no */' >> $@; \
3050	fi
3051	${Q} echo '' >> $@
3052	${Q} echo '' >> $@
3053	${Q} echo '#endif /* !CALC_HAVE_LIMITS_H */' >> $@
3054	${H} echo '$@ formed'
3055	-@if [ -z "${Q}" ]; then \
3056	    echo ''; \
3057	    echo '=-=-= start of $@ =-=-='; \
3058	    ${CAT} $@; \
3059	    echo '=-=-= end of $@ =-=-='; \
3060	    echo ''; \
3061	else \
3062	    ${TRUE}; \
3063	fi
3064
3065have_string.h: ${MAKE_FILE} ${LOC_MKF}
3066	${Q} ${RM} -f $@
3067	${H} echo 'forming $@'
3068	${Q} echo '/*' > $@
3069	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3070	${Q} echo ' */' >> $@
3071	${Q} echo '' >> $@
3072	${Q} echo '' >> $@
3073	${Q} echo '#if !defined(CALC_HAVE_STRING_H)' >> $@
3074	${Q} echo '#define CALC_HAVE_STRING_H' >> $@
3075	${Q} echo '' >> $@
3076	${Q} echo '' >> $@
3077	${Q} echo '/* do we have <string.h>? */' >> $@
3078	-${Q} if [ X"${HAVE_STRING_H}" = X"YES" ]; then \
3079	    echo '#define HAVE_STRING_H	/* yes */' >> $@; \
3080	elif [ X"${HAVE_STRING_H}" = X"NO" ]; then \
3081	    echo '#undef HAVE_STRING_H  /* no */' >> $@; \
3082	elif echo '#include <string.h>' | ${CC} -E - ${S}; then \
3083	    echo '#define HAVE_STRING_H	 /* yes */' >> $@; \
3084	else \
3085	    echo '#undef HAVE_STRING_H	/* no */' >> $@; \
3086	fi
3087	${Q} echo '' >> $@
3088	${Q} echo '' >> $@
3089	${Q} echo '#endif /* !CALC_HAVE_STRING_H */' >> $@
3090	${H} echo '$@ formed'
3091	-@if [ -z "${Q}" ]; then \
3092	    echo ''; \
3093	    echo '=-=-= start of $@ =-=-='; \
3094	    ${CAT} $@; \
3095	    echo '=-=-= end of $@ =-=-='; \
3096	    echo ''; \
3097	else \
3098	    ${TRUE}; \
3099	fi
3100
3101terminal.h: ${MAKE_FILE} ${LOC_MKF}
3102	${Q} ${RM} -f $@
3103	${H} echo 'forming $@'
3104	${Q} echo '/*' > $@
3105	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3106	${Q} echo ' */' >> $@
3107	${Q} echo '' >> $@
3108	${Q} echo '' >> $@
3109	${Q} echo '#if !defined(CALC_TERMINAL_H)' >> $@
3110	${Q} echo '#define CALC_TERMINAL_H' >> $@
3111	${Q} echo '' >> $@
3112	${Q} echo '' >> $@
3113	${Q} echo '/* determine the type of terminal interface */' >> $@
3114	${Q} echo '#if !defined(USE_TERMIOS)' >> $@
3115	${Q} echo '#if !defined(USE_TERMIO)' >> $@
3116	${Q} echo '#if !defined(USE_SGTTY)' >> $@
3117	-${Q} if [ X"${TERMCONTROL}" = X"-DUSE_WIN32" ]; then \
3118	    echo '/* Windows, use none of these modes */' >> $@; \
3119	    echo '#undef USE_TERMIOS   /* <termios.h> */' >> $@; \
3120	    echo '#undef USE_TERMIO    /* <termio.h> */' >> $@; \
3121	    echo '#undef USE_SGTTY     /* <sys/ioctl.h> */' >> $@; \
3122	elif echo '#include <termios.h>' | ${CC} -E - ${S}; then \
3123	    echo '/* use termios */' >> $@; \
3124	    echo '#define USE_TERMIOS  /* <termios.h> */' >> $@; \
3125	    echo '#undef USE_TERMIO    /* <termio.h> */' >> $@; \
3126	    echo '#undef USE_SGTTY     /* <sys/ioctl.h> */' >> $@; \
3127	elif echo '#include <termio.h>' | ${CC} -E - ${S}; then \
3128	    echo '/* use termio */' >> $@; \
3129	    echo '#undef USE_TERMIOS   /* <termios.h> */' >> $@; \
3130	    echo '#define USE_TERMIO   /* <termio.h> */' >> $@; \
3131	    echo '#undef USE_SGTTY     /* <sys/ioctl.h> */' >> $@; \
3132	else \
3133	    echo '/* use sgtty */' >> $@; \
3134	    echo '#undef USE_TERMIOS   /* <termios.h> */' >> $@; \
3135	    echo '#undef USE_TERMIO    /* <termio.h> */' >> $@; \
3136	    echo '#define USE_SGTTY    /* <sys/ioctl.h> */' >> $@; \
3137	fi
3138	${Q} echo '#endif' >> $@
3139	${Q} echo '#endif' >> $@
3140	${Q} echo '#endif' >> $@
3141	${Q} echo '' >> $@
3142	${Q} echo '' >> $@
3143	${Q} echo '#endif /* !CALC_TERMINAL_H */' >> $@
3144	${H} echo '$@ formed'
3145	-@if [ -z "${Q}" ]; then \
3146	    echo ''; \
3147	    echo '=-=-= start of $@ =-=-='; \
3148	    ${CAT} $@; \
3149	    echo '=-=-= end of $@ =-=-='; \
3150	    echo ''; \
3151	else \
3152	    ${TRUE}; \
3153	fi
3154
3155have_fpos.h: have_fpos.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3156	${Q} ${RM} -f fpos_tmp $@
3157	${H} echo 'forming $@'
3158	${Q} echo '/*' > $@
3159	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3160	${Q} echo ' */' >> $@
3161	${Q} echo '' >> $@
3162	${Q} echo '' >> $@
3163	${Q} echo '#if !defined(CALC_HAVE_FPOS_H)' >> $@
3164	${Q} echo '#define CALC_HAVE_FPOS_H' >> $@
3165	${Q} echo '' >> $@
3166	${Q} echo '' >> $@
3167	${Q} echo '/* do we have fgetpos & fsetpos functions? */' >> $@
3168	${Q} ${RM} -f have_fpos.o have_fpos${EXT}
3169	-${Q} ${LCC} ${HAVE_FPOS} ${ICFLAGS} have_fpos.c -c ${S} \
3170		|| ${TRUE}
3171	-${Q} ${LCC} ${ILDFLAGS} have_fpos.o -o have_fpos${EXT} ${S} \
3172		|| ${TRUE}
3173	-${Q} ./have_fpos${EXT} > fpos_tmp ${E} \
3174		|| ${TRUE}
3175	-${Q} if [ -s fpos_tmp ]; then \
3176	    ${CAT} fpos_tmp >> $@; \
3177	else \
3178	    echo '#undef HAVE_FPOS  /* no */' >> $@; \
3179	    echo '' >> $@; \
3180	    echo 'typedef long FILEPOS;' >> $@; \
3181	fi
3182	${Q} echo '' >> $@
3183	${Q} echo '' >> $@
3184	${Q} echo '#endif /* !CALC_HAVE_FPOS_H */' >> $@
3185	${Q} ${RM} -f have_fpos${EXT} have_fpos.o fpos_tmp
3186	${H} echo '$@ formed'
3187	-@if [ -z "${Q}" ]; then \
3188	    echo ''; \
3189	    echo '=-=-= start of $@ =-=-='; \
3190	    ${CAT} $@; \
3191	    echo '=-=-= end of $@ =-=-='; \
3192	    echo ''; \
3193	else \
3194	    ${TRUE}; \
3195	fi
3196
3197have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h \
3198		 banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3199	${Q} ${RM} -f fpos_tmp $@
3200	${H} echo 'forming $@'
3201	${Q} echo '/*' > $@
3202	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3203	${Q} echo ' */' >> $@
3204	${Q} echo '' >> $@
3205	${Q} echo '' >> $@
3206	${Q} echo '#if !defined(CALC_HAVE_FPOS_POS_H)' >> $@
3207	${Q} echo '#define CALC_HAVE_FPOS_POS_H' >> $@
3208	${Q} echo '' >> $@
3209	${Q} echo '' >> $@
3210	${Q} echo '/* do we have fgetpos & fsetpos functions? */' >> $@
3211	${Q} ${RM} -f have_fpos_pos.o have_fpos_pos${EXT}
3212	-${Q} ${LCC} ${HAVE_FPOS} ${HAVE_FPOS_POS} ${ICFLAGS} \
3213		have_fpos_pos.c -c ${S} \
3214			|| ${TRUE}
3215	-${Q} ${LCC} ${ILDFLAGS} have_fpos_pos.o -o have_fpos_pos${EXT} ${S} \
3216		|| ${TRUE}
3217	-${Q} ./have_fpos_pos${EXT} > fpos_tmp ${E} \
3218		|| ${TRUE}
3219	-${Q} if [ -s fpos_tmp ]; then \
3220	    ${CAT} fpos_tmp >> $@; \
3221	else \
3222	    echo '#undef HAVE_FPOS_POS  /* no */' >> $@; \
3223	    echo '' >> $@; \
3224	    echo '#undef FPOS_POS_BITS' >> $@; \
3225	fi
3226	${Q} echo '' >> $@
3227	${Q} echo '' >> $@
3228	${Q} echo '#endif /* !CALC_HAVE_FPOS_POS_H */' >> $@
3229	${Q} ${RM} -f have_fpos_pos${EXT} have_fpos_pos.o fpos_tmp
3230	${H} echo '$@ formed'
3231	-@if [ -z "${Q}" ]; then \
3232	    echo ''; \
3233	    echo '=-=-= start of $@ =-=-='; \
3234	    ${CAT} $@; \
3235	    echo '=-=-= end of $@ =-=-='; \
3236	    echo ''; \
3237	else \
3238	    ${TRUE}; \
3239	fi
3240
3241fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \
3242	   endian_calc.h banned.h have_ban_pragma.h fposval.h.def alloc.h \
3243	   have_newstr.h have_memmv.h ${MAKE_FILE} ${LOC_MKF}
3244	${Q} ${RM} -f fposval_tmp $@
3245	${H} echo 'forming $@'
3246	${Q} echo '/*' > $@
3247	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3248	${Q} echo ' */' >> $@
3249	${Q} echo '' >> $@
3250	${Q} echo '' >> $@
3251	${Q} echo '#if !defined(CALC_FPOSVAL_H)' >> $@
3252	${Q} echo '#define CALC_FPOSVAL_H' >> $@
3253	${Q} echo '' >> $@
3254	${Q} echo '' >> $@
3255	${Q} echo '/* what are our file position & size types? */' >> $@
3256	${Q} ${RM} -f fposval.o fposval${EXT}
3257	-${Q} ${LCC} ${ICFLAGS} ${FPOS_BITS} ${OFF_T_BITS} \
3258		${DEV_BITS} ${INODE_BITS} fposval.c -c ${S} \
3259			|| ${TRUE}
3260	-${Q} ${LCC} ${ILDFLAGS} fposval.o -o fposval${EXT} ${S} \
3261		|| ${TRUE}
3262	-${Q} ./fposval${EXT} > fposval_tmp ${E} \
3263		|| ${TRUE}
3264	-${Q} if [ -s fposval_tmp ]; then \
3265	    ${CAT} fposval_tmp >> $@; \
3266	else \
3267	    echo 'WARNING!! ./fposval${EXT} failed, using fposval.h.def' 1>&2; \
3268	    ${CAT} fposval.h.def >> $@; \
3269	fi
3270	${Q} echo '' >> $@
3271	${Q} echo '' >> $@
3272	${Q} echo '#endif /* !CALC_FPOSVAL_H */' >> $@
3273	${Q} ${RM} -f fposval${EXT} fposval.o fposval_tmp
3274	${H} echo '$@ formed'
3275	-@if [ -z "${Q}" ]; then \
3276	    echo ''; \
3277	    echo '=-=-= start of $@ =-=-='; \
3278	    ${CAT} $@; \
3279	    echo '=-=-= end of $@ =-=-='; \
3280	    echo ''; \
3281	else \
3282	    ${TRUE}; \
3283	fi
3284
3285have_const.h: have_const.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3286	${Q} ${RM} -f have_const const_tmp $@
3287	${H} echo 'forming $@'
3288	${Q} echo '/*' > $@
3289	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3290	${Q} echo ' */' >> $@
3291	${Q} echo '' >> $@
3292	${Q} echo '' >> $@
3293	${Q} echo '#if !defined(CALC_HAVE_CONST_H)' >> $@
3294	${Q} echo '#define CALC_HAVE_CONST_H' >> $@
3295	${Q} echo '' >> $@
3296	${Q} echo '' >> $@
3297	${Q} echo '/* do we have or want const? */' >> $@
3298	${Q} ${RM} -f have_const.o have_const${EXT}
3299	-${Q} ${LCC} ${ICFLAGS} ${HAVE_CONST} have_const.c -c ${S} \
3300		|| ${TRUE}
3301	-${Q} ${LCC} ${ILDFLAGS} have_const.o -o have_const${EXT} ${S} \
3302		|| ${TRUE}
3303	-${Q} ./have_const${EXT} > const_tmp ${E} \
3304		|| ${TRUE}
3305	-${Q} if [ -s const_tmp ]; then \
3306	    ${CAT} const_tmp >> $@; \
3307	else \
3308	    echo '#undef HAVE_CONST /* no */' >> $@; \
3309	    echo '#undef CONST' >> $@; \
3310	    echo '#define CONST /* no */' >> $@; \
3311	fi
3312	${Q} echo '' >> $@
3313	${Q} echo '' >> $@
3314	${Q} echo '#endif /* !CALC_HAVE_CONST_H */' >> $@
3315	${Q} ${RM} -f have_const${EXT} have_const.o const_tmp
3316	${H} echo '$@ formed'
3317	-@if [ -z "${Q}" ]; then \
3318	    echo ''; \
3319	    echo '=-=-= start of $@ =-=-='; \
3320	    ${CAT} $@; \
3321	    echo '=-=-= end of $@ =-=-='; \
3322	    echo ''; \
3323	else \
3324	    ${TRUE}; \
3325	fi
3326
3327have_offscl.h: have_offscl.c have_unistd.h \
3328	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3329	${Q} ${RM} -f offscl_tmp $@
3330	${H} echo 'forming $@'
3331	${Q} echo '/*' > $@
3332	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3333	${Q} echo ' */' >> $@
3334	${Q} echo '' >> $@
3335	${Q} echo '' >> $@
3336	${Q} echo '#if !defined(CALC_HAVE_OFFSCL_H)' >> $@
3337	${Q} echo '#define CALC_HAVE_OFFSCL_H' >> $@
3338	${Q} echo '' >> $@
3339	${Q} echo '' >> $@
3340	${Q} ${RM} -f have_offscl.o have_offscl${EXT}
3341	-${Q} ${LCC} ${ICFLAGS} ${HAVE_OFFSCL} have_offscl.c -c ${S} \
3342		|| ${TRUE}
3343	-${Q} ${LCC} ${ILDFLAGS} have_offscl.o -o have_offscl${EXT} ${S} \
3344		|| ${TRUE}
3345	-${Q} ./have_offscl${EXT} > offscl_tmp ${E} \
3346		|| ${TRUE}
3347	-${Q} if [ -s offscl_tmp ]; then \
3348	    ${CAT} offscl_tmp >> $@; \
3349	else \
3350	    echo '#undef HAVE_OFF_T_SCALAR /* off_t is not a simple value */' \
3351		>> $@; \
3352	fi
3353	${Q} echo '' >> $@
3354	${Q} echo '' >> $@
3355	${Q} echo '#endif /* !CALC_HAVE_OFFSCL_H */' >> $@
3356	${Q} ${RM} -f have_offscl${EXT} have_offscl.o offscl_tmp
3357	${H} echo '$@ formed'
3358	-@if [ -z "${Q}" ]; then \
3359	    echo ''; \
3360	    echo '=-=-= start of $@ =-=-='; \
3361	    ${CAT} $@; \
3362	    echo '=-=-= end of $@ =-=-='; \
3363	    echo ''; \
3364	else \
3365	    ${TRUE}; \
3366	fi
3367
3368have_posscl.h: have_posscl.c have_fpos.h have_unistd.h \
3369	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3370	${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp $@
3371	${H} echo 'forming $@'
3372	${Q} echo '/*' > $@
3373	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3374	${Q} echo ' */' >> $@
3375	${Q} echo '' >> $@
3376	${Q} echo '' >> $@
3377	${Q} echo '#if !defined(CALC_HAVE_POSSCL_H)' >> $@
3378	${Q} echo '#define CALC_HAVE_POSSCL_H' >> $@
3379	${Q} echo '' >> $@
3380	${Q} echo '' >> $@
3381	${Q} ${RM} -f have_posscl.o have_posscl
3382	-${Q} ${LCC} ${ICFLAGS} ${HAVE_POSSCL} have_posscl.c -c ${S} \
3383		|| ${TRUE}
3384	-${Q} ${LCC} ${ILDFLAGS} have_posscl.o -o have_posscl ${S} \
3385		|| ${TRUE}
3386	-${Q} ./have_posscl > posscl_tmp ${E} \
3387		|| ${TRUE}
3388	-${Q} if [ -s posscl_tmp ]; then \
3389	    ${CAT} posscl_tmp >> $@; \
3390	else \
3391	    echo '/* FILEPOS is not a simple value */' >> $@; \
3392	    echo '#undef HAVE_FILEPOS_SCALAR' >> $@; \
3393	fi
3394	${Q} echo '' >> $@
3395	${Q} echo '' >> $@
3396	${Q} echo '#endif /* !CALC_HAVE_POSSCL_H */' >> $@
3397	${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp
3398	${H} echo '$@ formed'
3399	-@if [ -z "${Q}" ]; then \
3400	    echo ''; \
3401	    echo '=-=-= start of $@ =-=-='; \
3402	    ${CAT} $@; \
3403	    echo '=-=-= end of $@ =-=-='; \
3404	    echo ''; \
3405	else \
3406	    ${TRUE}; \
3407	fi
3408
3409align32.h: align32.c longbits.h have_unistd.h \
3410	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3411	${Q} ${RM} -f align32 align32_tmp $@
3412	${H} echo 'forming $@'
3413	${Q} echo '/*' > $@
3414	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3415	${Q} echo ' */' >> $@
3416	${Q} echo '' >> $@
3417	${Q} echo '' >> $@
3418	${Q} echo '#if !defined(CALC_ALIGN32_H)' >> $@
3419	${Q} echo '#define CALC_ALIGN32_H' >> $@
3420	${Q} echo '' >> $@
3421	${Q} echo '' >> $@
3422	${Q} echo '/* must we always align 32 bit accesses? */' >> $@
3423	-${Q} if [ X"-DMUST_ALIGN32" = X${ALIGN32} ]; then \
3424	    echo '/* forced to align 32 bit values */' >> $@; \
3425	    echo '#define MUST_ALIGN32' >> $@; \
3426	else \
3427	    ${TRUE}; \
3428	fi
3429	-${Q} if [ X"-UMUST_ALIGN32" = X${ALIGN32} ]; then \
3430	    echo '/* forced to not require 32 bit alignment */' >> $@; \
3431	    echo '#undef MUST_ALIGN32' >> $@; \
3432	else \
3433	    ${TRUE}; \
3434	fi
3435	-${Q} if [ X = X${ALIGN32} ]; then \
3436	    ${RM} -f align32.o align32${EXT}; \
3437	    ${LCC} ${ICFLAGS} ${ALIGN32} align32.c -c ${S}; \
3438	    ${LCC} ${ILDFLAGS} align32.o -o align32${EXT} ${S}; \
3439	    ./align32${EXT} >align32_tmp ${E}; \
3440	    if [ -s align32_tmp ]; then \
3441		${CAT} align32_tmp >> $@; \
3442	    else \
3443		echo '/* guess we must align 32 bit values */' >> $@; \
3444		echo '#define MUST_ALIGN32' >> $@; \
3445	    fi; \
3446	    ${RM} -f align32${EXT} align32.o align32_tmp core; \
3447	else \
3448	    ${TRUE}; \
3449	fi
3450	${Q} echo '' >> $@
3451	${Q} echo '' >> $@
3452	${Q} echo '#endif /* !CALC_ALIGN32_H */' >> $@
3453	${H} echo '$@ formed'
3454	-@if [ -z "${Q}" ]; then \
3455	    echo ''; \
3456	    echo '=-=-= start of $@ =-=-='; \
3457	    ${CAT} $@; \
3458	    echo '=-=-= end of $@ =-=-='; \
3459	    echo ''; \
3460	else \
3461	    ${TRUE}; \
3462	fi
3463
3464have_uid_t.h: have_uid_t.c have_unistd.h \
3465	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3466	${Q} ${RM} -f have_uid_t uid_tmp $@
3467	${H} echo 'forming $@'
3468	${Q} echo '/*' > $@
3469	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3470	${Q} echo ' */' >> $@
3471	${Q} echo '' >> $@
3472	${Q} echo '' >> $@
3473	${Q} echo '#if !defined(CALC_HAVE_UID_T_H)' >> $@
3474	${Q} echo '#define CALC_HAVE_UID_T_H' >> $@
3475	${Q} echo '' >> $@
3476	${Q} echo '' >> $@
3477	${Q} echo '/* do we have or want uid_t? */' >> $@
3478	${Q} ${RM} -f have_uid_t.o have_uid_t${EXT}
3479	-${Q} ${LCC} ${ICFLAGS} ${HAVE_UID_T} have_uid_t.c -c ${S} \
3480		|| ${TRUE}
3481	-${Q} ${LCC} ${ILDFLAGS} have_uid_t.o -o have_uid_t${EXT} ${S} \
3482		|| ${TRUE}
3483	-${Q} ./have_uid_t${EXT} > uid_tmp ${E} \
3484		|| ${TRUE}
3485	-${Q} if [ -s uid_tmp ]; then \
3486	    ${CAT} uid_tmp >> $@; \
3487	else \
3488	    echo '#undef HAVE_UID_T /* no */' >> $@; \
3489	fi
3490	${Q} echo '' >> $@
3491	${Q} echo '' >> $@
3492	${Q} echo '#endif /* !CALC_HAVE_UID_T_H */' >> $@
3493	${Q} ${RM} -f have_uid_t${EXT} have_uid_t.o uid_tmp
3494	${H} echo '$@ formed'
3495	-@if [ -z "${Q}" ]; then \
3496	    echo ''; \
3497	    echo '=-=-= start of $@ =-=-='; \
3498	    ${CAT} $@; \
3499	    echo '=-=-= end of $@ =-=-='; \
3500	    echo ''; \
3501	else \
3502	    ${TRUE}; \
3503	fi
3504
3505have_environ.h: have_environ.c \
3506	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3507	${Q} ${RM} -f have_environ environ_tmp $@
3508	${H} echo 'forming $@'
3509	${Q} echo '/*' > $@
3510	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3511	${Q} echo ' */' >> $@
3512	${Q} echo '' >> $@
3513	${Q} echo '' >> $@
3514	${Q} echo '#if !defined(CALC_HAVE_ENVIRON_H)' >> $@
3515	${Q} echo '#define CALC_HAVE_ENVIRON_H' >> $@
3516	${Q} echo '' >> $@
3517	${Q} echo '' >> $@
3518	${Q} echo '/* do we have or want environ? */' >> $@
3519	${Q} ${RM} -f have_environ.o have_environ${EXT}
3520	-${Q} ${LCC} ${ICFLAGS} ${HAVE_ENVIRON} have_environ.c -c ${S} \
3521		|| ${TRUE}
3522	-${Q} ${LCC} ${ILDFLAGS} have_environ.o -o have_environ${EXT} ${S} \
3523		|| ${TRUE}
3524	-${Q} ./have_environ${EXT} > environ_tmp ${E} \
3525		|| ${TRUE}
3526	-${Q} if [ -s environ_tmp ]; then \
3527	    ${CAT} environ_tmp >> $@; \
3528	else \
3529	    echo '#undef HAVE_ENVIRON /* no */' >> $@; \
3530	fi
3531	${Q} echo '' >> $@
3532	${Q} echo '' >> $@
3533	${Q} echo '#endif /* !CALC_HAVE_ENVIRON_H */' >> $@
3534	${Q} ${RM} -f have_environ${EXT} have_environ.o environ_tmp
3535	${H} echo '$@ formed'
3536	-@if [ -z "${Q}" ]; then \
3537	    echo ''; \
3538	    echo '=-=-= start of $@ =-=-='; \
3539	    ${CAT} $@; \
3540	    echo '=-=-= end of $@ =-=-='; \
3541	    echo ''; \
3542	else \
3543	    ${TRUE}; \
3544	fi
3545
3546have_arc4random.h: have_arc4random.c have_stdlib.h \
3547	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3548	${Q} ${RM} -f have_arc4random arc4random_tmp $@
3549	${H} echo 'forming $@'
3550	${Q} echo '/*' > $@
3551	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3552	${Q} echo ' */' >> $@
3553	${Q} echo '' >> $@
3554	${Q} echo '' >> $@
3555	${Q} echo '#if !defined(HAVE_ARC4RANDOM)' >> $@
3556	${Q} echo '#define HAVE_ARC4RANDOM' >> $@
3557	${Q} echo '' >> $@
3558	${Q} echo '' >> $@
3559	${Q} echo '/* do we have or want arc4random? */' >> $@
3560	${Q} ${RM} -f have_arc4random.o have_arc4random${EXT}
3561	-${Q} ${LCC} ${ICFLAGS} ${HAVE_ARC4RANDOM} have_arc4random.c -c ${S} \
3562		|| ${TRUE}
3563	-${Q} ${LCC} ${ILDFLAGS} have_arc4random.o \
3564		-o have_arc4random${EXT} ${S} \
3565		|| ${TRUE}
3566	-${Q} ./have_arc4random${EXT} > arc4random_tmp ${E} \
3567		|| ${TRUE}
3568	-${Q} if [ -s arc4random_tmp ]; then \
3569	    ${CAT} arc4random_tmp >> $@; \
3570	else \
3571	    echo '#undef HAVE_ARC4RANDOM /* no */' >> $@; \
3572	fi
3573	${Q} echo '' >> $@
3574	${Q} echo '' >> $@
3575	${Q} echo '#endif /* !HAVE_ARC4RANDOM */' >> $@
3576	${Q} ${RM} -f have_arc4random${EXT} have_arc4random.o arc4random_tmp
3577	${H} echo '$@ formed'
3578	-@if [ -z "${Q}" ]; then \
3579	    echo ''; \
3580	    echo '=-=-= start of $@ =-=-='; \
3581	    ${CAT} $@; \
3582	    echo '=-=-= end of $@ =-=-='; \
3583	    echo ''; \
3584	else \
3585	    ${TRUE}; \
3586	fi
3587
3588have_newstr.h: have_newstr.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3589	${Q} ${RM} -f newstr_tmp $@
3590	${H} echo 'forming $@'
3591	${Q} echo '/*' > $@
3592	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3593	${Q} echo ' */' >> $@
3594	${Q} echo '' >> $@
3595	${Q} echo '' >> $@
3596	${Q} echo '#if !defined(CALC_HAVE_NEWSTR_H)' >> $@
3597	${Q} echo '#define CALC_HAVE_NEWSTR_H' >> $@
3598	${Q} echo '' >> $@
3599	${Q} echo '' >> $@
3600	${Q} echo '/* do we have/want memcpy(), memset() & strchr()? */' >> $@
3601	${Q} ${RM} -f have_newstr.o have_newstr${EXT}
3602	-${Q} ${LCC} ${ICFLAGS} ${HAVE_NEWSTR} have_newstr.c -c ${S} \
3603		|| ${TRUE}
3604	-${Q} ${LCC} ${ILDFLAGS} have_newstr.o -o have_newstr${EXT} ${S} \
3605		|| ${TRUE}
3606	-${Q} ./have_newstr${EXT} > newstr_tmp ${E} \
3607		|| ${TRUE}
3608	-${Q} if [ -s newstr_tmp ]; then \
3609	    ${CAT} newstr_tmp >> $@; \
3610	else \
3611	    echo '#undef HAVE_NEWSTR /* no */' >> $@; \
3612	fi
3613	${Q} echo '' >> $@
3614	${Q} echo '' >> $@
3615	${Q} echo '#endif /* !CALC_HAVE_NEWSTR_H */' >> $@
3616	${Q} ${RM} -f have_newstr${EXT} have_newstr.o newstr_tmp
3617	${H} echo '$@ formed'
3618	-@if [ -z "${Q}" ]; then \
3619	    echo ''; \
3620	    echo '=-=-= start of $@ =-=-='; \
3621	    ${CAT} $@; \
3622	    echo '=-=-= end of $@ =-=-='; \
3623	    echo ''; \
3624	else \
3625	    ${TRUE}; \
3626	fi
3627
3628have_memmv.h: have_memmv.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3629	${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp $@
3630	${H} echo 'forming $@'
3631	${Q} echo '/*' > $@
3632	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3633	${Q} echo ' */' >> $@
3634	${Q} echo '' >> $@
3635	${Q} echo '' >> $@
3636	${Q} echo '#if !defined(CALC_HAVE_MEMMV_H)' >> $@
3637	${Q} echo '#define CALC_HAVE_MEMMV_H' >> $@
3638	${Q} echo '' >> $@
3639	${Q} echo '' >> $@
3640	${Q} echo '/* do we have or want memmove()? */' >> $@
3641	${Q} ${RM} -f have_memmv.o have_memmv
3642	-${Q} ${LCC} ${ICFLAGS} ${HAVE_MEMMOVE} have_memmv.c -c ${S} \
3643		|| ${TRUE}
3644	-${Q} ${LCC} ${ILDFLAGS} have_memmv.o -o have_memmv ${S} \
3645		|| ${TRUE}
3646	-${Q} ./have_memmv > memmv_tmp ${E} \
3647		|| ${TRUE}
3648	-${Q} if [ -s memmv_tmp ]; then \
3649	    ${CAT} memmv_tmp >> $@; \
3650	else \
3651	    echo '#undef HAVE_MEMMOVE /* no */' >> $@; \
3652	fi
3653	${Q} echo '' >> $@
3654	${Q} echo '' >> $@
3655	${Q} echo '#endif /* !CALC_HAVE_MEMMV_H */' >> $@
3656	${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp
3657	${H} echo '$@ formed'
3658	-@if [ -z "${Q}" ]; then \
3659	    echo ''; \
3660	    echo '=-=-= start of $@ =-=-='; \
3661	    ${CAT} $@; \
3662	    echo '=-=-= end of $@ =-=-='; \
3663	    echo ''; \
3664	else \
3665	    ${TRUE}; \
3666	fi
3667
3668have_ustat.h: have_ustat.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3669	${Q} ${RM} -f ustat_tmp $@
3670	${H} echo 'forming $@'
3671	${Q} echo '/*' > $@
3672	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3673	${Q} echo ' */' >> $@
3674	${Q} echo '' >> $@
3675	${Q} echo '' >> $@
3676	${Q} echo '#if !defined(CALC_HAVE_USTAT_H)' >> $@
3677	${Q} echo '#define CALC_HAVE_USTAT_H' >> $@
3678	${Q} echo '' >> $@
3679	${Q} echo '' >> $@
3680	${Q} echo '/* do we have or want ustat()? */' >> $@
3681	${Q} ${RM} -f have_ustat.o have_ustat${EXT}
3682	-${Q} if echo '#include <ustat.h>' | ${CC} -E - ${S}; then \
3683	    ${LCC} ${ICFLAGS} ${HAVE_USTAT} have_ustat.c -c ${S}; \
3684	    ${LCC} ${ILDFLAGS} have_ustat.o -o have_ustat${EXT} ${S}; \
3685	    ./have_ustat${EXT} > ustat_tmp ${E}; \
3686	fi
3687	-${Q} if [ -s ustat_tmp ]; then \
3688	    ${CAT} ustat_tmp >> $@; \
3689	else \
3690	    echo '#undef HAVE_USTAT /* no */' >> $@; \
3691	fi
3692	${Q} echo '' >> $@
3693	${Q} echo '' >> $@
3694	${Q} echo '#endif /* !CALC_HAVE_USTAT_H */' >> $@
3695	${Q} ${RM} -f have_ustat${EXT} have_ustat.o ustat_tmp
3696	${H} echo '$@ formed'
3697	-@if [ -z "${Q}" ]; then \
3698	    echo ''; \
3699	    echo '=-=-= start of $@ =-=-='; \
3700	    ${CAT} $@; \
3701	    echo '=-=-= end of $@ =-=-='; \
3702	    echo ''; \
3703	else \
3704	    ${TRUE}; \
3705	fi
3706
3707have_getsid.h: have_getsid.c have_unistd.h \
3708	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3709	${Q} ${RM} -f getsid_tmp $@
3710	${H} echo 'forming $@'
3711	${Q} echo '/*' > $@
3712	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3713	${Q} echo ' */' >> $@
3714	${Q} echo '' >> $@
3715	${Q} echo '' >> $@
3716	${Q} echo '#if !defined(CALC_HAVE_GETSID_H)' >> $@
3717	${Q} echo '#define CALC_HAVE_GETSID_H' >> $@
3718	${Q} echo '' >> $@
3719	${Q} echo '' >> $@
3720	${Q} echo '/* do we have or want getsid()? */' >> $@
3721	${Q} ${RM} -f have_getsid.o have_getsid${EXT}
3722	-${Q} ${LCC} ${ICFLAGS} ${HAVE_GETSID} have_getsid.c -c ${S} \
3723		|| ${TRUE}
3724	-${Q} ${LCC} ${ILDFLAGS} have_getsid.o -o have_getsid ${S} \
3725		|| ${TRUE}
3726	-${Q} ./have_getsid${EXT} > getsid_tmp ${E} \
3727		|| ${TRUE}
3728	-${Q} if [ -s getsid_tmp ]; then \
3729	    ${CAT} getsid_tmp >> $@; \
3730	else \
3731	    echo '#undef HAVE_GETSID /* no */' >> $@; \
3732	fi
3733	${Q} echo '' >> $@
3734	${Q} echo '' >> $@
3735	${Q} echo '#endif /* !CALC_HAVE_GETSID_H */' >> $@
3736	${Q} ${RM} -f have_getsid${EXT} have_getsid.o getsid_tmp
3737	${H} echo '$@ formed'
3738	-@if [ -z "${Q}" ]; then \
3739	    echo ''; \
3740	    echo '=-=-= start of $@ =-=-='; \
3741	    ${CAT} $@; \
3742	    echo '=-=-= end of $@ =-=-='; \
3743	    echo ''; \
3744	else \
3745	    ${TRUE}; \
3746	fi
3747
3748have_getpgid.h: have_getpgid.c have_unistd.h \
3749	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3750	${Q} ${RM} -f getpgid_tmp $@
3751	${H} echo 'forming $@'
3752	${Q} echo '/*' > $@
3753	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3754	${Q} echo ' */' >> $@
3755	${Q} echo '' >> $@
3756	${Q} echo '' >> $@
3757	${Q} echo '#if !defined(CALC_HAVE_GETPGID_H)' >> $@
3758	${Q} echo '#define CALC_HAVE_GETPGID_H' >> $@
3759	${Q} echo '' >> $@
3760	${Q} echo '' >> $@
3761	${Q} echo '/* do we have or want getpgid()? */' >> $@
3762	${Q} ${RM} -f have_getpgid.o have_getpgid${EXT}
3763	-${Q} ${LCC} ${ICFLAGS} ${HAVE_GETPGID} have_getpgid.c -c ${S} \
3764		|| ${TRUE}
3765	-${Q} ${LCC} ${ILDFLAGS} have_getpgid.o -o have_getpgid${EXT} ${S} \
3766		|| ${TRUE}
3767	-${Q} ./have_getpgid${EXT} > getpgid_tmp ${E} \
3768		|| ${TRUE}
3769	-${Q} if [ -s getpgid_tmp ]; then \
3770	    ${CAT} getpgid_tmp >> $@; \
3771	else \
3772	    echo '#undef HAVE_GETPGID /* no */' >> $@; \
3773	fi
3774	${Q} echo '' >> $@
3775	${Q} echo '' >> $@
3776	${Q} echo '#endif /* !CALC_HAVE_GETPGID_H */' >> $@
3777	${Q} ${RM} -f have_getpgid${EXT} have_getpgid.o getpgid_tmp
3778	${H} echo '$@ formed'
3779	-@if [ -z "${Q}" ]; then \
3780	    echo ''; \
3781	    echo '=-=-= start of $@ =-=-='; \
3782	    ${CAT} $@; \
3783	    echo '=-=-= end of $@ =-=-='; \
3784	    echo ''; \
3785	else \
3786	    ${TRUE}; \
3787	fi
3788
3789have_gettime.h: have_gettime.c banned.h have_ban_pragma.h \
3790		${MAKE_FILE} ${LOC_MKF}
3791	${Q} ${RM} -f gettime_tmp $@
3792	${H} echo 'forming $@'
3793	${Q} echo '/*' > $@
3794	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3795	${Q} echo ' */' >> $@
3796	${Q} echo '' >> $@
3797	${Q} echo '' >> $@
3798	${Q} echo '#if !defined(CALC_HAVE_GETTIME_H)' >> $@
3799	${Q} echo '#define CALC_HAVE_GETTIME_H' >> $@
3800	${Q} echo '' >> $@
3801	${Q} echo '' >> $@
3802	${Q} echo '/* do we have or want clock_gettime()? */' >> $@
3803	${Q} ${RM} -f have_gettime.o have_gettime${EXT}
3804	-${Q} ${LCC} ${ICFLAGS} ${HAVE_GETTIME} have_gettime.c -c ${S} \
3805		|| ${TRUE}
3806	-${Q} ${LCC} ${ILDFLAGS} have_gettime.o -o have_gettime ${S} \
3807		|| ${TRUE}
3808	-${Q} ./have_gettime${EXT} > gettime_tmp ${E} \
3809		|| ${TRUE}
3810	-${Q} if [ -s gettime_tmp ]; then \
3811	    ${CAT} gettime_tmp >> $@; \
3812	else \
3813	    echo '#undef HAVE_GETTIME /* no */' >> $@; \
3814	fi
3815	${Q} echo '' >> $@
3816	${Q} echo '' >> $@
3817	${Q} echo '#endif /* !CALC_HAVE_GETTIME_H */' >> $@
3818	${Q} ${RM} -f have_gettime${EXT} have_gettime.o gettime_tmp
3819	${H} echo '$@ formed'
3820	-@if [ -z "${Q}" ]; then \
3821	    echo ''; \
3822	    echo '=-=-= start of $@ =-=-='; \
3823	    ${CAT} $@; \
3824	    echo '=-=-= end of $@ =-=-='; \
3825	    echo ''; \
3826	else \
3827	    ${TRUE}; \
3828	fi
3829
3830have_getprid.h: have_getprid.c have_unistd.h \
3831	banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3832	${Q} ${RM} -f getprid_tmp $@
3833	${H} echo 'forming $@'
3834	${Q} echo '/*' > $@
3835	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3836	${Q} echo ' */' >> $@
3837	${Q} echo '' >> $@
3838	${Q} echo '' >> $@
3839	${Q} echo '#if !defined(CALC_HAVE_GETPRID_H)' >> $@
3840	${Q} echo '#define CALC_HAVE_GETPRID_H' >> $@
3841	${Q} echo '' >> $@
3842	${Q} echo '' >> $@
3843	${Q} echo '/* do we have or want getprid()? */' >> $@
3844	${Q} ${RM} -f have_getprid.o have_getprid${EXT}
3845	-${Q} ${LCC} ${ICFLAGS} ${HAVE_GETPRID} have_getprid.c -c ${S} \
3846		|| ${TRUE}
3847	-${Q} ${LCC} ${ILDFLAGS} have_getprid.o -o have_getprid${EXT} ${S} \
3848		|| ${TRUE}
3849	-${Q} ./have_getprid${EXT} > getprid_tmp ${E} \
3850		|| ${TRUE}
3851	-${Q} if [ -s getprid_tmp ]; then \
3852	    ${CAT} getprid_tmp >> $@; \
3853	else \
3854	    echo '#undef HAVE_GETPRID /* no */' >> $@; \
3855	fi
3856	${Q} echo '' >> $@
3857	${Q} echo '' >> $@
3858	${Q} echo '#endif /* !CALC_HAVE_GETPRID_H */' >> $@
3859	${Q} ${RM} -f have_getprid${EXT} have_getprid.o getprid_tmp
3860	${H} echo '$@ formed'
3861	-@if [ -z "${Q}" ]; then \
3862	    echo ''; \
3863	    echo '=-=-= start of $@ =-=-='; \
3864	    ${CAT} $@; \
3865	    echo '=-=-= end of $@ =-=-='; \
3866	    echo ''; \
3867	else \
3868	    ${TRUE}; \
3869	fi
3870
3871have_urandom.h: ${MAKE_FILE} ${LOC_MKF}
3872	${Q} ${RM} -f $@
3873	${H} echo 'forming $@'
3874	${Q} echo '/*' > $@
3875	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3876	${Q} echo ' */' >> $@
3877	${Q} echo '' >> $@
3878	${Q} echo '' >> $@
3879	${Q} echo '#if !defined(CALC_HAVE_URANDOM_H)' >> $@
3880	${Q} echo '#define CALC_HAVE_URANDOM_H' >> $@
3881	${Q} echo '' >> $@
3882	${Q} echo '' >> $@
3883	${Q} echo '/* do we have /dev/urandom? */' >> $@
3884	-${Q} if [ X"${HAVE_URANDOM}" = X"YES" ]; then \
3885	    echo '#define HAVE_URANDOM	/* yes */' >> $@; \
3886	elif [ X"${HAVE_URANDOM}" = X"NO" ]; then \
3887	    echo '#undef HAVE_URANDOM  /* no */' >> $@; \
3888	elif [ -r /dev/urandom ] 2>/dev/null; then \
3889	    echo '#define HAVE_URANDOM  /* yes */' >> $@; \
3890	else \
3891	    echo '#undef HAVE_URANDOM	 /* no */' >> $@; \
3892	fi
3893	${Q} echo '' >> $@
3894	${Q} echo '' >> $@
3895	${Q} echo '#endif /* !CALC_HAVE_URANDOM_H */' >> $@
3896	${H} echo '$@ formed'
3897	-@if [ -z "${Q}" ]; then \
3898	    echo ''; \
3899	    echo '=-=-= start of $@ =-=-='; \
3900	    ${CAT} $@; \
3901	    echo '=-=-= end of $@ =-=-='; \
3902	    echo ''; \
3903	else \
3904	    ${TRUE}; \
3905	fi
3906
3907have_rusage.h: have_rusage.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3908	${Q} ${RM} -f rusage_tmp $@
3909	${H} echo 'forming $@'
3910	${Q} echo '/*' > $@
3911	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3912	${Q} echo ' */' >> $@
3913	${Q} echo '' >> $@
3914	${Q} echo '' >> $@
3915	${Q} echo '#if !defined(CALC_HAVE_RUSAGE_H)' >> $@
3916	${Q} echo '#define CALC_HAVE_RUSAGE_H' >> $@
3917	${Q} echo '' >> $@
3918	${Q} echo '' >> $@
3919	${Q} echo '/* do we have or want getrusage()? */' >> $@
3920	${Q} ${RM} -f have_rusage.o have_rusage${EXT}
3921	-${Q} ${LCC} ${ICFLAGS} ${HAVE_GETRUSAGE} have_rusage.c -c ${S} \
3922		|| ${TRUE}
3923	-${Q} ${LCC} ${ILDFLAGS} have_rusage.o -o have_rusage${EXT} ${S} \
3924		|| ${TRUE}
3925	-${Q} ./have_rusage${EXT} > rusage_tmp ${E} \
3926		|| ${TRUE}
3927	-${Q} if [ -s rusage_tmp ]; then \
3928	    ${CAT} rusage_tmp >> $@; \
3929	else \
3930	    echo '#undef HAVE_GETRUSAGE /* no */' >> $@; \
3931	fi
3932	${Q} echo '' >> $@
3933	${Q} echo '' >> $@
3934	${Q} echo '#endif /* !CALC_HAVE_RUSAGE_H */' >> $@
3935	${Q} ${RM} -f have_rusage${EXT} have_rusage.o rusage_tmp
3936	${H} echo '$@ formed'
3937	-@if [ -z "${Q}" ]; then \
3938	    echo ''; \
3939	    echo '=-=-= start of $@ =-=-='; \
3940	    ${CAT} $@; \
3941	    echo '=-=-= end of $@ =-=-='; \
3942	    echo ''; \
3943	else \
3944	    ${TRUE}; \
3945	fi
3946
3947have_strdup.h: have_strdup.c banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF}
3948	${Q} ${RM} -f strdup_tmp $@
3949	${H} echo 'forming $@'
3950	${Q} echo '/*' > $@
3951	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3952	${Q} echo ' */' >> $@
3953	${Q} echo '' >> $@
3954	${Q} echo '' >> $@
3955	${Q} echo '#if !defined(CALC_HAVE_STRDUP_H)' >> $@
3956	${Q} echo '#define CALC_HAVE_STRDUP_H' >> $@
3957	${Q} echo '' >> $@
3958	${Q} echo '' >> $@
3959	${Q} echo '/* do we have or want getstrdup()? */' >> $@
3960	${Q} ${RM} -f have_strdup.o have_strdup${EXT}
3961	-${Q} ${LCC} ${ICFLAGS} ${HAVE_STRDUP} have_strdup.c -c ${S} \
3962		|| ${TRUE}
3963	-${Q} ${LCC} ${ILDFLAGS} have_strdup.o -o have_strdup ${S} \
3964		|| ${TRUE}
3965	-${Q} ./have_strdup${EXT} > strdup_tmp ${E} \
3966		|| ${TRUE}
3967	-${Q} if [ -s strdup_tmp ]; then \
3968	    ${CAT} strdup_tmp >> $@; \
3969	else \
3970	    echo '#undef HAVE_STRDUP /* no */' >> $@; \
3971	fi
3972	${Q} echo '' >> $@
3973	${Q} echo '' >> $@
3974	${Q} echo '#endif /* !CALC_HAVE_STRDUP_H */' >> $@
3975	${Q} ${RM} -f have_strdup${EXT} have_strdup.o strdup_tmp
3976	${H} echo '$@ formed'
3977	-@if [ -z "${Q}" ]; then \
3978	    echo ''; \
3979	    echo '=-=-= start of $@ =-=-='; \
3980	    ${CAT} $@; \
3981	    echo '=-=-= end of $@ =-=-='; \
3982	    echo ''; \
3983	else \
3984	    ${TRUE}; \
3985	fi
3986
3987args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h \
3988	have_stdlib.h banned.h have_ban_pragma.h
3989	${Q} ${RM} -f $@
3990	${H} echo 'forming $@'
3991	${Q} echo '/*' > $@
3992	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
3993	${Q} echo ' */' >> $@
3994	${Q} echo '' >> $@
3995	${Q} echo '' >> $@
3996	${Q} echo '#if !defined(CALC_ARGS_H)' >> $@
3997	${Q} echo '#define CALC_ARGS_H' >> $@
3998	${Q} echo '' >> $@
3999	${Q} echo '' >> $@
4000	${Q} ${RM} -f have_stdvs.o have_stdvs${EXT}
4001	-${Q} ${LCC} ${ICFLAGS} ${HAVE_VSNPRINTF} have_stdvs.c -c ${S} \
4002		|| ${TRUE}
4003	-${Q} ${LCC} ${ILDFLAGS} have_stdvs.o -o have_stdvs${EXT} ${S} \
4004		|| ${TRUE}
4005	-${Q} if ./have_stdvs${EXT} >>$@ ${E}; then \
4006	    ${TOUCH} have_args.sh; \
4007	else \
4008	    ${TRUE}; \
4009	fi
4010	-${Q} if [ ! -f have_args.sh ] && [ X"${HAVE_VSNPRINTF}" = X ]; then \
4011	    ${RM} -f have_stdvs.o have_stdvs${EXT} have_varvs.o; \
4012	    ${RM} -f have_varvs${EXT}; \
4013	    ${LCC} ${ICFLAGS} ${HAVE_VSNPRINTF} have_varvs.c -c ${S}; \
4014	    ${LCC} ${ILDFLAGS} have_varvs.o -o have_varvs${EXT} ${E}; \
4015	    if ./have_varvs${EXT} >>$@ 2>/dev/null; then \
4016		${TOUCH} have_args.sh; \
4017	    else \
4018		${TRUE}; \
4019	    fi; \
4020	else \
4021	    ${TRUE}; \
4022	fi
4023	-${Q} if [ -f have_args.sh ]; then \
4024	    echo 'exit 0' > have_args.sh; \
4025	else \
4026	    echo 'exit 1' > have_args.sh; \
4027	    echo "Unable to determine what type of variable args and"; \
4028	    echo "what type of vsnprintf() should be used.  Set or change"; \
4029	    echo "the Makefile variable HAVE_VSNPRINTF."; \
4030	fi
4031	${Q} sh ./have_args.sh
4032	${Q} echo '' >> $@
4033	${Q} echo '' >> $@
4034	${Q} echo '#endif /* !CALC_ARGS_H */' >> $@
4035	${Q} ${RM} -f have_stdvs.o have_varvs.o have_varvs${EXT} have_args.sh
4036	${Q} ${RM} -f core
4037	${H} echo '$@ formed'
4038	-@if [ -z "${Q}" ]; then \
4039	    echo ''; \
4040	    echo '=-=-= start of $@ =-=-='; \
4041	    ${CAT} $@; \
4042	    echo '=-=-= end of $@ =-=-='; \
4043	    echo ''; \
4044	else \
4045	    ${TRUE}; \
4046	fi
4047
4048calcerr.h: calcerr.tbl calcerr_h.sed calcerr_h.awk ${MAKE_FILE} ${LOC_MKF}
4049	${Q} ${RM} -f calerr.h
4050	${H} echo 'forming $@'
4051	${Q} echo '/*' > $@
4052	${Q} echo ' * DO NOT EDIT' >> $@
4053	${Q} echo ' *' >> $@
4054	${Q} echo ' * generated by calcerr.tbl via Makefile' >> $@
4055	${Q} echo ' */' >> $@
4056	${Q} echo '' >> $@
4057	${Q} echo '' >> $@
4058	${Q} echo '#if !defined(CALC_CALCERR_H)' >> $@
4059	${Q} echo '#define CALC_CALCERR_H' >> $@
4060	${Q} echo '' >> $@
4061	${Q} echo '' >> $@
4062	${Q} ${SED} -f calcerr_h.sed < calcerr.tbl | \
4063	    ${AWK} -f calcerr_h.awk >> $@
4064	${Q} echo '' >> $@
4065	${Q} echo '' >> $@
4066	${Q} echo '#endif /* !CALC_CALCERR_H */' >> $@
4067	${H} echo '$@ formed'
4068	-@if [ -z "${Q}" ]; then \
4069	    echo ''; \
4070	    echo '=-=-= start of $@ =-=-='; \
4071	    ${CAT} $@; \
4072	    echo '=-=-= end of $@ =-=-='; \
4073	    echo ''; \
4074	else \
4075	    ${TRUE}; \
4076	fi
4077
4078calcerr.c: calcerr.tbl calcerr_c.sed calcerr_c.awk ${MAKE_FILE} ${LOC_MKF}
4079	${Q} ${RM} -f calerr.c
4080	${H} echo 'forming $@'
4081	${Q} echo '/*' > $@
4082	${Q} echo ' * DO NOT EDIT' >> $@
4083	${Q} echo ' *' >> $@
4084	${Q} echo ' * generated by calcerr.tbl via Makefile' >> $@
4085	${Q} echo ' */' >> $@
4086	${Q} echo '' >> $@
4087	${Q} ${SED} -f calcerr_c.sed < calcerr.tbl | \
4088	    ${AWK} -f calcerr_c.awk >> $@
4089	${H} echo '$@ formed'
4090	-@if [ -z "${Q}" ]; then \
4091	    echo ''; \
4092	    echo '=-=-= start of $@ =-=-='; \
4093	    ${CAT} $@; \
4094	    echo '=-=-= end of $@ =-=-='; \
4095	    echo ''; \
4096	else \
4097	    ${TRUE}; \
4098	fi
4099
4100have_unused.h: have_unused.c have_stdlib.h have_ban_pragma.h \
4101	       ${MAKE_FILE} ${LOC_MKF}
4102	${Q} ${RM} -f unused_tmp $@
4103	${H} echo 'forming $@'
4104	${Q} echo '/*' > $@
4105	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
4106	${Q} echo ' */' >> $@
4107	${Q} echo '' >> $@
4108	${Q} echo '' >> $@
4109	${Q} echo '#if !defined(CALC_HAVE_UNUSED_H)' >> $@
4110	${Q} echo '#define CALC_HAVE_UNUSED_H' >> $@
4111	${Q} echo '' >> $@
4112	${Q} echo '' >> $@
4113	${Q} echo '/* do we have/want the unused attribute? */' >> $@
4114	${Q} ${RM} -f have_unused.o have_unused${EXT}
4115	-${Q} ${LCC} ${ICFLAGS} ${HAVE_UNUSED} have_unused.c -c ${S} \
4116		|| ${TRUE}
4117	-${Q} ${LCC} ${ILDFLAGS} have_unused.o -o have_unused ${S} \
4118		|| ${TRUE}
4119	-${Q} ./have_unused${EXT} > unused_tmp ${E} \
4120		|| ${TRUE}
4121	-${Q} if [ -s unused_tmp ]; then \
4122	    ${CAT} unused_tmp >> $@; \
4123	else \
4124	    echo '#undef HAVE_UNUSED /* no */' >> $@; \
4125	    echo '#undef UNUSED' >> $@; \
4126	    echo '#define UNUSED /* no */' >> $@; \
4127	fi
4128	${Q} echo '' >> $@
4129	${Q} echo '' >> $@
4130	${Q} echo '#endif /* !CALC_HAVE_UNUSED_H */' >> $@
4131	${Q} ${RM} -f have_unused${EXT} have_unused.o unused_tmp
4132	${H} echo '$@ formed'
4133	-@if [ -z "${Q}" ]; then \
4134	    echo ''; \
4135	    echo '=-=-= start of $@ =-=-='; \
4136	    ${CAT} $@; \
4137	    echo '=-=-= end of $@ =-=-='; \
4138	    echo ''; \
4139	else \
4140	    ${TRUE}; \
4141	fi
4142
4143have_ban_pragma.h: have_ban_pragma.c banned.h ${MAKE_FILE} ${LOC_MKF}
4144	${Q} ${RM} -f unused_tmp $@
4145	${H} echo 'forming $@'
4146	${Q} echo '/*' > $@
4147	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
4148	${Q} echo ' */' >> $@
4149	${Q} echo '' >> $@
4150	${Q} echo '' >> $@
4151	${Q} echo '#if !defined(CALC_HAVE_BAN_PRAGMA_H)' >> $@
4152	${Q} echo '#define CALC_HAVE_BAN_PRAGMA_H' >> $@
4153	${Q} echo '' >> $@
4154	${Q} echo '' >> $@
4155	${Q} echo '/* do we have/want #pragma GCC poison func_name? */' >> $@
4156	${Q} ${RM} -f have_ban_pragma.o have_ban_pragma${EXT}
4157	-${Q} ${LCC} ${ICFLAGS} ${HAVE_PRAGMA_GCC_POSION} \
4158		have_ban_pragma.c -c ${S} \
4159			|| ${TRUE}
4160	-${Q} ${LCC} ${ILDFLAGS} have_ban_pragma.o -o have_ban_pragma ${S} \
4161		|| ${TRUE}
4162	-${Q} ./have_ban_pragma${EXT} > unused_tmp ${E} \
4163		|| ${TRUE}
4164	-${Q} if [ -s unused_tmp ]; then \
4165	    ${CAT} unused_tmp >> $@; \
4166	else \
4167	    echo '#undef HAVE_PRAGMA_GCC_POSION /* no */' \
4168	         >> $@; \
4169	fi
4170	${Q} echo '' >> $@
4171	${Q} echo '' >> $@
4172	${Q} echo '#endif /* !CALC_HAVE_BAN_PRAGMA_H */' >> $@
4173	${Q} ${RM} -f have_ban_pragma${EXT} have_ban_pragma.o unused_tmp
4174	${H} echo '$@ formed'
4175	-@if [ -z "${Q}" ]; then \
4176	    echo ''; \
4177	    echo '=-=-= start of $@ =-=-='; \
4178	    ${CAT} $@; \
4179	    echo '=-=-= end of $@ =-=-='; \
4180	    echo ''; \
4181	else \
4182	    ${TRUE}; \
4183	fi
4184
4185have_strlcpy.h: have_strlcpy.c banned.h have_ban_pragma.h \
4186		${MAKE_FILE} ${LOC_MKF}
4187	${Q} ${RM} -f unused_tmp $@
4188	${H} echo 'forming $@'
4189	${Q} echo '/*' > $@
4190	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
4191	${Q} echo ' */' >> $@
4192	${Q} echo '' >> $@
4193	${Q} echo '' >> $@
4194	${Q} echo '#if !defined(CALC_HAVE_STRLCPY_H)' >> $@
4195	${Q} echo '#define CALC_HAVE_STRLCPY_H' >> $@
4196	${Q} echo '' >> $@
4197	${Q} echo '' >> $@
4198	${Q} echo '/* do we have/want the strlcpy() function? */' >> $@
4199	${Q} ${RM} -f have_strlcpy.o have_strlcpy${EXT}
4200	-${Q} ${LCC} ${ICFLAGS} ${HAVE_NO_STRLCPY} have_strlcpy.c -c ${S} \
4201		|| ${TRUE}
4202	-${Q} ${LCC} ${ILDFLAGS} have_strlcpy.o -o have_strlcpy ${S} \
4203		|| ${TRUE}
4204	-${Q} ./have_strlcpy${EXT} > unused_tmp ${E} \
4205		|| ${TRUE}
4206	-${Q} if [ -s unused_tmp ]; then \
4207	    ${CAT} unused_tmp >> $@; \
4208	else \
4209	    echo '#undef HAVE_STRLCPY /* no */' \
4210	         >> $@; \
4211	fi
4212	${Q} echo '' >> $@
4213	${Q} echo '' >> $@
4214	${Q} echo '#endif /* !CALC_HAVE_STRLCPY_H */' >> $@
4215	${Q} ${RM} -f have_strlcpy${EXT} have_strlcpy.o unused_tmp
4216	${H} echo '$@ formed'
4217	-@if [ -z "${Q}" ]; then \
4218	    echo ''; \
4219	    echo '=-=-= start of $@ =-=-='; \
4220	    ${CAT} $@; \
4221	    echo '=-=-= end of $@ =-=-='; \
4222	    echo ''; \
4223	else \
4224	    ${TRUE}; \
4225	fi
4226
4227have_strlcat.h: have_strlcat.c banned.h have_ban_pragma.h \
4228		${MAKE_FILE} ${LOC_MKF}
4229	${Q} ${RM} -f unused_tmp $@
4230	${H} echo 'forming $@'
4231	${Q} echo '/*' > $@
4232	${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> $@
4233	${Q} echo ' */' >> $@
4234	${Q} echo '' >> $@
4235	${Q} echo '' >> $@
4236	${Q} echo '#if !defined(CALC_HAVE_STRLCAT_H)' >> $@
4237	${Q} echo '#define CALC_HAVE_STRLCAT_H' >> $@
4238	${Q} echo '' >> $@
4239	${Q} echo '' >> $@
4240	${Q} echo '/* do we have/want the strlcat() function? */' >> $@
4241	${Q} ${RM} -f have_strlcat.o have_strlcat${EXT}
4242	-${Q} ${LCC} ${ICFLAGS} ${HAVE_NO_STRLCAT} have_strlcat.c -c ${S} \
4243		|| ${TRUE}
4244	-${Q} ${LCC} ${ILDFLAGS} have_strlcat.o -o have_strlcat ${S} \
4245		|| ${TRUE}
4246	-${Q} ./have_strlcat${EXT} > unused_tmp ${E} \
4247		|| ${TRUE}
4248	-${Q} if [ -s unused_tmp ]; then \
4249	    ${CAT} unused_tmp >> $@; \
4250	else \
4251	    echo '#undef HAVE_STRLCAT /* no */' \
4252	         >> $@; \
4253	fi
4254	${Q} echo '' >> $@
4255	${Q} echo '' >> $@
4256	${Q} echo '#endif /* !CALC_HAVE_STRLCAT_H */' >> $@
4257	${Q} ${RM} -f have_strlcat${EXT} have_strlcat.o unused_tmp
4258	${H} echo '$@ formed'
4259	-@if [ -z "${Q}" ]; then \
4260	    echo ''; \
4261	    echo '=-=-= start of $@ =-=-='; \
4262	    ${CAT} $@; \
4263	    echo '=-=-= end of $@ =-=-='; \
4264	    echo ''; \
4265	else \
4266	    ${TRUE}; \
4267	fi
4268
4269###
4270#
4271# Build .h files for Windows based systems
4272#
4273# This is really a internal utility rule that is used to create the
4274# win32 sub-directory for distribution.
4275#
4276###
4277
4278win32_hsrc: win32.mkdef banned.h have_ban_pragma.h alloc.h \
4279	    ${MAKE_FILE} ${LOC_MKF}
4280	${H} echo 'forming win32 directory'
4281	${Q} ${RM} -rf win32
4282	${Q} ${MKDIR} -p win32
4283	${Q} ${CP} banned.h have_ban_pragma.h alloc.h win32
4284	${Q} ${CP} ${UTIL_C_SRC} win32
4285	${Q} ${CP} ${UTIL_MISC_SRC} win32
4286	${Q} ${CP} ${MAKE_FILE} ${LOC_MKF}  win32
4287	${Q} (cd win32; \
4288	 echo "${MAKE} -f ${MAKE_FILE} hsrc `${CAT} win32.mkdef` EXT="; \
4289	 ${MAKE} -f ${MAKE_FILE} hsrc `${CAT} win32.mkdef` EXT=; \
4290	 ${RM} -f ${UTIL_C_SRC}; \
4291	 ${RM} -f ${UTIL_MISC_SRC}; \
4292	 ${RM} -f ${UTIL_OBJS}; \
4293	 ${RM} -f ${UTIL_PROGS}; \
4294	 ${RM} -f ${UTIL_FILES}; \
4295	 ${RM} -f ${MAKE_FILE} ${LOC_MKF})
4296	${H} echo 'win32 directory formed'
4297
4298###
4299#
4300# These two .all rules are used to determine of the lower level
4301# directory has had its all rule performed.
4302#
4303###
4304
4305cal/.all: cal/Makefile
4306	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4307	${V} echo '=-=-=-=-= Invoking all rule for cal =-=-=-=-='
4308	${RM} -f $@
4309	cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} all
4310	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4311	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4312
4313help/.all: help/Makefile
4314	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4315	${V} echo '=-=-=-=-= Invoking all rule for help =-=-=-=-='
4316	${RM} -f $@
4317	cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} all
4318	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4319	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4320
4321help/builtin: help/Makefile \
4322	      func.c help/builtin.top help/builtin.end help/funclist.sed
4323	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4324	${V} echo '=-=-=-=-= Invoking builtin rule for help =-=-=-=-='
4325	${RM} -f $@
4326	cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} builtin
4327	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4328	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4329
4330cscript/.all: ${CSCRIPT_TARGETS}
4331
4332${CSCRIPT_TARGETS}: cscript/Makefile
4333	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4334	${V} echo '=-=-=-=-= Invoking all rule for cscript =-=-=-=-='
4335	${RM} -f cscript/.all
4336	cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} all
4337	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4338	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4339
4340#if 0	/* start of skip for non-Gnu makefiles */
4341#
4342ifdef ALLOW_CUSTOM
4343#
4344#endif	/* end of skip for non-Gnu makefiles */
4345custom/.all: custom/Makefile
4346	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4347	${V} echo '=-=-=-=-= Invoking all rule for custom =-=-=-=-='
4348	${RM} -f $@
4349	cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} all
4350	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4351	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4352
4353custom/libcustcalc${LIB_EXT_VERSION}: custom/Makefile
4354	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4355	${V} echo '=-=-=-=-= Invoking all rule for custom =-=-=-=-='
4356	cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@
4357	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4358	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4359
4360libcustcalc${LIB_EXT_VERSION}: custom/libcustcalc${LIB_EXT_VERSION}
4361	${Q} ${RM} -f $@
4362	${CP} -p $? $@
4363
4364libcustcalc${LIB_EXT}: libcustcalc${LIB_EXT_VERSION}
4365	${Q} ${RM} -f $@
4366	${LN} -s $? $@
4367#if 0	/* start of skip for non-Gnu makefiles */
4368#
4369endif
4370#
4371#endif	/* end of skip for non-Gnu makefiles */
4372
4373###
4374#
4375# building calc-static and static lib*.a libraries
4376#
4377###
4378
4379calc-static${EXT}: .hsrc ${CALCOBJS} \
4380		   ${CALC_STATIC_LIBS} ${MAKE_FILE} ${LOC_MKF}
4381	${RM} -f $@
4382	${CC} ${LDFLAGS} ${CALCOBJS} ${LD_STATIC} ${CALC_STATIC_LIBS} \
4383	      ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
4384
4385libcustcalc.a: custom/libcustcalc.a
4386	${Q} ${RM} -f $@
4387	${CP} -f $? $@
4388
4389libcalc.a: ${LIBOBJS} ${MAKE_FILE} ${LOC_MKF}
4390	${RM} -f libcalc.a
4391	${AR} qc libcalc.a ${LIBOBJS}
4392	${RANLIB} libcalc.a
4393	${CHMOD} 0644 libcalc.a
4394
4395#if 0	/* start of skip for non-Gnu makefiles */
4396#
4397ifdef ALLOW_CUSTOM
4398#
4399#endif	/* end of skip for non-Gnu makefiles */
4400custom/libcustcalc.a: custom/Makefile
4401	cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} libcustcalc.a
4402#if 0	/* start of skip for non-Gnu makefiles */
4403#
4404endif
4405#
4406#endif	/* end of skip for non-Gnu makefiles */
4407
4408sample_rand-static${EXT}: sample_rand.o ${CALC_STATIC_LIBS} \
4409			  ${MAKE_FILE} ${LOC_MKF}
4410	${CC} ${LDFLAGS} sample_rand.o ${LD_STATIC} \
4411	      ${CALC_STATIC_LIBS} ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
4412
4413sample_many-static${EXT}: sample_many.o ${CALC_STATIC_LIBS} \
4414			  ${MAKE_FILE} ${LOC_MKF}
4415	${CC} ${LDFLAGS} sample_many.o ${LD_STATIC} \
4416	      ${CALC_STATIC_LIBS} ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
4417
4418###
4419#
4420# Home grown make dependency rules.  Your system may not support
4421# or have the needed tools.  You can ignore this section.
4422#
4423# We will form a skeleton tree of *.c files containing only #include "foo.h"
4424# lines and .h files containing the same lines surrounded by multiple include
4425# prevention lines.  This allows us to build a static depend list that will
4426# satisfy all possible cpp symbol definition combinations.
4427#
4428###
4429
4430depend: hsrc custom/Makefile
4431	${Q} if [ -f ${MAKE_FILE}.bak ]; then \
4432		echo "${MAKE_FILE}.bak exists, remove or move it"; \
4433		exit 1; \
4434	else \
4435	    ${TRUE}; \
4436	fi
4437	${V} echo '=-=-=-=-= Invoking depend rule for cscript =-=-=-=-='
4438	${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} depend
4439	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4440	${V} echo '=-=-=-=-= Invoking depend rule for custom =-=-=-=-='
4441	${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} depend
4442	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
4443	${Q} echo forming skel
4444	${Q} ${RM} -rf skel
4445	${Q} ${MKDIR} -p skel
4446	-${Q} for i in ${C_SRC} ${BUILD_C_SRC}; do \
4447	    ${SED} -n '/^#[	 ]*include[	 ]*"/p' "$$i" | \
4448	    ${GREP} -v '\.\./getopt/getopt\.h' > "skel/$$i"; \
4449	done
4450	${Q} ${MKDIR} -p skel/custom
4451	-${Q} for i in ${H_SRC} ${BUILD_H_SRC} custom.h /dev/null; do \
4452	    if [ X"$$i" != X"/dev/null" ]; then \
4453		tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
4454		echo "#if !defined($$tag)" > "skel/$$i"; \
4455		echo "#define $$tag" >> "skel/$$i"; \
4456		${SED} -n '/^#[	 ]*include[	 ]*"/p' "$$i" | \
4457		    LANG=C ${SORT} -u >> "skel/$$i"; \
4458		echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \
4459	    fi; \
4460	done
4461	${Q} ${RM} -f skel/makedep.out
4462	${Q} echo top level skel formed
4463	${Q} echo forming dependency list
4464	${Q} :> skel/makedep.out
4465	${Q} cd skel; ${MAKEDEPEND} \
4466	    -w 1 -f makedep.out -- \
4467	    ${CFLAGS} -- \
4468	    ${C_SRC} ${BUILD_C_SRC} 2>/dev/null
4469	-${Q} for i in ${C_SRC} ${BUILD_C_SRC} /dev/null; do \
4470	    if [ X"$$i" != X"/dev/null" ]; then \
4471	      echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
4472	    fi; \
4473	done >> skel/makedep.out
4474	${Q} LANG=C ${SORT} -u skel/makedep.out -o skel/makedep.out
4475	echo '#if 0	/* start of skip for non-Gnu makefiles */' \
4476	  >> skel/makedep.out
4477	echo '###################################################' \
4478	  >> skel/makedep.out
4479	echo '# End 2nd skip of lines for the custom/Makefile   #' \
4480	  >> skel/makedep.out
4481	echo '###################################################' \
4482	  >> skel/makedep.out
4483	echo 'endif' >> skel/makedep.out
4484	echo '#endif	/* end of skip for non-Gnu makefiles */' \
4485	  >> skel/makedep.out
4486	${Q} echo dependency list formed
4487	${Q} echo forming new ${MAKE_FILE}
4488	${Q} ${RM} -f ${MAKE_FILE}.bak
4489	${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak
4490	${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' \
4491		    ${MAKE_FILE}.bak > ${MAKE_FILE}
4492	${Q} ${GREP} -v '^#' skel/makedep.out >> ${MAKE_FILE}
4493	${Q} echo removing top level skel
4494	${Q} ${RM} -rf skel
4495	-${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \
4496	    echo 'top level ${MAKE_FILE} was already up to date'; \
4497	    echo 'restoring original ${MAKE_FILE}'; \
4498	    ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \
4499	else \
4500	    echo 'old ${MAKE_FILE} is now ${MAKE_FILE}.bak'; \
4501	    echo 'new top level ${MAKE_FILE} formed'; \
4502	    echo 'try: diff -u ${MAKE_FILE}.bak ${MAKE_FILE}'; \
4503	fi
4504
4505# generate the list of h files for lower level depend use
4506#
4507h_list:
4508	-${Q} for i in ${H_SRC} ${BUILD_H_SRC} /dev/null; do \
4509	    if [ X"$$i" != X"/dev/null" ]; then \
4510		echo $$i; \
4511	    fi; \
4512	done
4513
4514###
4515#
4516# calc version
4517#
4518# calc_version:
4519#	This rule is the most accurate as it uses calc source to
4520#	produce the version value.  This rule produces a full
4521#	version string.  Note that the full version could be 4
4522#	or 3 levels long depending on the minor patch number.
4523#
4524# version:
4525#	This rule simply echoes the value found in this makefile.
4526#	This rule produces the full version string.  Note that the
4527#	full version could be 4 or 3 levels long depending on the
4528#	minor patch number.
4529#
4530###
4531
4532calc_version: ver_calc${EXT}
4533	@./ver_calc${EXT}
4534
4535version:
4536	@echo ${VERSION}
4537
4538ver_calc${EXT}: version.c strl.c have_string.h have_const.h have_newstr.h \
4539	have_strlcpy.h have_memmv.h have_strlcat.h endian_calc.h longbits.h \
4540	have_unused.h charbit.h
4541	${RM} -f $@
4542	${LCC} ${ICFLAGS} -DCALC_VER ${ILDFLAGS} version.c strl.c -o $@
4543
4544###
4545#
4546# File distribution list generation.  You can ignore this section.
4547#
4548# We will form the names of source files as if they were in a
4549# sub-directory called calc.
4550#
4551###
4552
4553distlist: ${DISTLIST} custom/Makefile
4554	${Q} (for i in ${DISTLIST} /dev/null; do \
4555	    if [ X"$$i" != X"/dev/null" ]; then \
4556		echo $$i; \
4557	    fi; \
4558	done; \
4559	for i in ${BUILD_H_SRC} ${BUILD_C_SRC} /dev/null; do \
4560	    if [ X"$$i" != X"/dev/null" ]; then \
4561		echo win32/$$i; \
4562	    fi; \
4563	done; \
4564	(cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \
4565	(cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \
4566	(cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@); \
4567	(cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \
4568	) | LANG=C ${SORT}
4569
4570distdir: custom/Makefile
4571	${Q} (echo .; \
4572	echo win32; \
4573	(cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \
4574	(cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \
4575	(cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@); \
4576	(cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \
4577	) | LANG=C ${SORT}
4578
4579calcliblist: custom/Makefile
4580	${Q} (for i in ${CALCLIBLIST} /dev/null; do \
4581	    if [ X"$$i" != X"/dev/null" ]; then \
4582		echo $$i; \
4583	    fi; \
4584	done; \
4585	(cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \
4586	(cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \
4587	(cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@); \
4588	(cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \
4589	) | LANG=C ${SORT}
4590
4591calcliblistfmt:
4592	${Q} ${MAKE} -f Makefile calcliblist | \
4593	    ${FMT} -64 | ${SED} -e 's/^/	/'
4594
4595Makefile.simple: Makefile custom/Makefile.simple
4596	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4597	${Q} if [ -f $@.bak ]; then \
4598		echo "$@.bak exists, remove or move it"; \
4599		exit 1; \
4600	else \
4601	    ${TRUE}; \
4602	fi
4603	-${Q} if [ -f $@ ]; then \
4604	    ${MV} -f $@ $@.bak; \
4605	fi
4606	${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \
4607	    Makefile | \
4608	    ${SED} -e 's/cd custom; $${MAKE} -f Makefile/&.simple/' \
4609		   -e 's;^# SRC:.*;# SRC: $@ - non-GNU version;' \
4610		   -e '/^ifeq /d' \
4611		   -e '/^ifneq /d' \
4612		   -e '/^ifdef /d' \
4613		   -e '/^ifndef /d' \
4614		   -e '/^else/d' \
4615		   -e '/^endif/d' \
4616		   -e 's;via Makefile'"'"';via $@'"'"';' > $@
4617	-${Q} if [ -s $@.bak ]; then \
4618	    if ${CMP} -s $@.bak $@; then \
4619		echo 'top level $@ was already up to date'; \
4620		echo 'restoring original $@'; \
4621		${MV} -f $@.bak $@; \
4622	    else \
4623		echo 'old $@ is now $@.bak'; \
4624		echo 'updated top level $@ formed'; \
4625		${DIFF} -u $@.bak $@; \
4626	    fi \
4627	else \
4628	    echo 'new top level $@ formed'; \
4629	    echo; \
4630	    ${LS} -l $@; \
4631	    echo; \
4632	fi
4633	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4634
4635#if 0	/* start of skip for non-Gnu makefiles */
4636#
4637custom/Makefile.simple: Makefile custom/Makefile
4638	${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} Makefile.simple
4639#
4640#endif	/* end of skip for non-Gnu makefiles */
4641
4642###
4643#
4644# Doing a 'make check' will cause the regression test suite to be executed.
4645# This rule will try to build anything that needs to be built as well.
4646#
4647# Doing a 'make chk' will cause only the context around interesting
4648# (and error) messages to be printed.  Unlike 'make check', this
4649# rule does not cause things to be built.  i.e., the all rule is
4650# not invoked.
4651#
4652###
4653
4654check: all ./cal/regress.cal
4655	${CALC_ENV} ./calc${EXT} -d -q read regress
4656
4657chk: ./cal/regress.cal
4658	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4659	${CALC_ENV} ./calc${EXT} -d -q read regress 2>&1 | ${AWK} -f check.awk
4660	@${MAKE} -f Makefile Q= V=@ distdir >/dev/null 2>&1
4661	@${MAKE} -f Makefile Q= V=@ distlist >/dev/null 2>&1
4662	${Q} echo 'chk OK'
4663	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4664
4665###
4666#
4667# debug
4668#
4669# make calcinfo:
4670#	* print information about the host and compile environment
4671#
4672# make env:
4673#	* print major Makefile variables
4674#
4675# make mkdebug:
4676#	* print major Makefile variables
4677#	* build anything not yet built
4678#
4679# make debug:
4680#	* remove everything that was previously built
4681#	* print major Makefile variables
4682#	* make everything
4683#	* run the regression tests
4684###
4685
4686calcinfo:
4687	@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4688	@echo
4689	@echo '=-=-= UNAME=${UNAME} =-=-='
4690	@echo
4691	@echo '=-=-= output of $${UNAME} -a follows =-=-='
4692	-@${UNAME} -a
4693	@echo '=-=-= end of output of $${UNAME} -a =-=-='
4694	@echo
4695	@echo '=-=-= HOSTNAME=${HOSTNAME} =-=-='
4696	@echo
4697	@echo '=-=-= output of $${HOSTNAME} follows =-=-='
4698	-@${HOSTNAME}
4699	@echo '=-=-= end of output of $${HOSTNAME} =-=-='
4700	@echo
4701	@echo '=-=-= DATE=${DATE} =-=-='
4702	@echo
4703	@echo '=-=-= output of $${DATE} follows =-=-='
4704	-@${DATE}
4705	@echo '=-=-= end of output of $${DATE} =-=-='
4706	@echo
4707	@echo '=-=-= LCC=${LCC} =-=-='
4708	@echo
4709	@echo '=-=-= output of $${LCC} -v follows =-=-='
4710	-@${LCC} -v
4711	@echo '=-=-= end of output of $${LCC} -v =-=-='
4712	@echo
4713	@echo '=-=-= PWD=${PWD} =-=-='
4714	@echo
4715	@echo '=-=-= output of echo $${PWD} follows =-=-='
4716	-@echo ${PWD}
4717	@echo '=-=-= end of output of echo $${PWD} =-=-='
4718	@echo
4719	@echo '=-=-= PWDCMD=${PWDCMD} =-=-='
4720	@echo
4721	@echo '=-=-= output of $${PWDCMD} follows =-=-='
4722	-@${PWDCMD}
4723	@echo '=-=-= end of output of $${PWDCMD} =-=-='
4724	@echo
4725	@echo '=-=-= VERSION=${VERSION} =-=-='
4726	@echo
4727	@echo '=-=-= output of echo $${VERSION} follows =-=-='
4728	-@echo ${VERSION}
4729	@echo '=-=-= end of output of echo $${VERSION} =-=-='
4730	@echo
4731	@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4732
4733env:
4734	@echo '=-=-=-=-= dumping major make variables =-=-=-=-='
4735	@echo 'ALIGN32=${ALIGN32}'; echo ''
4736	@echo 'ALLOW_CUSTOM=${ALLOW_CUSTOM}'; echo ''
4737	@echo 'AR=${AR}'; echo ''
4738	@echo 'ARCH_CFLAGS=${ARCH_CFLAGS}'; echo ''
4739	@echo 'AWK=${AWK}'; echo ''
4740	@echo 'BINDIR=${BINDIR}'; echo ''
4741	@echo 'BLD_TYPE=${BLD_TYPE}'; echo ''
4742	@echo 'BUILD_C_SRC=${BUILD_C_SRC}'; echo ''
4743	@echo 'BUILD_H_SRC=${BUILD_H_SRC}'; echo ''
4744	@echo 'BYTE_ORDER=${BYTE_ORDER}'; echo ''
4745	@echo 'CALCLIBLIST=${CALCLIBLIST}'; echo ''
4746	@echo 'CALCOBJS=${CALCOBJS}'; echo ''
4747	@echo 'CALCPAGER=${CALCPAGER}'; echo ''
4748	@echo 'CALCPATH=${CALCPATH}'; echo ''
4749	@echo 'CALCRC=${CALCRC}'; echo ''
4750	@echo 'CALCSRC=${CALCSRC}'; echo ''
4751	@echo 'CALC_DYNAMIC_LIBS=${CALC_DYNAMIC_LIBS}'; echo ''
4752	@echo 'CALC_ENV=${CALC_ENV}'; echo ''
4753	@echo 'CALC_INCDIR=${CALC_INCDIR}'; echo ''
4754	@echo 'CALC_SHAREDIR=${CALC_SHAREDIR}'; echo ''
4755	@echo 'CALC_STATIC_LIBS=${CALC_STATIC_LIBS}'; echo ''
4756	@echo 'CAL_PASSDOWN=${CAL_PASSDOWN}'; echo ''
4757	@echo 'CAT=${CAT}'; echo ''
4758	@echo 'CATDIR=${CATDIR}'; echo ''
4759	@echo 'CATEXT=${CATEXT}'; echo ''
4760	@echo 'CATMODE=${CATMODE}'; echo ''
4761	@echo 'CC=${CC}'; echo ''
4762	@echo 'CCBAN=${CCBAN}'; echo ''
4763	@echo 'CCMISC=${CCMISC}'; echo ''
4764	@echo 'CCOPT=${CCOPT}'; echo ''
4765	@echo 'CCWARN=${CCWARN}'; echo ''
4766	@echo 'CCWERR=${CCWERR}'; echo ''
4767	@echo 'CFLAGS=${CFLAGS}'; echo ''
4768	@echo 'CHMOD=${CHMOD}'; echo ''
4769	@echo 'CMP=${CMP}'; echo ''
4770	@echo 'CO=${CO}'; echo ''
4771	@echo 'COL=${COL}'; echo ''
4772	@echo 'COMMON_ADD=${COMMON_ADD}'; echo ''
4773	@echo 'COMMON_CFLAGS=${COMMON_CFLAGS}'; echo ''
4774	@echo 'COMMON_LDFLAGS=${COMMON_LDFLAGS}'; echo ''
4775	@echo 'CP=${CP}'; echo ''
4776	@echo 'CSCRIPT_PASSDOWN=${CSCRIPT_PASSDOWN}'; echo ''
4777	@echo 'CSCRIPT_TARGETS=${CSCRIPT_TARGETS}'; echo ''
4778	@echo 'CTAGS=${CTAGS}'; echo ''
4779	@echo 'CUSTOMCALDIR=${CUSTOMCALDIR}'; echo ''
4780	@echo 'CUSTOMHELPDIR=${CUSTOMHELPDIR}'; echo ''
4781	@echo 'CUSTOMINCDIR=${CUSTOMINCDIR}'; echo ''
4782	@echo 'CUSTOM_PASSDOWN=${CUSTOM_PASSDOWN}'; echo ''
4783	@echo 'C_SRC=${C_SRC}'; echo ''
4784	@echo 'DATE=${DATE}'; echo ''
4785	@echo 'DEBUG=${DEBUG}'; echo ''
4786	@echo 'DEFAULT_LIB_INSTALL_PATH=${DEFAULT_LIB_INSTALL_PATH}'; echo ''
4787	@echo 'DEV_BITS=${DEV_BITS}'; echo ''
4788	@echo 'DIFF=${DIFF}'; echo ''
4789	@echo 'DISTLIST=${DISTLIST}'; echo ''
4790	@echo 'E=${E}'; echo ''
4791	@echo 'EXT=${EXT}'; echo ''
4792	@echo 'FMT=${FMT}'; echo ''
4793	@echo 'FPOS_BITS=${FPOS_BITS}'; echo ''
4794	@echo 'FPOS_POS_BITS=${FPOS_POS_BITS}'; echo ''
4795	@echo 'GREP=${GREP}'; echo ''
4796	@echo 'H=${H}'; echo ''
4797	@echo 'HAVE_ARC4RANDOM=${HAVE_ARC4RANDOM}'; echo ''
4798	@echo 'HAVE_CONST=${HAVE_CONST}'; echo ''
4799	@echo 'HAVE_ENVIRON=${HAVE_ENVIRON}'; echo ''
4800	@echo 'HAVE_FPOS=${HAVE_FPOS}'; echo ''
4801	@echo 'HAVE_FPOS_POS=${HAVE_FPOS_POS}'; echo ''
4802	@echo 'HAVE_GETPGID=${HAVE_GETPGID}'; echo ''
4803	@echo 'HAVE_GETPRID=${HAVE_GETPRID}'; echo ''
4804	@echo 'HAVE_GETRUSAGE=${HAVE_GETRUSAGE}'; echo ''
4805	@echo 'HAVE_GETSID=${HAVE_GETSID}'; echo ''
4806	@echo 'HAVE_GETTIME=${HAVE_GETTIME}'; echo ''
4807	@echo 'HAVE_LIMITS_H=${HAVE_LIMITS_H}'; echo ''
4808	@echo 'HAVE_MEMMOVE=${HAVE_MEMMOVE}'; echo ''
4809	@echo 'HAVE_NEWSTR=${HAVE_NEWSTR}'; echo ''
4810	@echo 'HAVE_OFFSCL=${HAVE_OFFSCL}'; echo ''
4811	@echo 'HAVE_POSSCL=${HAVE_POSSCL}'; echo ''
4812	@echo 'HAVE_PRAGMA_GCC_POSION=${HAVE_PRAGMA_GCC_POSION}'; echo ''
4813	@echo 'HAVE_STDLIB_H=${HAVE_STDLIB_H}'; echo ''
4814	@echo 'HAVE_STRDUP=${HAVE_STRDUP}'; echo ''
4815	@echo 'HAVE_STRING_H=${HAVE_STRING_H}'; echo ''
4816	@echo 'HAVE_STRLCAT=${HAVE_STRLCAT}'; echo ''
4817	@echo 'HAVE_STRLCPY=${HAVE_STRLCPY}'; echo ''
4818	@echo 'HAVE_SYS_TIMES_H=${HAVE_SYS_TIMES_H}'; echo ''
4819	@echo 'HAVE_SYS_TIME_H=${HAVE_SYS_TIME_H}'; echo ''
4820	@echo 'HAVE_TIMES_H=${HAVE_TIMES_H}'; echo ''
4821	@echo 'HAVE_TIME_H=${HAVE_TIME_H}'; echo ''
4822	@echo 'HAVE_UID_T=${HAVE_UID_T}'; echo ''
4823	@echo 'HAVE_UNISTD_H=${HAVE_UNISTD_H}'; echo ''
4824	@echo 'HAVE_UNUSED=${HAVE_UNUSED}'; echo ''
4825	@echo 'HAVE_URANDOM_H=${HAVE_URANDOM_H}'; echo ''
4826	@echo 'HAVE_USTAT=${HAVE_USTAT}'; echo ''
4827	@echo 'HAVE_VSNPRINTF=${HAVE_VSNPRINTF}'; echo ''
4828	@echo 'HELPDIR=${HELPDIR}'; echo ''
4829	@echo 'HELP_PASSDOWN=${HELP_PASSDOWN}'; echo ''
4830	@echo 'HOSTNAME=${HOSTNAME}'; echo ''
4831	@echo 'H_SRC=${H_SRC}'; echo ''
4832	@echo 'ICFLAGS=${ICFLAGS}'; echo ''
4833	@echo 'ILDFLAGS=${ILDFLAGS}'; echo ''
4834	@echo 'INCDIR=${INCDIR}'; echo ''
4835	@echo 'INODE_BITS=${INODE_BITS}'; echo ''
4836	@echo 'LANG=${LANG}'; echo ''
4837	@echo 'LCC=${LCC}'; echo ''
4838	@echo 'LDCONFIG=${LDCONFIG}'; echo ''
4839	@echo 'LDFLAGS=${LDFLAGS}'; echo ''
4840	@echo 'LD_DEBUG=${LD_DEBUG}'; echo ''
4841	@echo 'LD_SHARE=${LD_SHARE}'; echo ''
4842	@echo 'LIBCALC_SHLIB=${LIBCALC_SHLIB}'; echo ''
4843	@echo 'LIBCUSTCALC_SHLIB=${LIBCUSTCALC_SHLIB}'; echo ''
4844	@echo 'LIBDIR=${LIBDIR}'; echo ''
4845	@echo 'LIBOBJS=${LIBOBJS}'; echo ''
4846	@echo 'LIBSRC=${LIBSRC}'; echo ''
4847	@echo 'LIB_H_SRC=${LIB_H_SRC}'; echo ''
4848	@echo 'LICENSE=${LICENSE}'; echo ''
4849	@echo 'LN=${LN}'; echo ''
4850	@echo 'LOC_MKF=${LOC_MKF}'; echo ''
4851	@echo 'LONG_BITS=${LONG_BITS}'; echo ''
4852	@echo 'MAKE=${MAKE}'; echo ''
4853	@echo 'MAKEDEPEND=${MAKEDEPEND}'; echo ''
4854	@echo 'MAKE_FILE=${MAKE_FILE}'; echo ''
4855	@echo 'MANDIR=${MANDIR}'; echo ''
4856	@echo 'MANEXT=${MANEXT}'; echo ''
4857	@echo 'MANMAKE=${MANMAKE}'; echo ''
4858	@echo 'MANMODE=${MANMODE}'; echo ''
4859	@echo 'MKDIR=${MKDIR}'; echo ''
4860	@echo 'MV=${MV}'; echo ''
4861	@echo 'NROFF=${NROFF}'; echo ''
4862	@echo 'NROFF_ARG=${NROFF_ARG}'; echo ''
4863	@echo 'OBJS=${OBJS}'; echo ''
4864	@echo 'OFF_T_BITS=${OFF_T_BITS}'; echo ''
4865	@echo 'PURIFY=${PURIFY}'; echo ''
4866	@echo 'PWD=${PWD}'; echo ''
4867	@echo 'PWDCMD=${PWDCMD}'; echo ''
4868	@echo 'Q=${Q}'; echo ''
4869	@echo 'PREFIX=${PREFIX}'; echo ''
4870	@echo 'RANLIB=${RANLIB}'; echo ''
4871	@echo 'READLINE_EXTRAS=${READLINE_EXTRAS}'; echo ''
4872	@echo 'READLINE_INCLUDE=${READLINE_INCLUDE}'; echo ''
4873	@echo 'READLINE_LIB=${READLINE_LIB}'; echo ''
4874	@echo 'RM=${RM}'; echo ''
4875	@echo 'RMDIR=${RMDIR}'; echo ''
4876	@echo 'S=${S}'; echo ''
4877	@echo 'SAMPLE_C_SRC=${SAMPLE_C_SRC}'; echo ''
4878	@echo 'SAMPLE_H_SRC=${SAMPLE_H_SRC}'; echo ''
4879	@echo 'SAMPLE_OBJ=${SAMPLE_OBJ}'; echo ''
4880	@echo 'SAMPLE_STATIC_TARGETS=${SAMPLE_STATIC_TARGETS}'; echo ''
4881	@echo 'SAMPLE_TARGETS=${SAMPLE_TARGETS}'; echo ''
4882	@echo 'SCRIPTDIR=${SCRIPTDIR}'; echo ''
4883	@echo 'SED=${SED}'; echo ''
4884	@echo 'SHELL=${SHELL}'; echo ''
4885	@echo 'SORT=${SORT}'; echo ''
4886	@echo 'SPLINT=${SPLINT}'; echo ''
4887	@echo 'SPLINT_OPTS=${SPLINT_OPTS}'; echo ''
4888	@echo 'SYM_DYNAMIC_LIBS=${SYM_DYNAMIC_LIBS}'; echo ''
4889	@echo 'T=${T}'; echo ''
4890	@echo 'TARGETS=${TARGETS}'; echo ''
4891	@echo 'TEE=${TEE}'; echo ''
4892	@echo 'TERMCONTROL=${TERMCONTROL}'; echo ''
4893	@echo 'TOUCH=${TOUCH}'; echo ''
4894	@echo 'TRUE=${TRUE}'; echo ''
4895	@echo 'UNAME=${UNAME}'; echo ''
4896	@echo 'USE_READLINE=${USE_READLINE}'; echo ''
4897	@echo 'UTIL_C_SRC=${UTIL_C_SRC}'; echo ''
4898	@echo 'UTIL_FILES=${UTIL_FILES}'; echo ''
4899	@echo 'UTIL_MISC_SRC=${UTIL_MISC_SRC}'; echo ''
4900	@echo 'UTIL_OBJS=${UTIL_OBJS}'; echo ''
4901	@echo 'UTIL_PROGS=${UTIL_PROGS}'; echo ''
4902	@echo 'UTIL_TMP=${UTIL_TMP}'; echo ''
4903	@echo 'V=${V}'; echo ''
4904	@echo 'VERSION=${VERSION}'; echo ''
4905	@echo 'WNO_ERROR_LONG_LONG=${WNO_ERROR_LONG_LONG}'; echo ''
4906	@echo 'WNO_IMPLICT=${WNO_IMPLICT};' echo ''
4907	@echo 'WNO_LONG_LONG=${WNO_LONG_LONG}'; echo ''
4908	@echo 'XARGS=${XARGS}'; echo ''
4909	@echo 'target=${target}'; echo ''
4910	@echo '=-=-=-=-= ${MAKE_FILE} end of major make variable dump =-=-=-=-='
4911
4912mkdebug: env version.c
4913	@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4914	@echo '=-=-=-= Contents of ${LOC_MKF} follows =-=-=-='
4915	@${CAT} ${LOC_MKF}
4916	@echo '=-=-=-= End of contents of ${LOC_MKF} =-=-=-='
4917	@echo '=-=-=-= Determining the source version =-=-=-='
4918	@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
4919	-@./ver_calc${EXT}
4920	@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
4921	@${MAKE} -f Makefile Q= V=@ all
4922	@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
4923	@echo '=-=-=-= Determining the binary version =-=-=-='
4924	-@./calc${EXT} -e -q -v
4925	@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
4926	@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4927
4928debug: calcinfo env
4929	@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4930	@echo '=-=-=-= Contents of ${LOC_MKF} follows =-=-=-='
4931	@${CAT} ${LOC_MKF}
4932	@echo '=-=-=-= End of contents of ${LOC_MKF} =-=-=-='
4933	@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-='
4934	@${MAKE} -f Makefile Q= V=@ clobber
4935	@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
4936	@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
4937	@echo '=-=-= this may take a bit of time =-=-='
4938	@${MAKE} -f Makefile Q= V=@ all
4939	@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
4940	@echo '=-=-=-= Determining the source version =-=-=-='
4941	@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
4942	-@./ver_calc${EXT}
4943	@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
4944	@${ECHON} '=-=-=-= Print #defile values if custom functions '
4945	@echo 'are allowed =-=-=-='
4946	-@${CALC_ENV} ./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
4947	@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
4948	@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-='
4949	@echo '=-=-= this may take a while =-=-='
4950	@${MAKE} -f Makefile Q= V=@ check
4951	@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
4952	@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4953
4954###
4955#
4956# testing rules
4957#
4958# make run
4959#	* only run calc interactively with the ${CALC_ENV} environment
4960#
4961# make dbx
4962#	* run the dbx debugger on calc with the ${CALC_ENV} environment
4963#
4964# make gdb
4965#	* run the gdb debugger on calc with the ${CALC_ENV} environment
4966#
4967###
4968
4969run:
4970	${CALC_ENV} ./calc${EXT}
4971
4972dbx:
4973	${CALC_ENV} dbx ./calc${EXT}
4974
4975gdb:
4976	${CALC_ENV} gdb ./calc${EXT}
4977
4978###
4979#
4980# rpm rules
4981#
4982###
4983
4984# NOTE: Only the 2 rpm rules should set ${RPM_TOP}!
4985#
4986# When making calc RPM, ${RPM_TOP} will be set to the tree
4987# under which rpm files are built.  You should NOT set RPM_TOP
4988# by yourself.  Only make rpm and make rpm-preclean should
4989# set this value.
4990
4991rpm: clobber rpm-preclean rpm.mk calc.spec.in
4992	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4993	${MAKE} -f rpm.mk all V=${V} RPM_TOP="${RPM_TOP}" Q= S= E=
4994	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
4995
4996rpm-preclean:
4997	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
4998	${MAKE} -f rpm.mk $@ V=${V} RPM_TOP="${RPM_TOP}" Q= S= E=
4999	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5000
5001# rpm static rules
5002#
5003rpm-hide-static:
5004	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5005	${RM} -rf static
5006	${MKDIR} -p static
5007	${CP} -f -p calc-static${EXT} ${SAMPLE_STATIC_TARGETS} static
5008	${CP} -f -p libcalc.a custom/libcustcalc.a static
5009	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5010
5011rpm-unhide-static:
5012	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5013	${RM} -f calc-static${EXT} ${SAMPLE_STATIC_TARGETS}
5014	cd static; ${CP} -f -p calc-static${EXT} ${SAMPLE_STATIC_TARGETS} ..
5015	${RM} -f libcalc.a
5016	cd static; ${CP} -f -p libcalc.a ..
5017	${RM} -f custom/libcustcalc.a
5018	cd static; ${CP} -f -p libcustcalc.a ../custom
5019	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5020
5021rpm-chk-static:
5022	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5023	${CALC_ENV} ./calc-static${EXT} -d -q read regress 2>&1 | \
5024	    ${AWK} -f check.awk
5025	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5026
5027rpm-clean-static:
5028	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5029	${RM} -rf static
5030	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5031
5032###
5033#
5034# Utility rules
5035#
5036###
5037
5038# Form the installed file list
5039#
5040inst_files: ${MAKE_FILE} ${LOC_MKF} help/Makefile cal/Makefile \
5041	    cscript/Makefile ver_calc${EXT} custom/Makefile
5042	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5043	${Q} ${RM} -f inst_files
5044	${Q} echo ${BINDIR}/calc${EXT} > inst_files
5045	${Q} cd help; LANG=C \
5046	    ${MAKE} -f Makefile ${HELP_PASSDOWN} echo_inst_files | \
5047	    ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
5048	${Q} cd cal; LANG=C \
5049	    ${MAKE} -f Makefile ${CAL_PASSDOWN} echo_inst_files | \
5050	    ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
5051	${Q} cd custom; LANG=C \
5052	    ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_inst_files | \
5053	    ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
5054	${Q} cd cscript; LANG=C \
5055	    ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_inst_files | \
5056	    ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
5057	${Q} echo ${LIBDIR}/libcalc.a >> inst_files
5058	${Q} for i in ${LIB_H_SRC} ${BUILD_H_SRC} /dev/null; do \
5059	    if [ X"$$i" != X"/dev/null" ]; then \
5060		echo ${CALC_INCDIR}/$$i; \
5061	    fi; \
5062	done >> inst_files
5063	${Q} if [ ! -z "${MANDIR}" ]; then \
5064	    echo ${MANDIR}/calc.${MANEXT}; \
5065	fi >> inst_files
5066	${Q} LANG=C ${SORT} -u inst_files -o inst_files
5067	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5068
5069# The olduninstall rule will remove calc files from the older, historic
5070# locations under the /usr/local directory.  If you are using the
5071# new default values for ${BINDIR}, ${CALC_SHAREDIR}, ${INCDIR} and ${LIBDIR}
5072# then you can use this rule to clean out the older calc stuff under
5073# the /usr/local directory.
5074#
5075# NOTE: This rule is an exception to the use of ${PREFIX}.
5076#	In this rule we really to want to explicitly deal
5077#	with legacy paths under /usr/local.
5078#
5079olduninstall:
5080	${RM} -f inst_files
5081	${MAKE} -f Makefile \
5082		PREFIX=/usr/local \
5083		BINDIR=/usr/local/bin \
5084		INCDIR=/usr/local/include \
5085		LIBDIR=/usr/local/lib/calc \
5086		CALC_SHAREDIR=/usr/local/lib/calc \
5087		HELPDIR=/usr/local/lib/calc/help \
5088		CALC_INCDIR=/usr/local/include/calc \
5089		CUSTOMCALDIR=/usr/local/lib/calc/custom \
5090		CUSTOMHELPDIR=/usr/local/lib/calc/help/custhelp \
5091		CUSTOMINCDIR=/usr/local/lib/calc/custom \
5092		SCRIPTDIR=/usr/local/bin/cscript \
5093		MANDIR=/usr/local/man/man1 \
5094		inst_files
5095	${XARGS} ${RM} -f < inst_files
5096	-${RMDIR} /usr/local/lib/calc/help/custhelp
5097	-${RMDIR} /usr/local/lib/calc/help
5098	-${RMDIR} /usr/local/lib/calc/custom
5099	-${RMDIR} /usr/local/lib/calc
5100	-${RMDIR} /usr/local/include/calc
5101	-${RMDIR} /usr/local/bin/cscript
5102	${RM} -f inst_files
5103	${RM} -f ${CALC_INCDIR}/calcerr.c
5104
5105tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE}
5106	-${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \
5107	    ${GREP} -v 'Duplicate entry|Second entry ignored'
5108
5109clean:
5110	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5111	${RM} -f ${LIBOBJS}
5112	${RM} -f ${CALCOBJS}
5113	${RM} -f ${UTIL_OBJS}
5114	${RM} -f ${UTIL_TMP}
5115	${RM} -f ${UTIL_PROGS}
5116	${RM} -f ${UTIL_FILES}
5117	${RM} -f ${SAMPLE_OBJ}
5118	${RM} -f .libcustcalc_error
5119	${RM} -f calc.spec.sed
5120	${Q} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
5121	cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clean
5122	${Q} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5123	${Q} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-='
5124	cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} clean
5125	${Q} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5126	${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-='
5127	cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} clean
5128	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5129	${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-='
5130	${MAKE} custom/Makefile
5131	cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} clean
5132	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5133	${Q} echo remove files that are obsolete
5134	${RM} -rf lib
5135	${RM} -f endian.h stdarg.h libcalcerr.a cal/obj help/obj
5136	${RM} -f have_vs.c std_arg.h try_stdarg.c fnvhash.c
5137	${RM} -f win32dll.h have_malloc.h math_error.h string.h string.c
5138	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5139
5140clobber: clean
5141	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5142	${RM} -f ${SAMPLE_TARGETS}
5143	${RM} -f ${SAMPLE_STATIC_TARGETS}
5144	${RM} -f tags .hsrc hsrc
5145	${RM} -f ${BUILD_H_SRC}
5146	${RM} -f ${BUILD_C_SRC}
5147	${RM} -f calc${EXT}
5148	${RM} -f *_pure_*.[oa]
5149	${RM} -f *.pure_linkinfo
5150	${RM} -f *.pure_hardlin
5151	${RM} -f *.u
5152	${RM} -f libcalc.a
5153	${RM} -f libcustcalc.a
5154	${RM} -f calc.1 calc.usage
5155	${RM} -f calc.pixie calc.rf calc.Counts calc.cord
5156	${RM} -f gen_h Makefile.bak tmp.patch
5157	${RM} -rf skel
5158	${RM} -f calc.spec inst_files rpm.mk.patch tmp
5159	${RM} -f libcalc${LIB_EXT_VERSION}
5160	${RM} -f libcalc*
5161	${RM} -f libcustcalc${LIB_EXT_VERSION}
5162	${RM} -f libcustcalc*
5163	${RM} -f calc-static${EXT}
5164	${RM} -f ${CALC_STATIC_LIBS}
5165	${RM} -f a.out
5166	${RM} -f all
5167	${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
5168	-${RM} -f help/all; \
5169	    cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@
5170	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5171	${V} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-='
5172	-${RM} -f cal/all; \
5173	    cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@
5174	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5175	${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-='
5176	-${RM} -f custom/all; \
5177	    ${MAKE} custom/Makefile; \
5178	    cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@
5179	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5180	${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-='
5181	-${RM} -f cscript/all; \
5182	    cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@
5183	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5184	${V} echo remove files that are obsolete
5185	${RM} -rf win32 build
5186	${RM} -f no_implicit.arg
5187	${RM} -f no_implicit.c no_implicit.o no_implicit${EXT}
5188	${RM} -f .static .dynamic calc-dynamic-only calc-static-only
5189	-${Q} if [ -e .DS_Store ]; then \
5190	    echo ${RM} -rf .DS_Store; \
5191	    ${RM} -rf .DS_Store; \
5192	fi
5193	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5194
5195# install everything
5196#
5197# NOTE: Keep the uninstall rule in the reverse order of the install rule
5198#
5199install: ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all custom/Makefile
5200	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5201	-${Q} if [ ! -z "${T}" ]; then \
5202	    if [ ! -d ${T} ]; then \
5203		echo ${MKDIR} -p ${T}; \
5204		${MKDIR} -p ${T}; \
5205		echo ${CHMOD} 0755 ${T}; \
5206		${CHMOD} 0755 ${T}; \
5207	    fi; \
5208	fi
5209	-${Q} if [ ! -d ${T}${BINDIR} ]; then \
5210	    echo ${MKDIR} -p ${T}${BINDIR}; \
5211	    ${MKDIR} -p ${T}${BINDIR}; \
5212	    echo ${CHMOD} 0755 ${T}${BINDIR}; \
5213	    ${CHMOD} 0755 ${T}${BINDIR}; \
5214	else \
5215	    ${TRUE}; \
5216	fi
5217	-${Q} if [ ! -d ${T}${INCDIR} ]; then \
5218	    echo ${MKDIR} -p ${T}${INCDIR}; \
5219	    ${MKDIR} -p ${T}${INCDIR}; \
5220	    echo ${CHMOD} 0755 ${T}${INCDIR}; \
5221	    ${CHMOD} 0755 ${T}${INCDIR}; \
5222	else \
5223	    ${TRUE}; \
5224	fi
5225	-${Q} if [ ! -d ${T}${LIBDIR} ]; then \
5226	    echo ${MKDIR} -p ${T}${LIBDIR}; \
5227	    ${MKDIR} -p ${T}${LIBDIR}; \
5228	    echo ${CHMOD} 0755 ${T}${LIBDIR}; \
5229	    ${CHMOD} 0755 ${T}${LIBDIR}; \
5230	else \
5231	    ${TRUE}; \
5232	fi
5233	-${Q} if [ ! -d ${T}${CALC_SHAREDIR} ]; then \
5234	    ${MKDIR} -p ${T}${CALC_SHAREDIR}; \
5235	    echo ${MKDIR} -p ${T}${CALC_SHAREDIR}; \
5236	    echo ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
5237	    ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \
5238	else \
5239	    ${TRUE}; \
5240	fi
5241	-${Q} if [ ! -d ${T}${HELPDIR} ]; then \
5242	    echo ${MKDIR} -p ${T}${HELPDIR}; \
5243	    ${MKDIR} -p ${T}${HELPDIR}; \
5244	    echo ${CHMOD} 0755 ${T}${HELPDIR}; \
5245	    ${CHMOD} 0755 ${T}${HELPDIR}; \
5246	else \
5247	    ${TRUE}; \
5248	fi
5249	-${Q} if [ ! -d ${T}${CALC_INCDIR} ]; then \
5250	    echo ${MKDIR} -p ${T}${CALC_INCDIR}; \
5251	    ${MKDIR} -p ${T}${CALC_INCDIR}; \
5252	    echo ${CHMOD} 0755 ${T}${CALC_INCDIR}; \
5253	    ${CHMOD} 0755 ${T}${CALC_INCDIR}; \
5254	else \
5255	    ${TRUE}; \
5256	fi
5257#if 0	/* start of skip for non-Gnu makefiles */
5258#
5259ifdef ALLOW_CUSTOM
5260#
5261#endif	/* end of skip for non-Gnu makefiles */
5262	-${Q} if [ ! -d ${T}${CUSTOMCALDIR} ]; then \
5263	    echo ${MKDIR} -p ${T}${CUSTOMCALDIR}; \
5264	    ${MKDIR} -p ${T}${CUSTOMCALDIR}; \
5265	    echo ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \
5266	    ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \
5267	else \
5268	    ${TRUE}; \
5269	fi
5270	-${Q} if [ ! -d ${T}${CUSTOMHELPDIR} ]; then \
5271	    echo ${MKDIR} -p ${T}${CUSTOMHELPDIR}; \
5272	    ${MKDIR} -p ${T}${CUSTOMHELPDIR}; \
5273	    echo ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \
5274	    ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \
5275	else \
5276	    ${TRUE}; \
5277	fi
5278	-${Q} if [ ! -d ${T}${CUSTOMINCDIR} ]; then \
5279	    echo ${MKDIR} -p ${T}${CUSTOMINCDIR}; \
5280	    ${MKDIR} -p ${T}${CUSTOMINCDIR}; \
5281	    echo ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \
5282	    ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \
5283	else \
5284	    ${TRUE}; \
5285	fi
5286#if 0	/* start of skip for non-Gnu makefiles */
5287#
5288endif
5289#
5290#endif	/* end of skip for non-Gnu makefiles */
5291	-${Q} if [ ! -d ${T}${SCRIPTDIR} ]; then \
5292	    echo ${MKDIR} -p ${T}${SCRIPTDIR}; \
5293	    ${MKDIR} -p ${T}${SCRIPTDIR}; \
5294	    echo ${CHMOD} 0755 ${T}${SCRIPTDIR}; \
5295	    ${CHMOD} 0755 ${T}${SCRIPTDIR}; \
5296	else \
5297	    ${TRUE}; \
5298	fi
5299	-${Q} if [ ! -z "${MANDIR}" ]; then \
5300	    if [ ! -d ${T}${MANDIR} ]; then \
5301		echo ${MKDIR} -p ${T}${MANDIR}; \
5302		${MKDIR} -p ${T}${MANDIR}; \
5303		echo ${CHMOD} 0755 ${T}${MANDIR}; \
5304		${CHMOD} 0755 ${T}${MANDIR}; \
5305	    else \
5306		${TRUE}; \
5307	    fi; \
5308	else \
5309	    ${TRUE}; \
5310	fi
5311	-${Q} if [ ! -z "${CATDIR}" ]; then \
5312	    if [ ! -d ${T}${CATDIR} ]; then \
5313		echo ${MKDIR} -p ${T}${CATDIR}; \
5314		${MKDIR} -p ${T}${CATDIR}; \
5315		echo ${CHMOD} 0755 ${T}${CATDIR}; \
5316		${CHMOD} 0755 ${T}${CATDIR}; \
5317	    else \
5318		${TRUE}; \
5319	    fi; \
5320	else \
5321	    ${TRUE}; \
5322	fi
5323	-${Q} if ${CMP} -s calc${EXT} ${T}${BINDIR}/calc${EXT}; then \
5324	    ${TRUE}; \
5325	else \
5326	    ${RM} -f ${T}${BINDIR}/calc.new${EXT}; \
5327	    ${CP} -f calc${EXT} ${T}${BINDIR}/calc.new${EXT}; \
5328	    ${CHMOD} 0755 ${T}${BINDIR}/calc.new${EXT}; \
5329	    ${MV} -f ${T}${BINDIR}/calc.new${EXT} ${T}${BINDIR}/calc${EXT}; \
5330	    echo "installed ${T}${BINDIR}/calc${EXT}"; \
5331	fi
5332	-${Q} if [ -f calc-static${EXT} ]; then \
5333	    if ${CMP} -s calc-static${EXT} \
5334			 ${T}${BINDIR}/calc-static${EXT}; then \
5335		${TRUE}; \
5336	    else \
5337		${RM} -f ${T}${BINDIR}/calc-static.new${EXT}; \
5338		${CP} -f calc-static${EXT} \
5339			 ${T}${BINDIR}/calc-static.new${EXT}; \
5340		${CHMOD} 0755 ${T}${BINDIR}/calc-static.new${EXT}; \
5341		${MV} -f ${T}${BINDIR}/calc-static.new${EXT} \
5342			 ${T}${BINDIR}/calc-static${EXT}; \
5343		echo "installed ${T}${BINDIR}/calc-static${EXT}"; \
5344	    fi; \
5345	fi
5346	${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
5347	${Q} cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} install
5348	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5349	${V} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-='
5350	${Q} cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} install
5351	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5352#if 0	/* start of skip for non-Gnu makefiles */
5353#
5354ifdef ALLOW_CUSTOM
5355#
5356#endif	/* end of skip for non-Gnu makefiles */
5357	${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-='
5358	${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} install
5359	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5360#if 0	/* start of skip for non-Gnu makefiles */
5361#
5362endif
5363#
5364#endif	/* end of skip for non-Gnu makefiles */
5365	${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-='
5366	${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} install
5367	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5368	-${Q} if [ -f libcalc.a ]; then \
5369		if ${CMP} -s libcalc.a ${T}${LIBDIR}/libcalc.a; then \
5370		${TRUE}; \
5371	        else \
5372		${RM} -f ${T}${LIBDIR}/libcalc.a.new; \
5373		${CP} -f libcalc.a ${T}${LIBDIR}/libcalc.a.new; \
5374		${CHMOD} 0644 ${T}${LIBDIR}/libcalc.a.new; \
5375		${MV} -f ${T}${LIBDIR}/libcalc.a.new ${T}${LIBDIR}/libcalc.a; \
5376		${RANLIB} ${T}${LIBDIR}/libcalc.a; \
5377		echo "installed ${T}${LIBDIR}/libcalc.a"; \
5378	   fi; \
5379	fi
5380	${Q}# NOTE: The this makefile installs libcustcalc${LIB_EXT_VERSION}
5381	${Q}#       because we only want to perform one ${LDCONFIG} for both
5382	${Q}#       libcalc${LIB_EXT_VERSION} and libcustcalc${LIB_EXT_VERSION}.
5383	-${Q} if ${CMP} -s libcalc${LIB_EXT_VERSION} \
5384		     ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION} && \
5385	   ${CMP} -s custom/libcustcalc${LIB_EXT_VERSION} \
5386		     ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; then \
5387	    ${TRUE}; \
5388	else \
5389	    ${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
5390	    ${CP} -f libcalc${LIB_EXT_VERSION} \
5391		     ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
5392	    ${CHMOD} 0644 ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
5393	    ${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new \
5394		     ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}; \
5395	    echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
5396	    ${LN} -f -s libcalc${LIB_EXT_VERSION} \
5397			${T}${LIBDIR}/libcalc${LIB_EXT}; \
5398	    echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \
5399	    ${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
5400	    ${CP} -f custom/libcustcalc${LIB_EXT_VERSION} \
5401		     ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
5402	    ${CHMOD} 0644 ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
5403	    ${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new \
5404		     ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; \
5405	    echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}"; \
5406	    ${LN} -f -s libcustcalc${LIB_EXT_VERSION} \
5407			${T}${LIBDIR}/libcustcalc${LIB_EXT}; \
5408	    echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \
5409	    if [ -z "${T}" -o "/" = "${T}" ]; then \
5410		if [ ! -z "${LDCONFIG}" ]; then \
5411		    echo "running ${LDCONFIG}"; \
5412		    ${LDCONFIG} -v; \
5413		    echo "finished ${LDCONFIG}"; \
5414		fi; \
5415	    fi; \
5416	fi
5417	-${Q} for i in ${LIB_H_SRC} /dev/null; do \
5418	    if [ "$$i" = "/dev/null" ]; then \
5419		continue; \
5420	    fi; \
5421	    ${RM} -f tmp; \
5422	    ${SED} -e 's/^\(#[ 	]*include[ 	][ 	]*\)"/\1"calc\//' \
5423	              $$i > tmp; \
5424	    if ${CMP} -s tmp ${T}${CALC_INCDIR}/$$i; then \
5425		${TRUE}; \
5426	    else \
5427		${RM} -f ${T}${CALC_INCDIR}/$$i.new; \
5428		${CP} -f tmp ${T}${CALC_INCDIR}/$$i.new; \
5429		${CHMOD} 0444 ${T}${CALC_INCDIR}/$$i.new; \
5430		${MV} -f ${T}${CALC_INCDIR}/$$i.new ${T}${CALC_INCDIR}/$$i; \
5431		echo "installed ${T}${CALC_INCDIR}/$$i"; \
5432	    fi; \
5433	    if [ -f "${T}${CALC_INCDIR}/std_arg.h" ]; then \
5434		${RM} -f ${T}${CALC_INCDIR}/std_arg.h; \
5435		echo "removed old ${T}${CALC_INCDIR}/std_arg.h"; \
5436	    fi; \
5437	    if [ -f "${T}${CALC_INCDIR}/win32dll.h" ]; then \
5438		${RM} -f ${T}${CALC_INCDIR}/win32dll.h; \
5439		echo "removed old ${T}${CALC_INCDIR}/win32dll.h"; \
5440	    fi; \
5441	    if [ -f "${T}${CALC_INCDIR}/have_malloc.h" ]; then \
5442		${RM} -f ${T}${CALC_INCDIR}/have_malloc.h; \
5443		echo "removed old ${T}${CALC_INCDIR}/have_malloc.h"; \
5444	    fi; \
5445	    if [ -f "${T}${CALC_INCDIR}/math_error.h" ]; then \
5446		${RM} -f ${T}${CALC_INCDIR}/math_error.h; \
5447		echo "removed old ${T}${CALC_INCDIR}/math_error.h"; \
5448	    fi; \
5449	    if [ -f "${T}${CALC_INCDIR}/string.h" ]; then \
5450		${RM} -f ${T}${CALC_INCDIR}/string.h; \
5451		echo "removed old ${T}${CALC_INCDIR}/string.h"; \
5452	    fi; \
5453	done
5454	-${Q} if [ -z "${MANDIR}" ]; then \
5455	    ${TRUE}; \
5456	else \
5457	    if ${CMP} -s calc.1 ${T}${MANDIR}/calc.${MANEXT}; then \
5458		${TRUE}; \
5459	    else \
5460		${RM} -f ${T}${MANDIR}/calc.${MANEXT}.new; \
5461		${CP} -f calc.1 ${T}${MANDIR}/calc.${MANEXT}.new; \
5462		${CHMOD} 0444 ${T}${MANDIR}/calc.${MANEXT}.new; \
5463		${MV} -f ${T}${MANDIR}/calc.${MANEXT}.new \
5464		      ${T}${MANDIR}/calc.${MANEXT}; \
5465		echo "installed ${T}${MANDIR}/calc.${MANEXT}"; \
5466	    fi; \
5467	fi
5468	-${Q} if [ -z "${CATDIR}" ]; then \
5469	    ${TRUE}; \
5470	else \
5471	    if ${CMP} -s calc.1 ${T}${MANDIR}/calc.${MANEXT}; then \
5472		${TRUE}; \
5473	    else \
5474		if [ -n "${NROFF}" ]; then \
5475		    ${RM} -f ${T}${CATDIR}/calc.${CATEXT}.new; \
5476		    ${NROFF} ${NROFF_ARG} calc.1 > \
5477			     ${T}${CATDIR}/calc.${CATEXT}.new; \
5478		    ${CHMOD} ${MANMODE} ${T}${MANDIR}/calc.${CATEXT}.new; \
5479		    ${MV} -f ${T}${CATDIR}/calc.${CATEXT}.new \
5480			  ${T}${CATDIR}/calc.${CATEXT}; \
5481		    echo "installed ${T}${CATDIR}/calc.${CATEXT}"; \
5482		elif [ -x "${MANNAME}" ]; then \
5483		    echo "${MANMAKE} calc.1 ${T}${CATDIR}"; \
5484		    ${MANMAKE} calc.1 ${T}${CATDIR}; \
5485		fi; \
5486	    fi; \
5487	fi
5488	${V} # NOTE: misc install cleanup
5489	${Q} ${RM} -f tmp
5490	${V} # NOTE: remove the calcerr.c that was installed by mistake
5491	${V} #	     under ${INC_DIR} in calc v2.12.9.1
5492	${Q} ${RM} -f ${T}${CALC_INCDIR}/calcerr.c
5493	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5494
5495# Try to remove everything that was installed
5496#
5497# NOTE: Keep the uninstall rule in the reverse order of the install rule
5498#
5499uninstall: custom/Makefile
5500	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5501	-${Q} if [ -z "${CATDIR}" ]; then \
5502	    ${TRUE}; \
5503	else \
5504	    if [ -f "${T}${CATDIR}/calc.${CATEXT}" ]; then \
5505		${RM} -f "${T}${CATDIR}/calc.${CATEXT}"; \
5506		if [ -f "${T}${CATDIR}/calc.${CATEXT}" ]; then \
5507		    echo "cannot uninstall ${T}${CATDIR}/calc.${CATEXT}"; \
5508		else \
5509		    echo "uninstalled ${T}${CATDIR}/calc.${CATEXT}"; \
5510		fi; \
5511	    fi; \
5512	fi
5513	-${Q} if [ -z "${MANDIR}" ]; then \
5514	    ${TRUE}; \
5515	else \
5516	    if [ -f "${T}${MANDIR}/calc.${MANEXT}" ]; then \
5517		${RM} -f "${T}${MANDIR}/calc.${MANEXT}"; \
5518		if [ -f "${T}${MANDIR}/calc.${MANEXT}" ]; then \
5519		    echo "cannot uninstall ${T}${MANDIR}/calc.${MANEXT}"; \
5520		else \
5521		    echo "uninstalled ${T}${MANDIR}/calc.${MANEXT}"; \
5522		fi; \
5523	    fi; \
5524	fi
5525	-${Q} for i in ${BUILD_H_SRC} ${LIB_H_SRC} /dev/null; do \
5526	    if [ "$$i" = "/dev/null" ]; then \
5527		continue; \
5528	    fi; \
5529	    if [ -f "${T}${CALC_INCDIR}/$$i" ]; then \
5530		${RM} -f "${T}${CALC_INCDIR}/$$i"; \
5531		if [ -f "${T}${CALC_INCDIR}/$$i" ]; then \
5532		    echo "cannot uninstall ${T}${CALC_INCDIR}/$$i"; \
5533		else \
5534		    echo "uninstalled ${T}${CALC_INCDIR}/$$i"; \
5535		fi; \
5536	    fi; \
5537	done
5538	-${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}" ]; then \
5539	    ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \
5540	    if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}" ]; then \
5541		echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \
5542	    else \
5543		echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \
5544	    fi; \
5545	fi
5546	-${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}" ]; then \
5547	    ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}"; \
5548	    if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}" ]; then \
5549		echo \
5550		"cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}";\
5551	    else \
5552		echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}";\
5553	    fi; \
5554	fi
5555	-${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT}" ]; then \
5556	    ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT}"; \
5557	    if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT}" ]; then \
5558		echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT}"; \
5559	    else \
5560		echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT}"; \
5561	    fi; \
5562	fi
5563	-${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}" ]; then \
5564	    ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
5565	    if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}" ]; then \
5566		${ECHON} "cannot uninstall " \
5567		echo "${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
5568	    else \
5569		echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
5570	    fi; \
5571	fi
5572	-${Q} if [ -z "${T}" -o "/" = "${T}" ]; then \
5573	    if [ ! -z "${LDCONFIG}" ]; then \
5574		echo "running ${LDCONFIG}"; \
5575		${LDCONFIG} -v; \
5576		echo "finished ${LDCONFIG}"; \
5577	    fi; \
5578	fi
5579	-${Q} if [ -f "${T}${LIBDIR}/libcalc.a" ]; then \
5580	    ${RM} -f "${T}${LIBDIR}/libcalc.a"; \
5581	    if [ -f "${T}${LIBDIR}/libcalc.a" ]; then \
5582		echo "cannot uninstall ${T}${LIBDIR}/libcalc.a"; \
5583	    else \
5584		echo "uninstalled ${T}${LIBDIR}/libcalc.a"; \
5585	    fi; \
5586	fi
5587	${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-='
5588	${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} uninstall
5589	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5590	${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-='
5591	${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} uninstall
5592	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5593	${V} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-='
5594	${Q} cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} uninstall
5595	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5596	${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
5597	${Q} cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} uninstall
5598	${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
5599	-${Q} if [ -f "${T}${BINDIR}/calc-static${EXT}" ]; then \
5600	    ${RM} -f "${T}${BINDIR}/calc-static${EXT}"; \
5601	    if [ -f "${T}${BINDIR}/calc-static${EXT}" ]; then \
5602		echo "cannot uninstall ${T}${BINDIR}/calc-static${EXT}"; \
5603	    else \
5604		echo "uninstalled ${T}${BINDIR}/calc-static${EXT}"; \
5605	    fi; \
5606	fi
5607	-${Q} if [ -f "${T}${BINDIR}/calc${EXT}" ]; then \
5608	    ${RM} -f "${T}${BINDIR}/calc${EXT}"; \
5609	    if [ -f "${T}${BINDIR}/calc${EXT}" ]; then \
5610		echo "cannot uninstall ${T}${BINDIR}/calc${EXT}"; \
5611	    else \
5612		echo "uninstalled ${T}${BINDIR}/calc${EXT}"; \
5613	    fi; \
5614	fi
5615	-${Q} for i in ${CATDIR} ${MANDIR} ${SCRIPTDIR} \
5616		    ${CUSTOMINCDIR} ${CUSTOMHELPDIR} ${CUSTOMCALDIR} \
5617		    ${CALC_INCDIR} ${LIBDIR} ${INCDIR} ${BINDIR}; do \
5618	    if [ -d "${T}$$i" ]; then \
5619		${RMDIR} "${T}$$i" 2>/dev/null; \
5620		echo "cleaned up ${T}$$i"; \
5621	    fi; \
5622	done
5623	-${Q} if [ ! -z "${T}" ]; then \
5624	    if [ -d "${T}" ]; then \
5625		${RMDIR} "${T}" 2>/dev/null; \
5626		echo "cleaned up ${T}"; \
5627	    fi; \
5628	 fi
5629	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5630
5631# unbak - remove any .bak files that may have been created
5632#
5633unbak:
5634	${Q} ${RM} -f -v Makefile.bak Makefile.simple.bak
5635	${Q} ${RM} -f -v custom/Makefile.bak custom/Makefile.simple.bak
5636
5637# splint - A tool for statically checking C programs
5638#
5639splint: #hsrc
5640	${SPLINT} ${SPLINT_OPTS} -DCALC_SRC -I. \
5641	    ${CALCSRC} ${LIBSRC} ${BUILD_C_SRC} ${UTIL_C_SRC}
5642
5643# strip - for reducing the size of the binary files
5644#
5645strip:
5646	${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
5647	${Q} for i in ${UTIL_PROGS} ${SAMPLE_TARGETS} ${SAMPLE_STATIC_TARGETS} \
5648		 calc${EXT} calc-static${EXT} ${CALC_DYNAMIC_LIBS} \
5649		 ${CALC_STATIC_LIBS}; do \
5650	    if [ -s "$$i" -a -w "$$i" ]; then \
5651		${STRIP} "$$i"; \
5652		echo "stripped $$i"; \
5653	    fi; \
5654	done
5655	${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
5656
5657# calc-symlink - setup symlinks from standard locations into the ${T} tree
5658#
5659calc-symlink:
5660	${Q}if [ -z "${T}" ]; then \
5661	    echo "cannot use $@ make rule when T make var is empty" 1>&2; \
5662	    echo "aborting" 1>&2; \
5663	    exit 1; \
5664	fi
5665	-${Q} for i in	${BINDIR}/calc${EXT} \
5666			${BINDIR}/calc-static${EXT} \
5667			${SCRIPTDIR} \
5668			${LIBDIR}/libcalc${LIB_EXT_VERSION} \
5669			${LIBDIR}/libcustcalc${LIB_EXT_VERSION} \
5670			${MANDIR}/calc.${MANEXT} \
5671			${CALC_SHAREDIR} \
5672			${CALC_INCDIR} \
5673			; do \
5674	    if [ -e "${T}$$i" ]; then \
5675		    if [ ! -L "$$i" -a "${T}$$i" -ef "$$i" ]; then \
5676			echo "ERROR: ${T}$$i is the same as $$i" 1>&2; \
5677		    else \
5678			if [ -e "$$i" ]; then \
5679			    echo ${RM} -f "$$i"; \
5680			    ${RM} -f "$$i"; \
5681			fi; \
5682			echo ${LN} -s "${T}$$i" "$$i"; \
5683			${LN} -s "${T}$$i" "$$i"; \
5684		    fi; \
5685	    else \
5686	        echo "Warning: not found: ${T}$$i" 1>&2; \
5687	    fi; \
5688	done
5689	-${Q} if [ -n "${CATDIR}" ]; then \
5690	    if [ -e "${T}${CATDIR}/calc.${CATEXT}" ]; then \
5691		if [ ! -L "${CATDIR}/calc.${CATEXT}" -a \
5692		     "${T}${CATDIR}/calc.${CATEXT}" -ef \
5693		     "${CATDIR}/calc.${CATEXT}" ]; then \
5694			${ECHON} "ERROR: ${T}${CATDIR}/calc.${CATEXT}" 2>&1; \
5695			echo "is the same as ${CATDIR}/calc.${CATEXT}" 1>&2; \
5696		else \
5697		    if [ -e "${CATDIR}/calc.${CATEXT}" ]; then \
5698			echo ${RM} -f "${CATDIR}/calc.${CATEXT}"; \
5699			${RM} -f "${CATDIR}/calc.${CATEXT}"; \
5700		    fi; \
5701		    echo ${LN} -s "${T}${CATDIR}/calc.${CATEXT}" \
5702		                  "${CATDIR}/calc.${CATEXT}"; \
5703		    ${LN} -s "${T}${CATDIR}/calc.${CATEXT}" \
5704		             "${CATDIR}/calc.${CATEXT}"; \
5705		fi; \
5706	    fi; \
5707	fi
5708
5709# remove any symlinks that may have been created by calc-symlink
5710#
5711calc-unsymlink:
5712	-${Q} for i in	${BINDIR}/calc${EXT} \
5713			${BINDIR}/calc-static${EXT} \
5714			${SCRIPTDIR} \
5715			${LIBDIR}/libcalc${LIB_EXT_VERSION} \
5716			${LIBDIR}/libcustcalc${LIB_EXT_VERSION} \
5717			${MANDIR}/calc.${MANEXT} \
5718			${CALC_SHAREDIR} \
5719			${CALC_INCDIR} \
5720			; do \
5721	    if [ -L "$$i" ]; then \
5722		echo ${RM} -f "$$i"; \
5723		${RM} -f "$$i"; \
5724	    else \
5725	        echo "Warning: ignoring non-symlink: $$i" 1>&2; \
5726	    fi; \
5727	done
5728	-${Q} if [ -n "${CATDIR}" ]; then \
5729	    if [ -L "${CATDIR}/calc.${CATEXT}" ]; then \
5730		echo ${RM} -f "${CATDIR}/calc.${CATEXT}"; \
5731		${RM} -f "${CATDIR}/calc.${CATEXT}"; \
5732	    else \
5733	        echo "Warning: ignoring non-symlink: ${CATDIR}/calc.${CATEXT}" \
5734		      1>&2; \
5735	    fi; \
5736	fi
5737
5738###
5739#
5740# make depend stuff
5741#
5742###
5743
5744# DO NOT DELETE THIS LINE -- make depend depends on it.
5745
5746addop.o: addop.c
5747addop.o: alloc.h
5748addop.o: banned.h
5749addop.o: block.h
5750addop.o: byteswap.h
5751addop.o: calc.h
5752addop.o: calcerr.h
5753addop.o: cmath.h
5754addop.o: config.h
5755addop.o: decl.h
5756addop.o: endian_calc.h
5757addop.o: func.h
5758addop.o: hash.h
5759addop.o: have_ban_pragma.h
5760addop.o: have_const.h
5761addop.o: have_memmv.h
5762addop.o: have_newstr.h
5763addop.o: have_stdlib.h
5764addop.o: have_string.h
5765addop.o: label.h
5766addop.o: longbits.h
5767addop.o: nametype.h
5768addop.o: opcodes.h
5769addop.o: qmath.h
5770addop.o: sha1.h
5771addop.o: str.h
5772addop.o: symbol.h
5773addop.o: token.h
5774addop.o: value.h
5775addop.o: zmath.h
5776align32.o: align32.c
5777align32.o: banned.h
5778align32.o: have_ban_pragma.h
5779align32.o: have_unistd.h
5780align32.o: longbits.h
5781assocfunc.o: alloc.h
5782assocfunc.o: assocfunc.c
5783assocfunc.o: banned.h
5784assocfunc.o: block.h
5785assocfunc.o: byteswap.h
5786assocfunc.o: calcerr.h
5787assocfunc.o: cmath.h
5788assocfunc.o: config.h
5789assocfunc.o: decl.h
5790assocfunc.o: endian_calc.h
5791assocfunc.o: hash.h
5792assocfunc.o: have_ban_pragma.h
5793assocfunc.o: have_const.h
5794assocfunc.o: have_memmv.h
5795assocfunc.o: have_newstr.h
5796assocfunc.o: have_stdlib.h
5797assocfunc.o: have_string.h
5798assocfunc.o: longbits.h
5799assocfunc.o: nametype.h
5800assocfunc.o: qmath.h
5801assocfunc.o: sha1.h
5802assocfunc.o: str.h
5803assocfunc.o: value.h
5804assocfunc.o: zmath.h
5805blkcpy.o: alloc.h
5806blkcpy.o: banned.h
5807blkcpy.o: blkcpy.c
5808blkcpy.o: blkcpy.h
5809blkcpy.o: block.h
5810blkcpy.o: byteswap.h
5811blkcpy.o: calc.h
5812blkcpy.o: calcerr.h
5813blkcpy.o: cmath.h
5814blkcpy.o: config.h
5815blkcpy.o: decl.h
5816blkcpy.o: endian_calc.h
5817blkcpy.o: file.h
5818blkcpy.o: hash.h
5819blkcpy.o: have_ban_pragma.h
5820blkcpy.o: have_const.h
5821blkcpy.o: have_fpos.h
5822blkcpy.o: have_memmv.h
5823blkcpy.o: have_newstr.h
5824blkcpy.o: have_stdlib.h
5825blkcpy.o: have_string.h
5826blkcpy.o: longbits.h
5827blkcpy.o: nametype.h
5828blkcpy.o: qmath.h
5829blkcpy.o: sha1.h
5830blkcpy.o: str.h
5831blkcpy.o: value.h
5832blkcpy.o: zmath.h
5833block.o: alloc.h
5834block.o: banned.h
5835block.o: block.c
5836block.o: block.h
5837block.o: byteswap.h
5838block.o: calcerr.h
5839block.o: cmath.h
5840block.o: config.h
5841block.o: decl.h
5842block.o: endian_calc.h
5843block.o: hash.h
5844block.o: have_ban_pragma.h
5845block.o: have_const.h
5846block.o: have_memmv.h
5847block.o: have_newstr.h
5848block.o: have_stdlib.h
5849block.o: have_string.h
5850block.o: longbits.h
5851block.o: nametype.h
5852block.o: qmath.h
5853block.o: sha1.h
5854block.o: str.h
5855block.o: value.h
5856block.o: zmath.h
5857byteswap.o: alloc.h
5858byteswap.o: banned.h
5859byteswap.o: byteswap.c
5860byteswap.o: byteswap.h
5861byteswap.o: cmath.h
5862byteswap.o: decl.h
5863byteswap.o: endian_calc.h
5864byteswap.o: have_ban_pragma.h
5865byteswap.o: have_const.h
5866byteswap.o: have_memmv.h
5867byteswap.o: have_newstr.h
5868byteswap.o: have_stdlib.h
5869byteswap.o: have_string.h
5870byteswap.o: longbits.h
5871byteswap.o: qmath.h
5872byteswap.o: zmath.h
5873calc.o: alloc.h
5874calc.o: args.h
5875calc.o: banned.h
5876calc.o: block.h
5877calc.o: byteswap.h
5878calc.o: calc.c
5879calc.o: calc.h
5880calc.o: calcerr.h
5881calc.o: cmath.h
5882calc.o: conf.h
5883calc.o: config.h
5884calc.o: custom.h
5885calc.o: decl.h
5886calc.o: endian_calc.h
5887calc.o: func.h
5888calc.o: hash.h
5889calc.o: have_ban_pragma.h
5890calc.o: have_const.h
5891calc.o: have_memmv.h
5892calc.o: have_newstr.h
5893calc.o: have_stdlib.h
5894calc.o: have_strdup.h
5895calc.o: have_string.h
5896calc.o: have_strlcat.h
5897calc.o: have_strlcpy.h
5898calc.o: have_uid_t.h
5899calc.o: have_unistd.h
5900calc.o: have_unused.h
5901calc.o: hist.h
5902calc.o: label.h
5903calc.o: lib_calc.h
5904calc.o: longbits.h
5905calc.o: nametype.h
5906calc.o: opcodes.h
5907calc.o: qmath.h
5908calc.o: sha1.h
5909calc.o: str.h
5910calc.o: strl.h
5911calc.o: symbol.h
5912calc.o: token.h
5913calc.o: value.h
5914calc.o: zmath.h
5915calcerr.o: banned.h
5916calcerr.o: calcerr.c
5917calcerr.o: calcerr.h
5918calcerr.o: have_ban_pragma.h
5919calcerr.o: have_const.h
5920charbit.o: banned.h
5921charbit.o: charbit.c
5922charbit.o: have_ban_pragma.h
5923charbit.o: have_limits.h
5924codegen.o: alloc.h
5925codegen.o: banned.h
5926codegen.o: block.h
5927codegen.o: byteswap.h
5928codegen.o: calc.h
5929codegen.o: calcerr.h
5930codegen.o: cmath.h
5931codegen.o: codegen.c
5932codegen.o: conf.h
5933codegen.o: config.h
5934codegen.o: decl.h
5935codegen.o: endian_calc.h
5936codegen.o: func.h
5937codegen.o: hash.h
5938codegen.o: have_ban_pragma.h
5939codegen.o: have_const.h
5940codegen.o: have_memmv.h
5941codegen.o: have_newstr.h
5942codegen.o: have_stdlib.h
5943codegen.o: have_string.h
5944codegen.o: have_strlcat.h
5945codegen.o: have_strlcpy.h
5946codegen.o: have_unistd.h
5947codegen.o: label.h
5948codegen.o: lib_calc.h
5949codegen.o: longbits.h
5950codegen.o: nametype.h
5951codegen.o: opcodes.h
5952codegen.o: qmath.h
5953codegen.o: sha1.h
5954codegen.o: str.h
5955codegen.o: strl.h
5956codegen.o: symbol.h
5957codegen.o: token.h
5958codegen.o: value.h
5959codegen.o: zmath.h
5960comfunc.o: alloc.h
5961comfunc.o: banned.h
5962comfunc.o: byteswap.h
5963comfunc.o: cmath.h
5964comfunc.o: comfunc.c
5965comfunc.o: config.h
5966comfunc.o: decl.h
5967comfunc.o: endian_calc.h
5968comfunc.o: have_ban_pragma.h
5969comfunc.o: have_const.h
5970comfunc.o: have_memmv.h
5971comfunc.o: have_newstr.h
5972comfunc.o: have_stdlib.h
5973comfunc.o: have_string.h
5974comfunc.o: longbits.h
5975comfunc.o: nametype.h
5976comfunc.o: qmath.h
5977comfunc.o: zmath.h
5978commath.o: alloc.h
5979commath.o: banned.h
5980commath.o: byteswap.h
5981commath.o: cmath.h
5982commath.o: commath.c
5983commath.o: decl.h
5984commath.o: endian_calc.h
5985commath.o: have_ban_pragma.h
5986commath.o: have_const.h
5987commath.o: have_memmv.h
5988commath.o: have_newstr.h
5989commath.o: have_stdlib.h
5990commath.o: have_string.h
5991commath.o: longbits.h
5992commath.o: qmath.h
5993commath.o: zmath.h
5994config.o: alloc.h
5995config.o: banned.h
5996config.o: block.h
5997config.o: byteswap.h
5998config.o: calc.h
5999config.o: calcerr.h
6000config.o: cmath.h
6001config.o: config.c
6002config.o: config.h
6003config.o: custom.h
6004config.o: decl.h
6005config.o: endian_calc.h
6006config.o: hash.h
6007config.o: have_ban_pragma.h
6008config.o: have_const.h
6009config.o: have_memmv.h
6010config.o: have_newstr.h
6011config.o: have_stdlib.h
6012config.o: have_strdup.h
6013config.o: have_string.h
6014config.o: have_strlcat.h
6015config.o: have_strlcpy.h
6016config.o: have_times.h
6017config.o: longbits.h
6018config.o: nametype.h
6019config.o: qmath.h
6020config.o: sha1.h
6021config.o: str.h
6022config.o: strl.h
6023config.o: token.h
6024config.o: value.h
6025config.o: zmath.h
6026config.o: zrand.h
6027const.o: alloc.h
6028const.o: banned.h
6029const.o: block.h
6030const.o: byteswap.h
6031const.o: calc.h
6032const.o: calcerr.h
6033const.o: cmath.h
6034const.o: config.h
6035const.o: const.c
6036const.o: decl.h
6037const.o: endian_calc.h
6038const.o: hash.h
6039const.o: have_ban_pragma.h
6040const.o: have_const.h
6041const.o: have_memmv.h
6042const.o: have_newstr.h
6043const.o: have_stdlib.h
6044const.o: have_string.h
6045const.o: longbits.h
6046const.o: nametype.h
6047const.o: qmath.h
6048const.o: sha1.h
6049const.o: str.h
6050const.o: value.h
6051const.o: zmath.h
6052custom.o: alloc.h
6053custom.o: banned.h
6054custom.o: block.h
6055custom.o: byteswap.h
6056custom.o: calc.h
6057custom.o: calcerr.h
6058custom.o: cmath.h
6059custom.o: config.h
6060custom.o: custom.c
6061custom.o: custom.h
6062custom.o: decl.h
6063custom.o: endian_calc.h
6064custom.o: hash.h
6065custom.o: have_ban_pragma.h
6066custom.o: have_const.h
6067custom.o: have_memmv.h
6068custom.o: have_newstr.h
6069custom.o: have_stdlib.h
6070custom.o: have_string.h
6071custom.o: longbits.h
6072custom.o: nametype.h
6073custom.o: qmath.h
6074custom.o: sha1.h
6075custom.o: str.h
6076custom.o: value.h
6077custom.o: zmath.h
6078endian.o: banned.h
6079endian.o: endian.c
6080endian.o: have_ban_pragma.h
6081endian.o: have_stdlib.h
6082endian.o: have_unistd.h
6083file.o: alloc.h
6084file.o: banned.h
6085file.o: block.h
6086file.o: byteswap.h
6087file.o: calc.h
6088file.o: calcerr.h
6089file.o: cmath.h
6090file.o: config.h
6091file.o: decl.h
6092file.o: endian_calc.h
6093file.o: file.c
6094file.o: file.h
6095file.o: fposval.h
6096file.o: hash.h
6097file.o: have_ban_pragma.h
6098file.o: have_const.h
6099file.o: have_fpos.h
6100file.o: have_fpos_pos.h
6101file.o: have_memmv.h
6102file.o: have_newstr.h
6103file.o: have_stdlib.h
6104file.o: have_string.h
6105file.o: have_strlcat.h
6106file.o: have_strlcpy.h
6107file.o: have_unistd.h
6108file.o: longbits.h
6109file.o: nametype.h
6110file.o: qmath.h
6111file.o: sha1.h
6112file.o: str.h
6113file.o: strl.h
6114file.o: value.h
6115file.o: zmath.h
6116fposval.o: alloc.h
6117fposval.o: banned.h
6118fposval.o: endian_calc.h
6119fposval.o: fposval.c
6120fposval.o: have_ban_pragma.h
6121fposval.o: have_fpos.h
6122fposval.o: have_fpos_pos.h
6123fposval.o: have_memmv.h
6124fposval.o: have_newstr.h
6125fposval.o: have_offscl.h
6126fposval.o: have_posscl.h
6127fposval.o: have_string.h
6128func.o: alloc.h
6129func.o: banned.h
6130func.o: block.h
6131func.o: byteswap.h
6132func.o: calc.h
6133func.o: calcerr.h
6134func.o: cmath.h
6135func.o: config.h
6136func.o: custom.h
6137func.o: decl.h
6138func.o: endian_calc.h
6139func.o: file.h
6140func.o: func.c
6141func.o: func.h
6142func.o: hash.h
6143func.o: have_ban_pragma.h
6144func.o: have_const.h
6145func.o: have_fpos.h
6146func.o: have_memmv.h
6147func.o: have_newstr.h
6148func.o: have_rusage.h
6149func.o: have_stdlib.h
6150func.o: have_strdup.h
6151func.o: have_string.h
6152func.o: have_strlcat.h
6153func.o: have_strlcpy.h
6154func.o: have_times.h
6155func.o: have_unistd.h
6156func.o: have_unused.h
6157func.o: label.h
6158func.o: longbits.h
6159func.o: nametype.h
6160func.o: opcodes.h
6161func.o: prime.h
6162func.o: qmath.h
6163func.o: sha1.h
6164func.o: str.h
6165func.o: strl.h
6166func.o: symbol.h
6167func.o: token.h
6168func.o: value.h
6169func.o: zmath.h
6170func.o: zrand.h
6171func.o: zrandom.h
6172hash.o: alloc.h
6173hash.o: banned.h
6174hash.o: block.h
6175hash.o: byteswap.h
6176hash.o: calc.h
6177hash.o: calcerr.h
6178hash.o: cmath.h
6179hash.o: config.h
6180hash.o: decl.h
6181hash.o: endian_calc.h
6182hash.o: hash.c
6183hash.o: hash.h
6184hash.o: have_ban_pragma.h
6185hash.o: have_const.h
6186hash.o: have_memmv.h
6187hash.o: have_newstr.h
6188hash.o: have_stdlib.h
6189hash.o: have_string.h
6190hash.o: longbits.h
6191hash.o: nametype.h
6192hash.o: qmath.h
6193hash.o: sha1.h
6194hash.o: str.h
6195hash.o: value.h
6196hash.o: zmath.h
6197hash.o: zrand.h
6198hash.o: zrandom.h
6199have_arc4random.o: banned.h
6200have_arc4random.o: have_arc4random.c
6201have_arc4random.o: have_ban_pragma.h
6202have_arc4random.o: have_stdlib.h
6203have_ban_pragma.o: banned.h
6204have_ban_pragma.o: have_ban_pragma.c
6205have_ban_pragma.o: have_ban_pragma.h
6206have_const.o: banned.h
6207have_const.o: have_ban_pragma.h
6208have_const.o: have_const.c
6209have_environ.o: banned.h
6210have_environ.o: have_ban_pragma.h
6211have_environ.o: have_environ.c
6212have_fpos.o: banned.h
6213have_fpos.o: have_ban_pragma.h
6214have_fpos.o: have_fpos.c
6215have_fpos_pos.o: banned.h
6216have_fpos_pos.o: have_ban_pragma.h
6217have_fpos_pos.o: have_fpos.h
6218have_fpos_pos.o: have_fpos_pos.c
6219have_fpos_pos.o: have_posscl.h
6220have_getpgid.o: banned.h
6221have_getpgid.o: have_ban_pragma.h
6222have_getpgid.o: have_getpgid.c
6223have_getpgid.o: have_unistd.h
6224have_getprid.o: banned.h
6225have_getprid.o: have_ban_pragma.h
6226have_getprid.o: have_getprid.c
6227have_getprid.o: have_unistd.h
6228have_getsid.o: banned.h
6229have_getsid.o: have_ban_pragma.h
6230have_getsid.o: have_getsid.c
6231have_getsid.o: have_unistd.h
6232have_gettime.o: banned.h
6233have_gettime.o: have_ban_pragma.h
6234have_gettime.o: have_gettime.c
6235have_memmv.o: banned.h
6236have_memmv.o: have_ban_pragma.h
6237have_memmv.o: have_memmv.c
6238have_memmv.o: have_string.h
6239have_newstr.o: banned.h
6240have_newstr.o: have_ban_pragma.h
6241have_newstr.o: have_newstr.c
6242have_newstr.o: have_string.h
6243have_offscl.o: banned.h
6244have_offscl.o: have_ban_pragma.h
6245have_offscl.o: have_offscl.c
6246have_offscl.o: have_unistd.h
6247have_posscl.o: banned.h
6248have_posscl.o: have_ban_pragma.h
6249have_posscl.o: have_fpos.h
6250have_posscl.o: have_posscl.c
6251have_posscl.o: have_unistd.h
6252have_rusage.o: banned.h
6253have_rusage.o: have_ban_pragma.h
6254have_rusage.o: have_rusage.c
6255have_stdvs.o: banned.h
6256have_stdvs.o: have_ban_pragma.h
6257have_stdvs.o: have_stdlib.h
6258have_stdvs.o: have_stdvs.c
6259have_stdvs.o: have_string.h
6260have_stdvs.o: have_unistd.h
6261have_strdup.o: banned.h
6262have_strdup.o: have_ban_pragma.h
6263have_strdup.o: have_strdup.c
6264have_strdup.o: have_string.h
6265have_strlcat.o: banned.h
6266have_strlcat.o: have_ban_pragma.h
6267have_strlcat.o: have_string.h
6268have_strlcat.o: have_strlcat.c
6269have_strlcpy.o: banned.h
6270have_strlcpy.o: have_ban_pragma.h
6271have_strlcpy.o: have_string.h
6272have_strlcpy.o: have_strlcpy.c
6273have_uid_t.o: banned.h
6274have_uid_t.o: have_ban_pragma.h
6275have_uid_t.o: have_uid_t.c
6276have_uid_t.o: have_unistd.h
6277have_unused.o: banned.h
6278have_unused.o: have_ban_pragma.h
6279have_unused.o: have_unused.c
6280have_ustat.o: banned.h
6281have_ustat.o: have_ban_pragma.h
6282have_ustat.o: have_ustat.c
6283have_varvs.o: banned.h
6284have_varvs.o: have_ban_pragma.h
6285have_varvs.o: have_string.h
6286have_varvs.o: have_unistd.h
6287have_varvs.o: have_varvs.c
6288help.o: alloc.h
6289help.o: banned.h
6290help.o: block.h
6291help.o: byteswap.h
6292help.o: calc.h
6293help.o: calcerr.h
6294help.o: cmath.h
6295help.o: conf.h
6296help.o: config.h
6297help.o: decl.h
6298help.o: endian_calc.h
6299help.o: hash.h
6300help.o: have_ban_pragma.h
6301help.o: have_const.h
6302help.o: have_memmv.h
6303help.o: have_newstr.h
6304help.o: have_stdlib.h
6305help.o: have_string.h
6306help.o: have_unistd.h
6307help.o: help.c
6308help.o: lib_calc.h
6309help.o: longbits.h
6310help.o: nametype.h
6311help.o: qmath.h
6312help.o: sha1.h
6313help.o: str.h
6314help.o: value.h
6315help.o: zmath.h
6316hist.o: alloc.h
6317hist.o: banned.h
6318hist.o: block.h
6319hist.o: byteswap.h
6320hist.o: calc.h
6321hist.o: calcerr.h
6322hist.o: cmath.h
6323hist.o: config.h
6324hist.o: decl.h
6325hist.o: endian_calc.h
6326hist.o: hash.h
6327hist.o: have_ban_pragma.h
6328hist.o: have_const.h
6329hist.o: have_memmv.h
6330hist.o: have_newstr.h
6331hist.o: have_stdlib.h
6332hist.o: have_strdup.h
6333hist.o: have_string.h
6334hist.o: have_strlcat.h
6335hist.o: have_strlcpy.h
6336hist.o: have_unistd.h
6337hist.o: have_unused.h
6338hist.o: hist.c
6339hist.o: hist.h
6340hist.o: lib_calc.h
6341hist.o: longbits.h
6342hist.o: nametype.h
6343hist.o: qmath.h
6344hist.o: sha1.h
6345hist.o: str.h
6346hist.o: strl.h
6347hist.o: value.h
6348hist.o: zmath.h
6349input.o: alloc.h
6350input.o: banned.h
6351input.o: block.h
6352input.o: byteswap.h
6353input.o: calc.h
6354input.o: calcerr.h
6355input.o: cmath.h
6356input.o: conf.h
6357input.o: config.h
6358input.o: decl.h
6359input.o: endian_calc.h
6360input.o: hash.h
6361input.o: have_ban_pragma.h
6362input.o: have_const.h
6363input.o: have_memmv.h
6364input.o: have_newstr.h
6365input.o: have_stdlib.h
6366input.o: have_string.h
6367input.o: have_strlcat.h
6368input.o: have_strlcpy.h
6369input.o: have_unistd.h
6370input.o: hist.h
6371input.o: input.c
6372input.o: longbits.h
6373input.o: nametype.h
6374input.o: qmath.h
6375input.o: sha1.h
6376input.o: str.h
6377input.o: strl.h
6378input.o: value.h
6379input.o: zmath.h
6380jump.o: banned.h
6381jump.o: decl.h
6382jump.o: have_ban_pragma.h
6383jump.o: have_const.h
6384jump.o: jump.c
6385jump.o: jump.h
6386label.o: alloc.h
6387label.o: banned.h
6388label.o: block.h
6389label.o: byteswap.h
6390label.o: calc.h
6391label.o: calcerr.h
6392label.o: cmath.h
6393label.o: config.h
6394label.o: decl.h
6395label.o: endian_calc.h
6396label.o: func.h
6397label.o: hash.h
6398label.o: have_ban_pragma.h
6399label.o: have_const.h
6400label.o: have_memmv.h
6401label.o: have_newstr.h
6402label.o: have_stdlib.h
6403label.o: have_string.h
6404label.o: label.c
6405label.o: label.h
6406label.o: longbits.h
6407label.o: nametype.h
6408label.o: opcodes.h
6409label.o: qmath.h
6410label.o: sha1.h
6411label.o: str.h
6412label.o: token.h
6413label.o: value.h
6414label.o: zmath.h
6415lib_calc.o: alloc.h
6416lib_calc.o: banned.h
6417lib_calc.o: block.h
6418lib_calc.o: byteswap.h
6419lib_calc.o: calc.h
6420lib_calc.o: calcerr.h
6421lib_calc.o: cmath.h
6422lib_calc.o: conf.h
6423lib_calc.o: config.h
6424lib_calc.o: custom.h
6425lib_calc.o: decl.h
6426lib_calc.o: endian_calc.h
6427lib_calc.o: func.h
6428lib_calc.o: hash.h
6429lib_calc.o: have_ban_pragma.h
6430lib_calc.o: have_const.h
6431lib_calc.o: have_memmv.h
6432lib_calc.o: have_newstr.h
6433lib_calc.o: have_stdlib.h
6434lib_calc.o: have_strdup.h
6435lib_calc.o: have_string.h
6436lib_calc.o: have_strlcat.h
6437lib_calc.o: have_strlcpy.h
6438lib_calc.o: have_unistd.h
6439lib_calc.o: label.h
6440lib_calc.o: lib_calc.c
6441lib_calc.o: lib_calc.h
6442lib_calc.o: longbits.h
6443lib_calc.o: nametype.h
6444lib_calc.o: qmath.h
6445lib_calc.o: sha1.h
6446lib_calc.o: str.h
6447lib_calc.o: strl.h
6448lib_calc.o: symbol.h
6449lib_calc.o: terminal.h
6450lib_calc.o: token.h
6451lib_calc.o: value.h
6452lib_calc.o: zmath.h
6453lib_calc.o: zrandom.h
6454lib_util.o: alloc.h
6455lib_util.o: banned.h
6456lib_util.o: byteswap.h
6457lib_util.o: decl.h
6458lib_util.o: endian_calc.h
6459lib_util.o: have_ban_pragma.h
6460lib_util.o: have_const.h
6461lib_util.o: have_memmv.h
6462lib_util.o: have_newstr.h
6463lib_util.o: have_stdlib.h
6464lib_util.o: have_string.h
6465lib_util.o: lib_util.c
6466lib_util.o: lib_util.h
6467lib_util.o: longbits.h
6468lib_util.o: zmath.h
6469listfunc.o: alloc.h
6470listfunc.o: banned.h
6471listfunc.o: block.h
6472listfunc.o: byteswap.h
6473listfunc.o: calcerr.h
6474listfunc.o: cmath.h
6475listfunc.o: config.h
6476listfunc.o: decl.h
6477listfunc.o: endian_calc.h
6478listfunc.o: hash.h
6479listfunc.o: have_ban_pragma.h
6480listfunc.o: have_const.h
6481listfunc.o: have_memmv.h
6482listfunc.o: have_newstr.h
6483listfunc.o: have_stdlib.h
6484listfunc.o: have_string.h
6485listfunc.o: listfunc.c
6486listfunc.o: longbits.h
6487listfunc.o: nametype.h
6488listfunc.o: qmath.h
6489listfunc.o: sha1.h
6490listfunc.o: str.h
6491listfunc.o: value.h
6492listfunc.o: zmath.h
6493listfunc.o: zrand.h
6494longbits.o: banned.h
6495longbits.o: charbit.h
6496longbits.o: have_ban_pragma.h
6497longbits.o: have_limits.h
6498longbits.o: have_stdlib.h
6499longbits.o: have_unistd.h
6500longbits.o: longbits.c
6501matfunc.o: alloc.h
6502matfunc.o: banned.h
6503matfunc.o: block.h
6504matfunc.o: byteswap.h
6505matfunc.o: calcerr.h
6506matfunc.o: cmath.h
6507matfunc.o: config.h
6508matfunc.o: decl.h
6509matfunc.o: endian_calc.h
6510matfunc.o: hash.h
6511matfunc.o: have_ban_pragma.h
6512matfunc.o: have_const.h
6513matfunc.o: have_memmv.h
6514matfunc.o: have_newstr.h
6515matfunc.o: have_stdlib.h
6516matfunc.o: have_string.h
6517matfunc.o: have_unused.h
6518matfunc.o: longbits.h
6519matfunc.o: matfunc.c
6520matfunc.o: nametype.h
6521matfunc.o: qmath.h
6522matfunc.o: sha1.h
6523matfunc.o: str.h
6524matfunc.o: value.h
6525matfunc.o: zmath.h
6526matfunc.o: zrand.h
6527math_error.o: alloc.h
6528math_error.o: args.h
6529math_error.o: banned.h
6530math_error.o: block.h
6531math_error.o: byteswap.h
6532math_error.o: calc.h
6533math_error.o: calcerr.h
6534math_error.o: cmath.h
6535math_error.o: config.h
6536math_error.o: decl.h
6537math_error.o: endian_calc.h
6538math_error.o: hash.h
6539math_error.o: have_ban_pragma.h
6540math_error.o: have_const.h
6541math_error.o: have_memmv.h
6542math_error.o: have_newstr.h
6543math_error.o: have_stdlib.h
6544math_error.o: have_string.h
6545math_error.o: lib_calc.h
6546math_error.o: longbits.h
6547math_error.o: math_error.c
6548math_error.o: nametype.h
6549math_error.o: qmath.h
6550math_error.o: sha1.h
6551math_error.o: str.h
6552math_error.o: value.h
6553math_error.o: zmath.h
6554obj.o: alloc.h
6555obj.o: banned.h
6556obj.o: block.h
6557obj.o: byteswap.h
6558obj.o: calc.h
6559obj.o: calcerr.h
6560obj.o: cmath.h
6561obj.o: config.h
6562obj.o: decl.h
6563obj.o: endian_calc.h
6564obj.o: func.h
6565obj.o: hash.h
6566obj.o: have_ban_pragma.h
6567obj.o: have_const.h
6568obj.o: have_memmv.h
6569obj.o: have_newstr.h
6570obj.o: have_stdlib.h
6571obj.o: have_string.h
6572obj.o: have_strlcat.h
6573obj.o: have_strlcpy.h
6574obj.o: label.h
6575obj.o: longbits.h
6576obj.o: nametype.h
6577obj.o: obj.c
6578obj.o: opcodes.h
6579obj.o: qmath.h
6580obj.o: sha1.h
6581obj.o: str.h
6582obj.o: strl.h
6583obj.o: symbol.h
6584obj.o: value.h
6585obj.o: zmath.h
6586opcodes.o: alloc.h
6587opcodes.o: banned.h
6588opcodes.o: block.h
6589opcodes.o: byteswap.h
6590opcodes.o: calc.h
6591opcodes.o: calcerr.h
6592opcodes.o: cmath.h
6593opcodes.o: config.h
6594opcodes.o: custom.h
6595opcodes.o: decl.h
6596opcodes.o: endian_calc.h
6597opcodes.o: file.h
6598opcodes.o: func.h
6599opcodes.o: hash.h
6600opcodes.o: have_ban_pragma.h
6601opcodes.o: have_const.h
6602opcodes.o: have_fpos.h
6603opcodes.o: have_memmv.h
6604opcodes.o: have_newstr.h
6605opcodes.o: have_stdlib.h
6606opcodes.o: have_string.h
6607opcodes.o: have_unused.h
6608opcodes.o: hist.h
6609opcodes.o: label.h
6610opcodes.o: lib_calc.h
6611opcodes.o: longbits.h
6612opcodes.o: nametype.h
6613opcodes.o: opcodes.c
6614opcodes.o: opcodes.h
6615opcodes.o: qmath.h
6616opcodes.o: sha1.h
6617opcodes.o: str.h
6618opcodes.o: symbol.h
6619opcodes.o: value.h
6620opcodes.o: zmath.h
6621opcodes.o: zrand.h
6622opcodes.o: zrandom.h
6623pix.o: alloc.h
6624pix.o: banned.h
6625pix.o: byteswap.h
6626pix.o: decl.h
6627pix.o: endian_calc.h
6628pix.o: have_ban_pragma.h
6629pix.o: have_const.h
6630pix.o: have_memmv.h
6631pix.o: have_newstr.h
6632pix.o: have_stdlib.h
6633pix.o: have_string.h
6634pix.o: longbits.h
6635pix.o: pix.c
6636pix.o: prime.h
6637pix.o: qmath.h
6638pix.o: zmath.h
6639poly.o: alloc.h
6640poly.o: banned.h
6641poly.o: block.h
6642poly.o: byteswap.h
6643poly.o: calcerr.h
6644poly.o: cmath.h
6645poly.o: config.h
6646poly.o: decl.h
6647poly.o: endian_calc.h
6648poly.o: hash.h
6649poly.o: have_ban_pragma.h
6650poly.o: have_const.h
6651poly.o: have_memmv.h
6652poly.o: have_newstr.h
6653poly.o: have_stdlib.h
6654poly.o: have_string.h
6655poly.o: longbits.h
6656poly.o: nametype.h
6657poly.o: poly.c
6658poly.o: qmath.h
6659poly.o: sha1.h
6660poly.o: str.h
6661poly.o: value.h
6662poly.o: zmath.h
6663prime.o: alloc.h
6664prime.o: banned.h
6665prime.o: byteswap.h
6666prime.o: decl.h
6667prime.o: endian_calc.h
6668prime.o: have_ban_pragma.h
6669prime.o: have_const.h
6670prime.o: have_memmv.h
6671prime.o: have_newstr.h
6672prime.o: have_stdlib.h
6673prime.o: have_string.h
6674prime.o: jump.h
6675prime.o: longbits.h
6676prime.o: prime.c
6677prime.o: prime.h
6678prime.o: qmath.h
6679prime.o: zmath.h
6680qfunc.o: alloc.h
6681qfunc.o: banned.h
6682qfunc.o: byteswap.h
6683qfunc.o: config.h
6684qfunc.o: decl.h
6685qfunc.o: endian_calc.h
6686qfunc.o: have_ban_pragma.h
6687qfunc.o: have_const.h
6688qfunc.o: have_memmv.h
6689qfunc.o: have_newstr.h
6690qfunc.o: have_stdlib.h
6691qfunc.o: have_string.h
6692qfunc.o: longbits.h
6693qfunc.o: nametype.h
6694qfunc.o: prime.h
6695qfunc.o: qfunc.c
6696qfunc.o: qmath.h
6697qfunc.o: zmath.h
6698qio.o: alloc.h
6699qio.o: args.h
6700qio.o: banned.h
6701qio.o: byteswap.h
6702qio.o: config.h
6703qio.o: decl.h
6704qio.o: endian_calc.h
6705qio.o: have_ban_pragma.h
6706qio.o: have_const.h
6707qio.o: have_memmv.h
6708qio.o: have_newstr.h
6709qio.o: have_stdlib.h
6710qio.o: have_string.h
6711qio.o: have_unused.h
6712qio.o: longbits.h
6713qio.o: nametype.h
6714qio.o: qio.c
6715qio.o: qmath.h
6716qio.o: zmath.h
6717qmath.o: alloc.h
6718qmath.o: banned.h
6719qmath.o: byteswap.h
6720qmath.o: config.h
6721qmath.o: decl.h
6722qmath.o: endian_calc.h
6723qmath.o: have_ban_pragma.h
6724qmath.o: have_const.h
6725qmath.o: have_memmv.h
6726qmath.o: have_newstr.h
6727qmath.o: have_stdlib.h
6728qmath.o: have_string.h
6729qmath.o: longbits.h
6730qmath.o: nametype.h
6731qmath.o: qmath.c
6732qmath.o: qmath.h
6733qmath.o: zmath.h
6734qmod.o: alloc.h
6735qmod.o: banned.h
6736qmod.o: byteswap.h
6737qmod.o: config.h
6738qmod.o: decl.h
6739qmod.o: endian_calc.h
6740qmod.o: have_ban_pragma.h
6741qmod.o: have_const.h
6742qmod.o: have_memmv.h
6743qmod.o: have_newstr.h
6744qmod.o: have_stdlib.h
6745qmod.o: have_string.h
6746qmod.o: longbits.h
6747qmod.o: nametype.h
6748qmod.o: qmath.h
6749qmod.o: qmod.c
6750qmod.o: zmath.h
6751qtrans.o: alloc.h
6752qtrans.o: banned.h
6753qtrans.o: byteswap.h
6754qtrans.o: decl.h
6755qtrans.o: endian_calc.h
6756qtrans.o: have_ban_pragma.h
6757qtrans.o: have_const.h
6758qtrans.o: have_memmv.h
6759qtrans.o: have_newstr.h
6760qtrans.o: have_stdlib.h
6761qtrans.o: have_string.h
6762qtrans.o: longbits.h
6763qtrans.o: qmath.h
6764qtrans.o: qtrans.c
6765qtrans.o: zmath.h
6766quickhash.o: alloc.h
6767quickhash.o: banned.h
6768quickhash.o: block.h
6769quickhash.o: byteswap.h
6770quickhash.o: calcerr.h
6771quickhash.o: cmath.h
6772quickhash.o: config.h
6773quickhash.o: decl.h
6774quickhash.o: endian_calc.h
6775quickhash.o: hash.h
6776quickhash.o: have_ban_pragma.h
6777quickhash.o: have_const.h
6778quickhash.o: have_memmv.h
6779quickhash.o: have_newstr.h
6780quickhash.o: have_stdlib.h
6781quickhash.o: have_string.h
6782quickhash.o: longbits.h
6783quickhash.o: nametype.h
6784quickhash.o: qmath.h
6785quickhash.o: quickhash.c
6786quickhash.o: sha1.h
6787quickhash.o: str.h
6788quickhash.o: value.h
6789quickhash.o: zmath.h
6790quickhash.o: zrand.h
6791quickhash.o: zrandom.h
6792sample_many.o: alloc.h
6793sample_many.o: banned.h
6794sample_many.o: block.h
6795sample_many.o: byteswap.h
6796sample_many.o: calc.h
6797sample_many.o: calcerr.h
6798sample_many.o: cmath.h
6799sample_many.o: config.h
6800sample_many.o: decl.h
6801sample_many.o: endian_calc.h
6802sample_many.o: hash.h
6803sample_many.o: have_ban_pragma.h
6804sample_many.o: have_const.h
6805sample_many.o: have_memmv.h
6806sample_many.o: have_newstr.h
6807sample_many.o: have_stdlib.h
6808sample_many.o: have_string.h
6809sample_many.o: lib_util.h
6810sample_many.o: longbits.h
6811sample_many.o: nametype.h
6812sample_many.o: qmath.h
6813sample_many.o: sample_many.c
6814sample_many.o: sha1.h
6815sample_many.o: str.h
6816sample_many.o: value.h
6817sample_many.o: zmath.h
6818sample_many.o: zrandom.h
6819sample_rand.o: alloc.h
6820sample_rand.o: banned.h
6821sample_rand.o: block.h
6822sample_rand.o: byteswap.h
6823sample_rand.o: calc.h
6824sample_rand.o: calcerr.h
6825sample_rand.o: cmath.h
6826sample_rand.o: config.h
6827sample_rand.o: decl.h
6828sample_rand.o: endian_calc.h
6829sample_rand.o: hash.h
6830sample_rand.o: have_ban_pragma.h
6831sample_rand.o: have_const.h
6832sample_rand.o: have_memmv.h
6833sample_rand.o: have_newstr.h
6834sample_rand.o: have_stdlib.h
6835sample_rand.o: have_string.h
6836sample_rand.o: lib_util.h
6837sample_rand.o: longbits.h
6838sample_rand.o: nametype.h
6839sample_rand.o: qmath.h
6840sample_rand.o: sample_rand.c
6841sample_rand.o: sha1.h
6842sample_rand.o: str.h
6843sample_rand.o: value.h
6844sample_rand.o: zmath.h
6845sample_rand.o: zrandom.h
6846seed.o: alloc.h
6847seed.o: banned.h
6848seed.o: byteswap.h
6849seed.o: decl.h
6850seed.o: endian_calc.h
6851seed.o: have_arc4random.h
6852seed.o: have_ban_pragma.h
6853seed.o: have_const.h
6854seed.o: have_environ.h
6855seed.o: have_getpgid.h
6856seed.o: have_getprid.h
6857seed.o: have_getsid.h
6858seed.o: have_gettime.h
6859seed.o: have_memmv.h
6860seed.o: have_newstr.h
6861seed.o: have_rusage.h
6862seed.o: have_stdlib.h
6863seed.o: have_string.h
6864seed.o: have_times.h
6865seed.o: have_uid_t.h
6866seed.o: have_unistd.h
6867seed.o: have_urandom.h
6868seed.o: have_ustat.h
6869seed.o: longbits.h
6870seed.o: qmath.h
6871seed.o: seed.c
6872seed.o: zmath.h
6873sha1.o: align32.h
6874sha1.o: alloc.h
6875sha1.o: banned.h
6876sha1.o: block.h
6877sha1.o: byteswap.h
6878sha1.o: calcerr.h
6879sha1.o: cmath.h
6880sha1.o: config.h
6881sha1.o: decl.h
6882sha1.o: endian_calc.h
6883sha1.o: hash.h
6884sha1.o: have_ban_pragma.h
6885sha1.o: have_const.h
6886sha1.o: have_memmv.h
6887sha1.o: have_newstr.h
6888sha1.o: have_stdlib.h
6889sha1.o: have_string.h
6890sha1.o: longbits.h
6891sha1.o: nametype.h
6892sha1.o: qmath.h
6893sha1.o: sha1.c
6894sha1.o: sha1.h
6895sha1.o: str.h
6896sha1.o: value.h
6897sha1.o: zmath.h
6898size.o: alloc.h
6899size.o: banned.h
6900size.o: block.h
6901size.o: byteswap.h
6902size.o: calcerr.h
6903size.o: cmath.h
6904size.o: config.h
6905size.o: decl.h
6906size.o: endian_calc.h
6907size.o: hash.h
6908size.o: have_ban_pragma.h
6909size.o: have_const.h
6910size.o: have_memmv.h
6911size.o: have_newstr.h
6912size.o: have_stdlib.h
6913size.o: have_string.h
6914size.o: longbits.h
6915size.o: nametype.h
6916size.o: qmath.h
6917size.o: sha1.h
6918size.o: size.c
6919size.o: str.h
6920size.o: value.h
6921size.o: zmath.h
6922size.o: zrand.h
6923size.o: zrandom.h
6924str.o: alloc.h
6925str.o: banned.h
6926str.o: block.h
6927str.o: byteswap.h
6928str.o: calc.h
6929str.o: calcerr.h
6930str.o: cmath.h
6931str.o: config.h
6932str.o: decl.h
6933str.o: endian_calc.h
6934str.o: hash.h
6935str.o: have_ban_pragma.h
6936str.o: have_const.h
6937str.o: have_memmv.h
6938str.o: have_newstr.h
6939str.o: have_stdlib.h
6940str.o: have_string.h
6941str.o: have_strlcat.h
6942str.o: have_strlcpy.h
6943str.o: longbits.h
6944str.o: nametype.h
6945str.o: qmath.h
6946str.o: sha1.h
6947str.o: str.c
6948str.o: str.h
6949str.o: strl.h
6950str.o: value.h
6951str.o: zmath.h
6952strl.o: alloc.h
6953strl.o: banned.h
6954strl.o: decl.h
6955strl.o: have_ban_pragma.h
6956strl.o: have_const.h
6957strl.o: have_memmv.h
6958strl.o: have_newstr.h
6959strl.o: have_string.h
6960strl.o: have_strlcat.h
6961strl.o: have_strlcpy.h
6962strl.o: strl.c
6963strl.o: strl.h
6964symbol.o: alloc.h
6965symbol.o: banned.h
6966symbol.o: block.h
6967symbol.o: byteswap.h
6968symbol.o: calc.h
6969symbol.o: calcerr.h
6970symbol.o: cmath.h
6971symbol.o: config.h
6972symbol.o: decl.h
6973symbol.o: endian_calc.h
6974symbol.o: func.h
6975symbol.o: hash.h
6976symbol.o: have_ban_pragma.h
6977symbol.o: have_const.h
6978symbol.o: have_memmv.h
6979symbol.o: have_newstr.h
6980symbol.o: have_stdlib.h
6981symbol.o: have_string.h
6982symbol.o: label.h
6983symbol.o: longbits.h
6984symbol.o: nametype.h
6985symbol.o: opcodes.h
6986symbol.o: qmath.h
6987symbol.o: sha1.h
6988symbol.o: str.h
6989symbol.o: symbol.c
6990symbol.o: symbol.h
6991symbol.o: token.h
6992symbol.o: value.h
6993symbol.o: zmath.h
6994token.o: alloc.h
6995token.o: args.h
6996token.o: banned.h
6997token.o: block.h
6998token.o: byteswap.h
6999token.o: calc.h
7000token.o: calcerr.h
7001token.o: cmath.h
7002token.o: config.h
7003token.o: decl.h
7004token.o: endian_calc.h
7005token.o: hash.h
7006token.o: have_ban_pragma.h
7007token.o: have_const.h
7008token.o: have_memmv.h
7009token.o: have_newstr.h
7010token.o: have_stdlib.h
7011token.o: have_string.h
7012token.o: lib_calc.h
7013token.o: longbits.h
7014token.o: nametype.h
7015token.o: qmath.h
7016token.o: sha1.h
7017token.o: str.h
7018token.o: token.c
7019token.o: token.h
7020token.o: value.h
7021token.o: zmath.h
7022value.o: alloc.h
7023value.o: banned.h
7024value.o: block.h
7025value.o: byteswap.h
7026value.o: calc.h
7027value.o: calcerr.h
7028value.o: cmath.h
7029value.o: config.h
7030value.o: decl.h
7031value.o: endian_calc.h
7032value.o: file.h
7033value.o: func.h
7034value.o: hash.h
7035value.o: have_ban_pragma.h
7036value.o: have_const.h
7037value.o: have_fpos.h
7038value.o: have_memmv.h
7039value.o: have_newstr.h
7040value.o: have_stdlib.h
7041value.o: have_string.h
7042value.o: label.h
7043value.o: longbits.h
7044value.o: nametype.h
7045value.o: opcodes.h
7046value.o: qmath.h
7047value.o: sha1.h
7048value.o: str.h
7049value.o: symbol.h
7050value.o: value.c
7051value.o: value.h
7052value.o: zmath.h
7053value.o: zrand.h
7054value.o: zrandom.h
7055version.o: alloc.h
7056version.o: banned.h
7057version.o: block.h
7058version.o: byteswap.h
7059version.o: calc.h
7060version.o: calcerr.h
7061version.o: cmath.h
7062version.o: config.h
7063version.o: decl.h
7064version.o: endian_calc.h
7065version.o: hash.h
7066version.o: have_ban_pragma.h
7067version.o: have_const.h
7068version.o: have_memmv.h
7069version.o: have_newstr.h
7070version.o: have_stdlib.h
7071version.o: have_string.h
7072version.o: have_strlcat.h
7073version.o: have_strlcpy.h
7074version.o: have_unused.h
7075version.o: longbits.h
7076version.o: nametype.h
7077version.o: qmath.h
7078version.o: sha1.h
7079version.o: str.h
7080version.o: strl.h
7081version.o: value.h
7082version.o: version.c
7083version.o: zmath.h
7084zfunc.o: alloc.h
7085zfunc.o: banned.h
7086zfunc.o: byteswap.h
7087zfunc.o: decl.h
7088zfunc.o: endian_calc.h
7089zfunc.o: have_ban_pragma.h
7090zfunc.o: have_const.h
7091zfunc.o: have_memmv.h
7092zfunc.o: have_newstr.h
7093zfunc.o: have_stdlib.h
7094zfunc.o: have_string.h
7095zfunc.o: longbits.h
7096zfunc.o: zfunc.c
7097zfunc.o: zmath.h
7098zio.o: alloc.h
7099zio.o: args.h
7100zio.o: banned.h
7101zio.o: byteswap.h
7102zio.o: config.h
7103zio.o: decl.h
7104zio.o: endian_calc.h
7105zio.o: have_ban_pragma.h
7106zio.o: have_const.h
7107zio.o: have_memmv.h
7108zio.o: have_newstr.h
7109zio.o: have_stdlib.h
7110zio.o: have_string.h
7111zio.o: longbits.h
7112zio.o: nametype.h
7113zio.o: qmath.h
7114zio.o: zio.c
7115zio.o: zmath.h
7116zmath.o: alloc.h
7117zmath.o: banned.h
7118zmath.o: byteswap.h
7119zmath.o: decl.h
7120zmath.o: endian_calc.h
7121zmath.o: have_ban_pragma.h
7122zmath.o: have_const.h
7123zmath.o: have_memmv.h
7124zmath.o: have_newstr.h
7125zmath.o: have_stdlib.h
7126zmath.o: have_string.h
7127zmath.o: longbits.h
7128zmath.o: zmath.c
7129zmath.o: zmath.h
7130zmod.o: alloc.h
7131zmod.o: banned.h
7132zmod.o: byteswap.h
7133zmod.o: config.h
7134zmod.o: decl.h
7135zmod.o: endian_calc.h
7136zmod.o: have_ban_pragma.h
7137zmod.o: have_const.h
7138zmod.o: have_memmv.h
7139zmod.o: have_newstr.h
7140zmod.o: have_stdlib.h
7141zmod.o: have_string.h
7142zmod.o: longbits.h
7143zmod.o: nametype.h
7144zmod.o: qmath.h
7145zmod.o: zmath.h
7146zmod.o: zmod.c
7147zmul.o: alloc.h
7148zmul.o: banned.h
7149zmul.o: byteswap.h
7150zmul.o: config.h
7151zmul.o: decl.h
7152zmul.o: endian_calc.h
7153zmul.o: have_ban_pragma.h
7154zmul.o: have_const.h
7155zmul.o: have_memmv.h
7156zmul.o: have_newstr.h
7157zmul.o: have_stdlib.h
7158zmul.o: have_string.h
7159zmul.o: longbits.h
7160zmul.o: nametype.h
7161zmul.o: qmath.h
7162zmul.o: zmath.h
7163zmul.o: zmul.c
7164zprime.o: alloc.h
7165zprime.o: banned.h
7166zprime.o: block.h
7167zprime.o: byteswap.h
7168zprime.o: calcerr.h
7169zprime.o: cmath.h
7170zprime.o: config.h
7171zprime.o: decl.h
7172zprime.o: endian_calc.h
7173zprime.o: hash.h
7174zprime.o: have_ban_pragma.h
7175zprime.o: have_const.h
7176zprime.o: have_memmv.h
7177zprime.o: have_newstr.h
7178zprime.o: have_stdlib.h
7179zprime.o: have_string.h
7180zprime.o: jump.h
7181zprime.o: longbits.h
7182zprime.o: nametype.h
7183zprime.o: prime.h
7184zprime.o: qmath.h
7185zprime.o: sha1.h
7186zprime.o: str.h
7187zprime.o: value.h
7188zprime.o: zmath.h
7189zprime.o: zprime.c
7190zprime.o: zrand.h
7191zrand.o: alloc.h
7192zrand.o: banned.h
7193zrand.o: block.h
7194zrand.o: byteswap.h
7195zrand.o: calcerr.h
7196zrand.o: cmath.h
7197zrand.o: config.h
7198zrand.o: decl.h
7199zrand.o: endian_calc.h
7200zrand.o: hash.h
7201zrand.o: have_ban_pragma.h
7202zrand.o: have_const.h
7203zrand.o: have_memmv.h
7204zrand.o: have_newstr.h
7205zrand.o: have_stdlib.h
7206zrand.o: have_string.h
7207zrand.o: have_unused.h
7208zrand.o: longbits.h
7209zrand.o: nametype.h
7210zrand.o: qmath.h
7211zrand.o: sha1.h
7212zrand.o: str.h
7213zrand.o: value.h
7214zrand.o: zmath.h
7215zrand.o: zrand.c
7216zrand.o: zrand.h
7217zrandom.o: alloc.h
7218zrandom.o: banned.h
7219zrandom.o: block.h
7220zrandom.o: byteswap.h
7221zrandom.o: calcerr.h
7222zrandom.o: cmath.h
7223zrandom.o: config.h
7224zrandom.o: decl.h
7225zrandom.o: endian_calc.h
7226zrandom.o: hash.h
7227zrandom.o: have_ban_pragma.h
7228zrandom.o: have_const.h
7229zrandom.o: have_memmv.h
7230zrandom.o: have_newstr.h
7231zrandom.o: have_stdlib.h
7232zrandom.o: have_string.h
7233zrandom.o: have_unused.h
7234zrandom.o: longbits.h
7235zrandom.o: nametype.h
7236zrandom.o: qmath.h
7237zrandom.o: sha1.h
7238zrandom.o: str.h
7239zrandom.o: value.h
7240zrandom.o: zmath.h
7241zrandom.o: zrandom.c
7242zrandom.o: zrandom.h
7243endif
7244