home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / bind494s.zip / Makefile.OS2 < prev    next >
Makefile  |  1996-09-04  |  9KB  |  246 lines

  1. # Makefile for BIND>=4.9 top level
  2. # vixie@decwrl December, 1992 [original]
  3. #
  4. # $Id: Makefile,v 8.39 1996/08/05 08:31:20 vixie Exp $
  5.  
  6. ## ++Copyright++ 1989
  7. ## -
  8. ## Copyright (c) 1989
  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. VER = 4.9.4-P1
  60. SHELL = /bin/sh
  61. MAKE = make -f Makefile.OS2
  62. DESTDIR =
  63.  
  64. INCL = include
  65. RES = res/libresolv.a
  66. COMPLIB = compat/lib/lib44bsd.a
  67.  
  68. # The default build parameters are given for 4.4 BSD.  They should
  69. # be overridden for other operating systems as indicated below.
  70.  
  71. #(BSD4.4, BSD/OS, FreeBSD, NetBSD, other net2-alikes)
  72. #
  73. # DO NOT COMMENT THESE OUT.  OVERRIDE THEM BELOW.
  74. #
  75. CC = gcc $(CPPFLAGS)
  76. LDFLAGS = -Zmt
  77. LDDFLAGS = -Zmtd -Zcrtdll
  78. CDEBUG = -O2 -Zmt -D__ST_MT__ERRNO
  79. CPPFLAGS= -include /emx/include/sys/types.h -include /emx/include/sys/so_ioctl.h -DSIGIOT=SIGABRT
  80. INDOT =
  81. XFER_INDOT =
  82. # I'm using flex 2.4.5
  83. LEX = flex -I
  84. LIBS = -lsocket -lflex -lsyslog
  85.  
  86. #some OS/2 specific stuff
  87. ETCPATH = /tcpip
  88. TCPIPPATH = /tcpip
  89. MANPATH = /man
  90.  
  91. PIDDIR = ${ETCPATH}/etc
  92. DESTBIN = ${TCPIPPATH}/bin
  93. DESTSBIN = ${TCPIPPATH}/bin
  94. DESTEXEC = ${TCPIPPATH}/bin
  95. DESTMAN = {MANPATH}
  96. #DESTHELP = ${TCPIPPATH}/help
  97. #DESTLIB = /usr/lib
  98. #DESTINC = /usr/include
  99. COMPINCL = compat/include
  100. LDS = 
  101. CATEXT = 0
  102. INSTALL_COMPAT = install
  103. INSTALL = install
  104. RANLIB = ar s
  105. AR = ar cru
  106. MANROFF = ( tbl | nroff -man )
  107. MANDIR = cat
  108. PS = ps
  109. IOT = ABRT
  110. SHCC =
  111. SHLD =
  112.  
  113. ####################################################################
  114. ############ no user servicable parts beyond this point ############
  115. ####################################################################
  116.  
  117. MANARGS = \
  118.     "SHELL=${SHELL}" "INDOT=${INDOT}" "XFER_INDOT=${XFER_INDOT}" \
  119.     "DESTDIR=${DESTDIR}" "DESTMAN=${DESTMAN}" "INSTALL=${INSTALL}" \
  120.     CATEXT='${CATEXT}' MANDIR='${MANDIR}' MANROFF='${MANROFF}'
  121.  
  122. MARGS =    "VER=${VER}" "CC=${CC}" "CDEBUG=${CDEBUG}" "LIBS=${LIBS}" \
  123.     "INCL=../${INCL}" "RES=../${RES}" "LEX=${LEX}" "LDFLAGS=${LDFLAGS}" "LDDFLAGS=${LDDFLAGS}"\
  124.     "PIDDIR=${PIDDIR}" "DESTBIN=${DESTBIN}" "DESTSBIN=${DESTSBIN}" \
  125.     "DESTEXEC=${DESTEXEC}" "COMPINCL=../${COMPINCL}" \
  126.     "COMPLIB=../${COMPLIB}" "DESTLIB=${DESTLIB}" "DESTINC=${DESTINC}" \
  127.     "DESTHELP=${DESTHELP}" "PIC=${PIC}" "SHCC=${SHCC}" "SHLD=${SHLD}" \
  128.     "AR=${AR}" "RANLIB=${RANLIB}" "LDS=${LDS}" 'ARPREF=${ARPREF}' \
  129.     'ARSUFF=${ARSUFF}' $(MANARGS) PS="${PS}" "IOT=${IOT}" \
  130.     "CPPFLAGS=${CPPFLAGS}"
  131.  
  132. MACHINE = native
  133. DST = $(MACHINE).b
  134. SRC = ..
  135.  
  136. # removed man (so manuals are not built)
  137. SUBDIRS = res $(SHRES) include compat named tools
  138.  
  139. all:: FRC
  140.  
  141. all clean depend:: FRC
  142.     @for x in $(SUBDIRS); do \
  143.         (cd $$x; pwd; $(MAKE) $(MARGS) $@); \
  144.     done
  145.  
  146. $(SUBDIRS):: FRC
  147.     @for x in $@; do \
  148.         (cd $$x; pwd; $(MAKE) $(MARGS) all); \
  149.     done
  150.  
  151. clean:: FRC
  152.     -test -d doc/bog && (cd doc/bog; pwd; $(MAKE) $(MARGS) $@)
  153.     (cd conf; rm -f *~ *.CKP *.BAK *.orig)
  154.     rm -f *~ *.CKP *.BAK *.orig
  155.  
  156. depend:: FRC
  157.  
  158. mkdirs: FRC
  159.     -set +e; for x in $(DESTBIN) $(DESTSBIN) $(DESTEXEC) \
  160.           $(DESTMAN) $(DESTHELP) $(DESTLIB) $(DESTINC); do \
  161.         test -d $$x || mkdir -p $$x; \
  162.     done
  163.  
  164. install: FRC
  165.     @for x in $(SUBDIRS); do \
  166.         y=`if [ "X$$x" = "Xcompat" ]; \
  167.             then echo ${INSTALL_COMPAT}; \
  168.             else echo install; \
  169.            fi`; \
  170.         (cd $$x; pwd; $(MAKE) $(MARGS) $$y); \
  171.     done
  172.  
  173. D = OPTIONS master bin doc named CHANGES README compat include res \
  174.     Makefile TODO conf man tools 
  175.  
  176. copyright: FRC
  177.     bin/copyright <conf/copyright `find ${D} -type f ! -name '*,v' -print`
  178.  
  179. tar: FRC
  180.     ( cd doc/bog; make file.psf file.lst )
  181.     find * '(' -name RCS -o -name obj -o -name .depend ')' \
  182.         -print >/tmp/bindXf
  183.     gnutar -c -z -f ../bind-${VER}.tar.gz           -X /tmp/bindXf .
  184.     rm -f /tmp/bindXf
  185.  
  186. links: $(DST)
  187.  
  188. $(DST): FRC
  189.     @set -ex; mkdir $(DST); cd $(DST); \
  190.     ln -s $(SRC) SRC; \
  191.     cp SRC/Makefile .; chmod +w Makefile; \
  192.     ( mkdir include; cd include; ln -s ../SRC/include SRC; \
  193.       cp SRC/Makefile .; chmod +w Makefile; \
  194.       ln -s SRC/*.h SRC/arpa .; \
  195.     ); \
  196.     ( mkdir conf; cd conf; ln -s ../SRC/conf SRC; \
  197.       ln -s SRC/*.h .; \
  198.     ); \
  199.     ( mkdir tools; cd tools; ln -s ../SRC/tools SRC; \
  200.       ln -s SRC/*.[ch] .; \
  201.       cp SRC/Makefile .; chmod +w Makefile; \
  202.       ( mkdir nslookup; cd nslookup; ln -s ../SRC/nslookup SRC; \
  203.         cp SRC/Makefile .; chmod +w Makefile; \
  204.         ln -s SRC/[a-z]* .; \
  205.       ); \
  206.     ); \
  207.     ( mkdir res; cd res; ln -s ../SRC/res SRC; \
  208.       cp SRC/Makefile .; chmod +w Makefile; \
  209.       ln -s SRC/*.[ch] .; \
  210.     ); \
  211.     ( mkdir compat; cd compat; ln -s ../SRC/compat SRC; \
  212.       cp SRC/Makefile .; chmod +w Makefile; \
  213.       ln -s SRC/include .; \
  214.       ( mkdir lib; cd lib; ln -s ../SRC/lib SRC; \
  215.         cp SRC/Makefile .; chmod +w Makefile; \
  216.         ln -s SRC/*.c .; \
  217.       ); \
  218.     ); \
  219.     ( mkdir named; cd named; ln -s ../SRC/named SRC; \
  220.       cp SRC/Makefile .; chmod +w Makefile; \
  221.       ln -s SRC/*.[ch] SRC/*.sh .; \
  222.     ); \
  223.     ( mkdir shres; cd shres; ln -s ../SRC/shres SRC; \
  224.       ( mkdir sunos; cd sunos; ln -s ../../SRC/shres/sunos SRC; \
  225.         cp SRC/Makefile .; chmod +w Makefile; \
  226.         ln -s SRC/makeshlib SRC/*.patch* .; \
  227.       ); \
  228.       ( mkdir netbsd; cd netbsd; ln -s ../../SRC/shres/netbsd SRC; \
  229.         cp SRC/Makefile .; chmod +w Makefile; \
  230.         ln -s SRC/makeshlib SRC/lorder-sparc.sed SRC/shlibname.awk .; \
  231.       ); \
  232.       ( mkdir solaris; cd solaris; ln -s ../../SRC/shres/solaris SRC; \
  233.         cp SRC/Makefile .; chmod +w Makefile; \
  234.       ); \
  235.     ); \
  236.     ( mkdir man; cd man; ln -s ../SRC/man SRC; \
  237.       cp SRC/Makefile .; chmod +w Makefile; \
  238.       ln -s SRC/*.[0-9] .; \
  239.     )
  240.  
  241. gcc2-lint: FRC
  242.     @-make CC="gcc2 -Wall -Wno-comment -Wno-parentheses -Dlint" all \
  243.         2>&1 | grep '\.[ch]:[0-9]'
  244.  
  245. FRC:
  246.