modified: src1/input.c
[GalaxyCodeBases.git] / c_cpp / etc / calc / custom / Makefile.head
blobb667d4eea398c914b8b1a54726782bfedc6c24e9
1 #!/bin/make
3 # custom - makefile for calc custom routines
5 # Copyright (C) 1999-2006 Landon Curt Noll
7 # Calc is open software; you can redistribute it and/or modify it under
8 # the terms of the version 2.1 of the GNU Lesser General Public License
9 # as published by the Free Software Foundation.
11 # Calc is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
14 # Public License for more details.
16 # A copy of version 2.1 of the GNU Lesser General Public License is
17 # distributed with calc under the filename COPYING-LGPL. You should have
18 # received a copy with calc; if not, write to Free Software Foundation, Inc.
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # @(#) $Revision: 30.28 $
22 # @(#) $Id: Makefile.head,v 30.28 2013/08/11 05:40:18 chongo Exp $
23 # @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $
25 # Under source code control: 1997/03/09 02:28:54
26 # File existed as early as: 1997
28 # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
29 # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
31 # calculator by David I. Bell with help/mods from others
32 # Makefile by Landon Curt Noll
34 #if 0 /* start of skip for non-Gnu makefiles */
35 ##############################################################################
36 #-=-=-=-=-=-=-=-=- Identify the target machine, if possible -=-=-=-=-=-=-=-=-#
37 ##############################################################################
39 # NOTE: You can force a target value by defining target as in:
41 # make ...__optional_arguments_... target=value
43 # Try uname -s if the target was not alreadhy set on the make command line
45 ifeq ($(target),)
46 target=$(shell uname -s 2>/dev/null)
47 endif
48 #endif /* end of skip for non-Gnu makefiles */
50 ##############################################################################
51 #-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
52 ##############################################################################
54 # The custom calc resource files to install
56 # Put your custom calc resource files here.
58 CUSTOM_CALC_FILES= argv.cal halflen.cal pzasusb8.cal pmodm127.cal register.cal
60 # The custom help files to install
62 # Put your custom help files here.
64 CUSTOM_HELP= argv devnull help sysinfo pzasusb8 pmodm127 register
66 # Any .h files that are needed by programs that use
67 # libcustcalc${LIB_EXT_VERSION}
69 # Put any .h files that you add which might be useful to other
70 # programs here.
72 CUSTOM_H_SRC=
74 # Any .c files that are needed to build libcustcalc${LIB_EXT_VERSION}.
76 # Don't put ${REQUIRED_SRC} files in this list.
78 # There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ.
80 # Put your custom .c files here.
82 CUSTOM_SRC= c_argv.c c_devnull.c c_help.c c_sysinfo.c c_pzasusb8.c \
83 c_pmodm127.c c_register.c
85 # Any .o files that are needed by program that use
86 # libcustcalc${LIB_EXT_VERSION}.
88 # Don't put ${REQUIRED_OBJ} files in this list.
90 # There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ.
92 # Put your custom .o files here.
94 CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o \
95 c_pmodm127.o c_register.o
97 ##############################################################################
98 #-=-=-=-=-=-=- Defaults in case you want to build from this dir -=-=-=-=-=-=-#
99 ##############################################################################
101 # Normally, the upper level makefile will set these values. We provide
102 # a default here just in case you want to build from this directory.
104 # Makefile debug
106 # Q=@ do not echo internal makefile actions (quiet mode)
107 # Q= echo internal makefile actions (debug / verbose mode)
112 ####
113 # Normally, the upper level makefile will set these values. We provide
114 # a default here just in case you want to build from this directory.
115 ####
117 # Where the system include (.h) files are kept
119 # For DJGPP, select:
121 # INCDIR= /dev/env/DJDIR/include
123 # If in doubt, set:
125 # INCDIR= /usr/include
128 #INCDIR= /usr/local/include
129 #INCDIR= /dev/env/DJDIR/include
130 INCDIR= /usr/include
132 # where to install calc realted things
134 # ${BINDIR} where to install calc binary files
135 # ${LIBDIR} where calc link library (*.a) files are installed
136 # ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files
138 # NOTE: The install rule prepends installation paths with ${T}, which
139 # by default is empty. If ${T} is non-empty, then installation
140 # locations will be relative to the ${T} directory.
142 # For DJGPP, select:
144 # BINDIR= /dev/env/DJDIR/bin
145 # LIBDIR= /dev/env/DJDIR/lib
146 # CALC_SHAREDIR= /dev/env/DJDIR/share/calc
148 # If in doubt, set:
150 # BINDIR= /usr/bin
151 # LIBDIR= /usr/lib
152 # CALC_SHAREDIR= /usr/share/calc
154 #BINDIR= /usr/local/bin
155 #BINDIR= /dev/env/DJDIR/bin
156 BINDIR= /usr/bin
158 #LIBDIR= /usr/local/lib
159 #LIBDIR= /dev/env/DJDIR/lib
160 LIBDIR= /usr/lib
162 #CALC_SHAREDIR= /usr/local/lib/calc
163 #CALC_SHAREDIR= /dev/env/DJDIR/share/calc
164 CALC_SHAREDIR= /usr/share/calc
166 # By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR
167 # ---------------------------------------------------------------
168 # ${HELPDIR} where the help directory is installed
169 # ${CALC_INCDIR} where the calc include files are installed
170 # ${CUSTOMCALDIR} where custom *.cal files are installed
171 # ${CUSTOMHELPDIR} where custom help files are installed
172 # ${CUSTOMINCDIR} where custom .h files are installed
173 # ${SCRIPTDIR} where calc shell scripts are installed
175 # NOTE: The install rule prepends installation paths with ${T}, which
176 # by default is empty. If ${T} is non-empty, then installation
177 # locations will be relative to the ${T} directory.
179 # If in doubt, set:
181 # HELPDIR= ${CALC_SHAREDIR}/help
182 # CALC_INCDIR= ${INCDIR}/calc
183 # CUSTOMCALDIR= ${CALC_SHAREDIR}/custom
184 # CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp
185 # CUSTOMINCDIR= ${CALC_INCDIR}/custom
186 # SCRIPTDIR= ${BINDIR}/cscript
188 HELPDIR= ${CALC_SHAREDIR}/help
189 CALC_INCDIR= ${INCDIR}/calc
190 CUSTOMCALDIR= ${CALC_SHAREDIR}/custom
191 CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp
192 CUSTOMINCDIR= ${CALC_INCDIR}/custom
193 SCRIPTDIR= ${BINDIR}/cscript
195 # T - top level directory under which calc will be installed
197 # The calc install is performed under ${T}, the calc build is
198 # performed under /. The purpose for ${T} is to allow someone
199 # to install calc somewhere other than into the system area.
201 # For example, if:
203 # BINDIR= /usr/bin
204 # LIBDIR= /usr/lib
205 # CALC_SHAREDIR= /usr/share/calc
207 # and if:
209 # T= /var/tmp/testing
211 # Then the installation locations will be:
213 # calc binary files: /var/tmp/testing/usr/bin
214 # calc link library: /var/tmp/testing/usr/lib
215 # calc help, .cal ...: /var/tmp/testing/usr/share/calc
216 # ... etc ... /var/tmp/testing/...
218 # If ${T} is empty, calc is installed under /, which is the same
219 # top of tree for which it was built. If ${T} is non-empty, then
220 # calc is installed under ${T}, as if one had to chroot under
221 # ${T} for calc to operate.
223 # If in doubt, use T=
227 # Debug/Optimize options for ${CC} and ${LCC}
229 # Select DEBUG= -O2 -gstabs+ -DWINDOZ for DJGPP.
231 #DEBUG=
233 #DEBUG= -O
234 #DEBUG= -O -g
235 #DEBUG= -O -g3
237 #DEBUG= -O1
238 #DEBUG= -O1 -g
239 #DEBUG= -O1 -g3
241 #DEBUG= -O2
242 #DEBUG= -O2 -g
243 #DEBUG= -O2 -g3
244 #DEBUG= -O2 -ipa
245 #DEBUG= -O2 -g3 -ipa
247 #DEBUG= -O3
248 #DEBUG= -O3 -g
249 DEBUG= -O3 -g3
250 #DEBUG= -O3 -ipa
251 #DEBUG= -O3 -g3 -ipa
253 #DEBUG= -g
254 #DEBUG= -g3
255 #DEBUG= -gx
256 #DEBUG= -WM,-g
258 #DEBUG= -O2 -gstabs+ -DWINDOZ
260 # Some systems require one to use ranlib to add a symbol table to
261 # a *.a link library. Set RANLIB to the utility that performs this
262 # action. Set RANLIB to : if your system does not need such a utility.
264 RANLIB=ranlib
265 #RANLIB=:
267 # Normally certain files depend on the Makefile. If the Makefile is
268 # changed, then certain steps should be redone. If MAKE_FILE is
269 # set to Makefile, then these files will depend on Makefile. If
270 # MAKE_FILE is empty, then they wont.
272 # If in doubt, set MAKE_FILE to Makefile
274 MAKE_FILE= Makefile
275 #MAKE_FILE=
277 # Controlling file makefile basename (without the path)
279 # This is the basename same of the makefile that may/does/will drive
280 # this makefile.
282 # If in doubt, set TOP_MAKE_FILE to Makefile
284 TOP_MAKE_FILE= Makefile
286 # If you do not wish to use purify, set PURIFY to an empty string.
288 # If in doubt, use PURIFY=
290 #PURIFY= purify
291 #PURIFY= purify -m71-engine
292 #PURIFY= purify -logfile=pure.out
293 #PURIFY= purify -m71-engine -logfile=pure.out
294 PURIFY=
296 # If you want to use a debugging link library such as a malloc debug link
297 # library, or need to add special ld flags after the calc link libraries
298 # are included, set ${LD_DEBUG} below.
300 # If in doubt, set LD_DEBUG to empty.
302 #LD_DEBUG= -lmalloc_cv
303 LD_DEBUG=
305 # When doing a:
307 # make check
308 # make chk
309 # make debug
311 # the ${CALC_ENV} is used to supply the proper environment variables
312 # to calc. Most people will simply need 'CALCPATH=./cal' to ensure
313 # that these debug rules will only use calc resource files under the
314 # local source directory. The longer lines (with MALLOC_VERBOSE=1 ...)
315 # are useful for SGI IRIX people who have 'WorkShop Performance Tools'
316 # and who also set 'LD_DEBUG= -lmalloc_cv' above.
318 # If in doubt, use CALC_ENV= CALCPATH=./cal.
320 CALC_ENV= CALCPATH=./cal
321 #CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \
322 # MALLOC_FASTCHK=1 MALLOC_FULLWARN=1
323 #CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \
324 # MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 MALLOC_CLEAR_FREE=1 \
325 # MALLOC_CLEAR_MALLOC=1
327 # By default, custom builtin functions may only be executed if calc
328 # is given the -C option. This is because custom builtin functions
329 # may invoke non-standard or non-portable code. One may completely
330 # disable custom builtin functions by not compiling any of code
332 # ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given
333 # ALLOW_CUSTOM= # disable custom even if -C is given
335 # If in doubt, use ALLOW_CUSTOM= -DCUSTOM
337 ALLOW_CUSTOM= -DCUSTOM
338 #ALLOW_CUSTOM=
340 # The install rule uses:
342 # ${MKDIR} ${MKDIR_ARG}
344 # to create directorties. Normall this amounts to usins mkdir -p dir ...
345 # Some older systems may not have mkdir -p. If you system does not
346 # make mkdir -p, then set MKDIR_ARG to empty.
348 # MKDIR_ARG= -p # use mkdir -p when creating paths
349 # MKDIR_ARG= # use if system does not understand mkdir -p
351 MKDIR_ARG= -p
352 #MKDIR_ARG=
354 # Some out of date operating systems require / want an executable to
355 # end with a certain file extension. Some compile systems such as
356 # Cygwin build calc as calc.exe. The EXT variable is used to denote
357 # the extension required by such.
359 # EXT= # normal Un*x / Linux / GNU/Linux systems
360 # EXT=.exe # windoz / Cygwin
362 # If in doubt, use EXT=
364 EXT=
365 #EXT=.exe
367 # The default calc versions
369 VERSION= 2.12.4.10
370 VERS= 2.12.4
371 VER= 2.12
372 VE= 2
374 # Names of shared libraries with versions
376 LIB_EXT= .so
377 LIB_EXT_VERSION= ${LIB_EXT}.${VERSION}
378 LIB_EXT_VERS= ${LIB_EXT}.${VERS}
379 LIB_EXT_VER= ${LIB_EXT}.${VER}
380 LIB_EXT_VE= ${LIB_EXT}.${VE}
382 # standard tools
384 SHELL= /bin/sh
385 SED= sed
386 MAKEDEPEND= makedepend
387 GREP= egrep
388 CHMOD= chmod
389 FMT= fmt
390 SORT= sort
391 CMP= cmp
392 AR= ar
393 RM= rm
394 TOUCH= touch
395 MKDIR= mkdir
396 RMDIR= rmdir
397 MV= mv
398 CP= cp
399 CO= co
400 TRUE= true
401 MAKE= make
402 LN= ln
403 AWK= awk
405 # EXTRA_CFLAGS are flags given to ${CC} when compiling C files
406 # EXTRA_LDFLAGS are flags given to ${CC} when linking progs
408 # Both CFLAGS and LDFLAGS are left blank in this Makefile by
409 # default so that users may use them on the make command line
410 # to always the way that C is compiled and files are linked
411 # respectively. For example:
413 # make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic"
415 # NOTE: These should be left blank in this Makefile to make it
416 # easier to add stuff on the command line. If you want to
417 # to change the way calc is compiled by this Makefile, change
418 # the appropirate host target section below or a flag above.
420 EXTRA_CFLAGS=
421 EXTRA_LDFLAGS=
423 # COMMON_CFLAGS are the common ${CC} flags used for all progs, both
424 # intermediate and final calc and calc related progs
426 COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS}
428 # COMMON_LDFLAGS are the common flags used for linking all progs, both
429 # intermediate and final calc and calc related progs
431 COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
433 ###########################################
434 # Set the default compile flags for ${CC} #
435 ###########################################
437 #if 0 /* start of skip for non-Gnu makefiles */
439 # Required flags to compile C files for calc
441 # ICFLAGS are given to ${CC} for intermediate progs used to help compile calc
442 # CFLAGS are given to ${CC} for calc progs other than intermediate progs
444 # NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only
446 ifeq ($(BLD_TYPE),calc-static-only)
447 ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
448 else
449 ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE}
450 endif
451 CFLAGS= ${ICFLAGS} ${CCOPT}
453 # Required flags to link files for calc
455 # ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc
456 # LDFLAGS for ${CC} in linking calc progs other than intermediate progs
458 ILDFLAGS= ${COMMON_LDFLAGS}
459 LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
461 #endif /* end of skip for non-Gnu makefiles */