home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / n / bind / bind-4.001 / bind-4~ / bind-4.9.3-BETA9 / named / Makefile < prev    next >
Makefile  |  1994-06-11  |  7KB  |  192 lines

  1. #
  2. #    @(#)Makefile.dist    5.4 (Berkeley) 8/15/90
  3. #    $Id: Makefile,v 4.9.1.12 1994/06/11 22:04:46 vixie Exp $
  4. #
  5.  
  6. ## ++Copyright++ 1987, 1988, 1990
  7. ## -
  8. ## Copyright (c) 1987, 1988, 1990
  9. ##    The Regents of the University of California.  All rights reserved.
  10. ## 
  11. ## Redistribution and use in source and binary forms, with or without
  12. ## modification, are permitted provided that the following conditions
  13. ## are met:
  14. ## 1. Redistributions of source code must retain the above copyright
  15. ##    notice, this list of conditions and the following disclaimer.
  16. ## 2. Redistributions in binary form must reproduce the above copyright
  17. ##    notice, this list of conditions and the following disclaimer in the
  18. ##    documentation and/or other materials provided with the distribution.
  19. ## 3. All advertising materials mentioning features or use of this software
  20. ##    must display the following acknowledgement:
  21. ##     This product includes software developed by the University of
  22. ##     California, Berkeley and its contributors.
  23. ## 4. Neither the name of the University nor the names of its contributors
  24. ##    may be used to endorse or promote products derived from this software
  25. ##    without specific prior written permission.
  26. ## 
  27. ## THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  28. ## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29. ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  30. ## ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  31. ## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  32. ## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  33. ## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  34. ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  35. ## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  36. ## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  37. ## SUCH DAMAGE.
  38. ## -
  39. ## Portions Copyright (c) 1993 by Digital Equipment Corporation.
  40. ## 
  41. ## Permission to use, copy, modify, and distribute this software for any
  42. ## purpose with or without fee is hereby granted, provided that the above
  43. ## copyright notice and this permission notice appear in all copies, and that
  44. ## the name of Digital Equipment Corporation not be used in advertising or
  45. ## publicity pertaining to distribution of the document or software without
  46. ## specific, written prior permission.
  47. ## 
  48. ## THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  49. ## WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  50. ## OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
  51. ## CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  52. ## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  53. ## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  54. ## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  55. ## SOFTWARE.
  56. ## -
  57. ## --Copyright--
  58.  
  59. ## NOTE: customizing this Makefile is almost certainly the wrong thing to do.
  60. ##    unless you are a developer and intend to run "make" here a lot of times
  61. ##    per day, you should just run "make" from the top-level directory after
  62. ##    configuring _that_ Makefile with the right system-dependent values.
  63.  
  64. VER    = LOCAL-`date +%y%m%d.%H%M%S`
  65. SHELL    = /bin/sh
  66. DESTDIR =
  67.  
  68. INDOT=
  69. #(sunos)
  70. #INDOT=in.
  71.  
  72. HOSTNAMECMD = hostname || uname -n
  73.  
  74. #(sunos, ultrix, other 4.[23] descendents, irix4, irix5)
  75. #DESTSBIN = ${DESTDIR}/usr/etc
  76. #DESTEXEC = ${DESTDIR}/usr/etc
  77. #PIDDIR = /etc
  78. COMPINCL = ../compat/include
  79. INCL=    ../include
  80. RES=    ../res/libresolv.a
  81.  
  82. #(bsd/386, 4.4bsd, other net2 descendents)
  83. DESTSBIN = ${DESTDIR}/usr/sbin
  84. DESTEXEC = ${DESTDIR}/usr/libexec
  85. PIDDIR = /var/run
  86. #COMPINCL = .
  87. #INCL=
  88. #RES=
  89.  
  90. CC= cc
  91. SHELL= /bin/sh
  92. CDEBUG= -O
  93. LIBS=
  94. COMPLIB= ../compat/lib/lib44bsd.a
  95. PATH_XFER = ${DESTEXEC}/${INDOT}named-xfer
  96. DEFS = -D_PATH_XFER=\"${PATH_XFER}\" -D_PATH_PIDFILE=\"${PIDDIR}/named.pid\"
  97. INSTALL = install
  98.  
  99. #(sgi irix4)
  100. #CC = cc -xansi -signed -D__STDC__ -D_BSD_SIGNALS
  101. #COMPLIB=
  102.  
  103. #(sgi irix5)
  104. #CC = cc -xansi -signed -D__BIT_TYPES_DEFINED__ -D_BSD_SIGNALS
  105. #COMPLIB=
  106.  
  107. CFLAGS = ${CDEBUG} -I${INCL} -I${COMPINCL} ${DEFS}
  108.  
  109. HDRS=    db_defs.h db_glob.h ns_defs.h ns_glob.h named.h pathnames.h tree.h
  110. SRCS=    db_dump.c db_load.c db_lookup.c db_reload.c db_save.c db_update.c \
  111.     db_secure.c db_glue.c \
  112.     ns_forw.c ns_init.c ns_main.c ns_maint.c ns_req.c ns_resp.c \
  113.     ns_sort.c ns_stats.c ns_validate.c ns_ncache.c \
  114.     storage.c dmalloc.c tree.c
  115. OBJS=    db_dump.o db_load.o db_lookup.o db_reload.o db_save.o db_update.o \
  116.     db_secure.o db_glue.o \
  117.     ns_forw.o ns_init.o ns_main.o ns_maint.o ns_req.o ns_resp.o \
  118.     ns_sort.o ns_stats.o ns_validate.o ns_ncache.o \
  119.     storage.o dmalloc.o tree.o
  120. XFERSRCS=  named-xfer.c db_glue.c
  121. XFEROBJ=   named-xfer.o db_glue.o storage.o dmalloc.o
  122.  
  123. all: named named-xfer named.reload named.restart
  124.  
  125. named: ${OBJS} ${RES} ${COMPLIB} version.o
  126.     ${CC} ${CDEBUG} ${LDFLAGS} -o $@ version.o ${OBJS} \
  127.         ${RES} ${COMPLIB} ${LIBS}
  128.  
  129. version.o: version.c
  130.  
  131. version.c: Version.c Makefile ../Makefile ${SRCS} ${HDRS}
  132.     (u=$${USER-root} d=`pwd` h=`${HOSTNAMECMD}` t=`date`; \
  133.     sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \
  134.         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
  135.         < Version.c > version.c)
  136.  
  137. named.reload: named.reload.sh Makefile
  138.     sed -e "s|%PIDDIR%|${PIDDIR}|" \
  139.         < named.reload.sh > named.reload
  140.  
  141. named.restart: named.restart.sh Makefile
  142.     sed -e "s|%PIDDIR%|${PIDDIR}|" \
  143.         -e "s|%INDOT%|${INDOT}|" \
  144.         -e "s|%DESTSBIN%|${DESTSBIN}|" \
  145.         < named.restart.sh > named.restart
  146.  
  147. named-xfer:    ${XFEROBJ} ${RES} ${COMPLIB}
  148.     ${CC} ${CDEBUG} ${LDFLAGS} -o $@ ${XFEROBJ} \
  149.         ${RES} ${COMPLIB} ${LIBS}
  150.  
  151. centerline_named:
  152.     #load -I${INCL} -I${COMPINCL} ${CFLAGS} ${SRCS} \
  153.         version.c ${RES} ${COMPLIB} ${LIBS}
  154.  
  155. centerline_obj:
  156.     #load -I${INCL} -I${COMPINCL} ${CFLAGS} ${OBJS} \
  157.         version.o ${RES} ${COMPLIB} ${LIBS}
  158.  
  159. centerline_xfer:
  160.     #load -DXFER ${CFLAGS} ${XFERSRCS} ${RES} ${COMPLIB} ${LIBS}
  161.  
  162. clean:
  163.     rm -f ${OBJS} ${XFEROBJ} core named named-xfer version.o version.c
  164.     rm -f *~ *.BAK *.CKP
  165.     rm -f tags .depend core named.reload named.restart
  166.     rm -f *.orig
  167.  
  168. depend .depend: ${SRCS} ${XFERSRCS}
  169.     mkdep -I${INCL} -I${COMPINCL} ${SRCS} ${XFERSRCS}
  170.  
  171. install:
  172.     ${INSTALL} -c -s -o bin -g bin -m 555 \
  173.         named ${DESTDIR}${DESTSBIN}/${INDOT}named
  174.     ${INSTALL} -c -s -o bin -g bin -m 555 \
  175.         named-xfer ${DESTDIR}${PATH_XFER}
  176.     ${INSTALL} -c -o bin -g bin -m 555 \
  177.         named.restart ${DESTDIR}${DESTSBIN}/${INDOT}named.restart
  178.     ${INSTALL} -c -o bin -g bin -m 555 \
  179.         named.reload ${DESTDIR}${DESTSBIN}/${INDOT}named.reload
  180.     @echo "*** Install symlinks if needed ***"
  181.  
  182. lint: ${SRCS} ${HDRS} ${XFERSRCS}
  183.     lint -Dlint ${CFLAGS} ${SRCS} ${XFERSRCS}
  184.  
  185. tags: ${SRCS} ${XFERSRCS} Makefile
  186.     ctags -t `echo ${SRCS} ${HDRS} ${XFERSRCS}|tr ' ' '\012'|sort -u`
  187.  
  188. $(SRCS):: $(HDRS)
  189.  
  190. # DO NOT DELETE THIS LINE -- mkdep uses it.
  191. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
  192.