⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 Calc Software Package for Number Calc
💻
📖 第 1 页 / 共 2 页
字号:
#!/bin/make## custom - makefile for calc custom routines## Copyright (C) 1999-2006  Landon Curt Noll## Calc is open software; you can redistribute it and/or modify it under# the terms of the version 2.1 of the GNU Lesser General Public License# as published by the Free Software Foundation.## Calc is distributed in the hope that it will be useful, but WITHOUT# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY# or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU Lesser General# Public License for more details.## A copy of version 2.1 of the GNU Lesser General Public License is# distributed with calc under the filename COPYING-LGPL.  You should have# received a copy with calc; if not, write to Free Software Foundation, Inc.# 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.## @(#) $Revision: 29.29 $# @(#) $Id: Makefile,v 29.29 2006/09/18 13:13:25 chongo Exp $# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile,v $## Under source code control:	1997/03/09 02:28:54# File existed as early as:	1997## chongo <was here> /\oo/\	http://www.isthe.com/chongo/# Share and enjoy!  :-) http://www.isthe.com/chongo/tech/comp/calc/## calculator by David I. Bell with help/mods from others# Makefile by Landon Curt Noll###############################################################################-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-################################################################################ The custom calc resource files to install## Put your custom calc resource files here.#CUSTOM_CALC_FILES= argv.cal halflen.cal pzasusb8.cal pmodm127.cal# The custom help files to install## Put your custom help files here.#CUSTOM_HELP= argv devnull help sysinfo pzasusb8 pmodm127# Any .h files that are needed by programs that use libcustcalc.a## Put any .h files that you add which might be useful to other# programs here.#CUSTOM_H_SRC=# Any .c files that are needed to build libcustcalc.a.# Don't put ${REQUIRED_SRC} files in this list.## There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ.## Put your custom .c files here.#CUSTOM_SRC= c_argv.c c_devnull.c c_help.c c_sysinfo.c c_pzasusb8.c c_pmodm127.c# Any .o files that are needed by program that use libcustcalc.a.# Don't put ${REQUIRED_OBJ} files in this list.## There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ.## Put your custom .o files here.#CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o c_pmodm127.o###############################################################################-=-=-=-=-=-=- Defaults in case you want to build from this dir -=-=-=-=-=-=-################################################################################ Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## Makefile debug## Q=@	do not echo internal makefile actions (quiet mode)# Q=	echo internal makefile actions (debug / verbose mode)##Q=Q=@##### Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.##### Where the system include (.h) files are kept## For DJGPP, select:##	INCDIR= /dev/env/DJDIR/include## If in doubt, set:##	INCDIR= /usr/include##INCDIR= /usr/local/include#INCDIR= /dev/env/DJDIR/includeINCDIR= /usr/include# where to install calc realted things## ${BINDIR}		where to install calc binary files# ${LIBDIR}		where calc link library (*.a) files are installed# ${CALC_SHAREDIR}	where to install calc help, .cal, startup, config files## NOTE: The install rule prepends installation paths with ${T}, which#	by default is empty.  If ${T} is non-empty, then installation#	locations will be relative to the ${T} directory.## For DJGPP, select:##	BINDIR= /dev/env/DJDIR/bin#	LIBDIR= /dev/env/DJDIR/lib#	CALC_SHAREDIR= /dev/env/DJDIR/share/calc## If in doubt, set:##	BINDIR= /usr/bin#	LIBDIR= /usr/lib#	CALC_SHAREDIR= /usr/share/calc##BINDIR= /usr/local/bin#BINDIR= /dev/env/DJDIR/binBINDIR= /usr/bin#LIBDIR= /usr/local/lib#LIBDIR= /dev/env/DJDIR/libLIBDIR= /usr/lib#CALC_SHAREDIR= /usr/local/lib/calc#CALC_SHAREDIR= /dev/env/DJDIR/share/calcCALC_SHAREDIR= /usr/share/calc# By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR# ---------------------------------------------------------------# ${HELPDIR}		where the help directory is installed# ${CALC_INCDIR}	where the calc include files are installed# ${CUSTOMCALDIR}	where custom *.cal files are installed# ${CUSTOMHELPDIR}	where custom help files are installed# ${CUSTOMINCDIR}	where custom .h files are installed# ${SCRIPTDIR}		where calc shell scripts are installed## NOTE: The install rule prepends installation paths with ${T}, which#	by default is empty.  If ${T} is non-empty, then installation#	locations will be relative to the ${T} directory.## If in doubt, set:##	HELPDIR= ${CALC_SHAREDIR}/help#	CALC_INCDIR= ${INCDIR}/calc#	CUSTOMCALDIR= ${CALC_SHAREDIR}/custom#	CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp#	CUSTOMINCDIR= ${CALC_INCDIR}/custom#	SCRIPTDIR= ${BINDIR}/cscript#HELPDIR= ${CALC_SHAREDIR}/helpCALC_INCDIR= ${INCDIR}/calcCUSTOMCALDIR= ${CALC_SHAREDIR}/customCUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelpCUSTOMINCDIR= ${CALC_INCDIR}/customSCRIPTDIR= ${BINDIR}/cscript# T - top level directory under which calc will be installed## The calc install is performed under ${T}, the calc build is# performed under /.	The purpose for ${T} is to allow someone# to install calc somewhere other than into the system area.## For example, if:##     BINDIR= /usr/bin#     LIBDIR= /usr/lib#     CALC_SHAREDIR= /usr/share/calc## and if:##     T= /var/tmp/testing## Then the installation locations will be:##     calc binary files:	/var/tmp/testing/usr/bin#     calc link library:	/var/tmp/testing/usr/lib#     calc help, .cal ...:	/var/tmp/testing/usr/share/calc#     ... etc ...		/var/tmp/testing/...## If ${T} is empty, calc is installed under /, which is the same# top of tree for which it was built.  If ${T} is non-empty, then# calc is installed under ${T}, as if one had to chroot under# ${T} for calc to operate.## If in doubt, use T=#T=# Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## Debug/Optimize options for ${CC}#DEBUG= -O#DEBUG= -O -g#DEBUG= -O -g3#DEBUG= -O1#DEBUG= -O1 -g#DEBUG= -O1 -g3#DEBUG= -O2#DEBUG= -O2 -g#DEBUG= -O2 -g3#DEBUG= -O2 -ipa#DEBUG= -O2 -g3 -ipa#DEBUG= -O3#DEBUG= -O3 -g#DEBUG= -O3 -g3#DEBUG= -O3 -ipa#DEBUG= -O3 -g3 -ipa#DEBUG= -g#DEBUG= -g3#DEBUG= -gx#DEBUG= -WM,-g#DEBUG=# Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## On systems that have dynamic shared libs, you may want want to disable them# for faster calc startup.##    System type    NO_SHARED recommendation##	BSD	    NO_SHARED=#	SYSV	    NO_SHARED= -dn#	IRIX	    NO_SHARED= -non_shared#	disable	    NO_SHARED=## If in doubt, use NO_SHARED=#NO_SHARED=#NO_SHARED= -dn#NO_SHARED= -non_shared# On some systems where you are disabling dynamic shared link libs, you may# need to pass a special flag to ${CC} and ${LCC} during linking stage.##    System type			    NO_SHARED recommendation##	IRIX with NO_SHARED= -non_shared    LD_NO_SHARED= -Wl,-rdata_shared#	IRIX with NO_SHARED=		    LD_NO_SHARED=#	others				    LD_NO_SHARED=## If in doubt, use LD_NO_SHARED=#LD_NO_SHARED=#LD_NO_SHARED= -Wl,-rdata_shared# Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## Some systems require one to use ranlib to add a symbol table to# a *.a link library.  Set RANLIB to the utility that performs this action.# Set RANLIB to : if your system does not need such a utility.##RANLIB=ranlibRANLIB=:# Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## Normally certain files depend on the Makefile.  If the Makefile is# changed, then certain steps should be redone.	 If MAKE_FILE is# set to Makefile, then these files will depend on Makefile.  If# MAKE_FILE is empty, they they wont.## If in doubt, set MAKE_FILE to Makefile#MAKE_FILE= Makefile#MAKE_FILE=# Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## If you do not wish to use purify, set PURIFY to an empty string.## If in doubt, use PURIFY=##PURIFY= purify -logfile=pure.out#PURIFY= purifyPURIFY=# Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## By default, custom builtin functions may only be executed if calc# is given the -C option.  This is because custom builtin functions# may invoke non-standard or non-portable code.	 One may completely# disable custom builtin functions by not compiling any of code## ALLOW_CUSTOM= -DCUSTOM	# allow custom only if -C is given# ALLOW_CUSTOM=			# disable custom even if -C is given## If in doubt, use ALLOW_CUSTOM= -DCUSTOM#ALLOW_CUSTOM= -DCUSTOM#ALLOW_CUSTOM=##### Normally, the upper level makefile will set these values.  We provide# a default here just in case you want to build from this directory.## Select your compiler type by commenting out one of the cc sets below:## CCOPT are flags given to ${CC} for optimization# CCWARN are flags given to ${CC} for warning message control# CCMISC are misc flags given to ${CC}## CFLAGS are all flags given to ${CC} [[often includes CCOPT, CCWARN, CCMISC]]# ICFLAGS are given to ${CC} for intermediate progs## LDFLAGS are flags given to ${CC} for linking .o files# ILDFLAGS are flags given to ${CC} for linking .o files for intermediate progs## CC is how the the C compiler is invoked###### common cc set#CCWARN=CCOPT= ${DEBUG} ${NO_SHARED}CCMISC=#CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC} ${ALLOW_CUSTOM}ICFLAGS= ${CCWARN} ${CCMISC}#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}ILDFLAGS=#CC= ${PURIFY} cc###############################################################################-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-################################################################################ These .c files are required for the main custom interface and# for the custom support functions.## There MUST be a .c for every .o in REQUIRED_OBJ.#REQUIRED_SRC= custtbl.c# These .o files correspond to the .c files in REQUIRED_SRC## There MUST be a .o for every .c in REQUIRED_SRC.#REQUIRED_OBJ= custtbl.o# These .h files are installed under ${CUSTOMCALDIR} by the install rule.#INSTALL_H_SRC= ${CUSTOM_H_SRC}# These .c files are used to form libcustcalc.a.#CUSTCALC_SRC= ${REQUIRED_SRC} ${CUSTOM_SRC}# These .o files are used to form libcustcalc.a.#CUSTCALC_OBJ= ${REQUIRED_OBJ} ${CUSTOM_OBJ}# These .c files are used to build the dependency list#C_SRC= ${REQUIRED_SRC} ${CUSTOM_SRC}# These .h files are used to build the dependecy list#H_SRC= ${CUSTOM_H_SRC}# These files are found (but not built) in the distribution## The CUSTOM_CAL and HOW_TO_ADD are files distributed from this# directory but are installed as help files from the help/Makefile.#DISTLIST= ${CUSTCALC_SRC} ${CUSTOM_CALC_FILES} ${CUSTOM_HELP} \	${INSTALL_H_SRC} CUSTOM_CAL HOW_TO_ADD ${MAKE_FILE}# These files are used to make (but not built) a calc .a link library#CALCLIBLIST= ${CUSTCALC_SRC} ${INSTALL_H_SRC} ${MAKE_FILE} HOW_TO_ADD# This is the custom .a link library that is build#CALC_LIBCUSTOM= libcustcalc.a# complete list of targets#TARGETS= ${CALC_LIBCUSTOM} ${CUSTCALC_OBJ}# required vars#SHELL= /bin/shMAKE_FILE= Makefile# standard tools#SED= sedMAKEDEPEND= makedependCHMOD= chmodSORT= sortCMP= cmpAR= arRM= rmTOUCH= touchMKDIR= mkdirRMDIR= rmdirMV= mvCP= cpCO= coTRUE= trueMAKE= make#### Standard rules and targets###all: ${TARGETS} ${INSTALL_H_SRC} ${CUSTOM_CALC_FILES} \	${CUSTOM_HELP} ${MAKE_FILE} .alllibcustcalc.a: ${CUSTCALC_OBJ} ${MAKE_FILE} ../${MAKE_FILE}	-${RM} -f libcustcalc.a	${AR} qc libcustcalc.a ${CUSTCALC_OBJ}	${RANLIB} libcustcalc.a#### Special .o files###c_sysinfo.o: c_sysinfo.c ${MAKE_FILE}	${CC} ${CFLAGS} c_sysinfo.c -c#### used by the upper level Makefile#### to determine of we have done all#.all:	${RM} -f .all	${TOUCH} .all#### File list generation.	 You can ignore this section.### We will form the names of source files as if they were in a# sub-directory called calc/lib.## NOTE: Due to bogus shells found on one common system we must have#	an non-emoty else clause for every if condition.  *sigh*###distlist: ${DISTLIST}	${Q} for i in ${DISTLIST} /dev/null; do \	    if [ X"$$i" != X"/dev/null" ]; then \		echo custom/$$i; \	    fi; \	donedistdir:	${Q} echo customcalcliblist: ${CALCLIBLIST}	${Q} for i in ${CALCLIBLIST} /dev/null; do \	    if [ X"$$i" != X"/dev/null" ]; then \		echo custom/$$i; \	    fi; \	done#### Home grown make dependency rules.  Your system make not support# or have the needed tools.  You can ignore this section.## We will form a skelaton tree of *.c files containing only #include "foo.h"# lines and .h files containing the same lines surrounded by multiple include# prevention lines.  This allows us to build a static depend list that will# satisfy all possible cpp symbol definition combinations.###depend:	${Q} if [ -f Makefile.bak ]; then \	    echo "Makefile.bak exists, remove or move it out of the way"; \	    exit 1; \	else \	    ${TRUE}; \	fi	${Q} echo forming custom/skel	-${Q} ${RM} -rf skel	${Q} ${MKDIR} skel	${Q} ${MKDIR} skel/custom

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -