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 / tools / Makefile < prev    next >
Makefile  |  1994-06-26  |  6KB  |  169 lines

  1. #
  2. #    @(#)Makefile    4.9 (Berkeley) 10/10/88
  3. #    $Id: Makefile,v 4.9.1.8 1994/06/26 04:00:21 vixie Exp $
  4. #
  5.  
  6. ## ++Copyright++ 1987
  7. ## -
  8. ## Copyright (c) 1987
  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. DESTDIR=
  60. CC= cc
  61. SHELL= /bin/sh
  62. MAKE= make
  63.  
  64. CDEBUG= -g
  65.  
  66. INCL =  ../include
  67. RES=    ../res/libresolv.a
  68. COMPLIB= ../compat/lib/lib44bsd.a
  69.  
  70. LEX=    lex
  71. LIBS=    -ll
  72. PIDDIR = /etc
  73. DESTBIN = /usr/bin
  74. DESTSBIN = /usr/etc
  75. DESTEXEC = /usr/etc
  76. DESTMAN = /usr/man
  77. COMPINCL = ../compat/include
  78. DESTHELP= /usr/lib
  79.  
  80. #(net2 and its descendents)
  81. #LEX = lex -I
  82. #LIBS = -ll -lutil
  83. #PIDDIR = /var/run
  84. #DESTBIN = /usr/bin
  85. #DESTSBIN = /usr/sbin
  86. #DESTEXEC = /usr/libexec
  87. #DESTMAN = /usr/share/man
  88. #COMPINCL = .
  89. #DESTHELP= /usr/share/misc
  90.  
  91. LDFLAGS=
  92. MARGS =    "CC=$(CC)" "LEX=$(LEX)" "CDEBUG=$(CDEBUG)" "SHELL=$(SHELL)" \
  93.     "INCL=../$(INCL)" "RES=../$(RES)" "LIBS=$(LIBS)" "LDFLAGS=$(LDFLAGS)" \
  94.     "DESTDIR=$(DESTDIR)" "PIDDIR=${PIDDIR}" "DESTMAN=${DESTMAN}" \
  95.     "DESTBIN=${DESTBIN}" "DESTSBIN=${DESTSBIN}" "DESTEXEC=${DESTEXEC}" \
  96.     "COMPINCL=../${COMPINCL}" "DESTHELP=${DESTHELP}" \
  97.     "COMPLIB=../${COMPLIB}" "INSTALL=${INSTALL}"
  98.  
  99. CFLAGS=    $(CDEBUG) -I$(INCL) -I$(COMPINCL)
  100. SRCS=    nsquery.c nstest.c host.c dig.c dnsquery.c
  101. NSQUERY_O= nsquery.o
  102. NSTEST_O= nstest.o
  103. HOST_O=    host.o
  104. DIG_O=    dig.o nslookup/list.o nslookup/subr.o nslookup/debug.o nslookup/send.o
  105. DNSQUERY_O= dnsquery.o
  106.  
  107. SUBDIRS = nslookup 
  108. BINARIES = nsquery nstest host dig dnsquery
  109.  
  110. all: ${SUBDIRS} ${BINARIES}
  111.  
  112. nsquery: ${NSQUERY_O} ${RES} ${COMPLIB} Makefile
  113.     ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${NSQUERY_O} \
  114.         ${RES} ${COMPLIB} ${LIBS}
  115.  
  116. # test programs and utilities
  117. nstest: ${NSTEST_O} ${RES} ${COMPLIB} Makefile
  118.     ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${NSTEST_O} \
  119.         ${RES} ${COMPLIB} ${LIBS}
  120.  
  121. host: ${HOST_O} ${RES} ${COMPLIB} Makefile
  122.     ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${HOST_O} \
  123.         ${RES} ${COMPLIB} ${LIBS}
  124.  
  125. dig: ${DIG_O} ${RES} ${COMPLIB} Makefile
  126.     ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${DIG_O} \
  127.         ${RES} ${COMPLIB} ${LIBS}
  128.  
  129. dnsquery: ${DNSQUERY_O} ${RES} ${COMPLIB} Makefile
  130.     ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${DNSQUERY_O} \
  131.         ${RES} ${COMPLIB} ${LIBS}
  132.  
  133. ${SUBDIRS}: FRC
  134.     cd $@; make ${MARGS}
  135.  
  136. clean: FRC
  137.     @for x in ${SUBDIRS}; do \
  138.         (cd $$x; pwd; make ${MARGS} clean); \
  139.     done
  140.     rm -f ${BINARIES} core
  141.     rm -f *.BAK *.CKP *~ *.o *.orig
  142.  
  143. depend: ${SRCS}
  144.     @for x in ${SUBDIRS}; do \
  145.         (cd $$x; pwd; make ${MARGS} depend); \
  146.     done
  147.     mkdep -p -I${INCL} -I${COMPINCL} ${SRCS}
  148.  
  149. install: FRC
  150.     @for x in ${SUBDIRS}; do \
  151.         (cd $$x; pwd; make ${MARGS} DESTDIR=${DESTDIR} install); \
  152.     done
  153.     @set -x; for x in ${BINARIES}; do \
  154.         ${INSTALL} -s -c -m 755 $$x ${DESTDIR}${DESTBIN}/$$x; \
  155.     done
  156.  
  157. lint: ${SRCS}
  158.     @(cd nslookup; pwd; make ${MARGS} lint)
  159.     lint ${CFLAGS} ${SRCS}
  160.  
  161. tags: ${SRCS}
  162.     cd nslookup; make ${MARGS} tags
  163.     ctags ${SRCS}
  164.  
  165. FRC:
  166.  
  167. # DO NOT DELETE THIS LINE -- mkdep uses it.
  168. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
  169.