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 / contrib / host / Makefile < prev    next >
Makefile  |  1994-06-21  |  6KB  |  199 lines

  1. #    @(#)Makefile            e07@nikhef.nl (Eric Wassenaar) 940621
  2.  
  3. # ----------------------------------------------------------------------
  4. # Adapt the installation directories to your local standards.
  5. # ----------------------------------------------------------------------
  6.  
  7. # This is where the host executable will go.
  8. DESTBIN = /usr/local/bin
  9.  
  10. # This is where the host manual page will go.
  11. DESTMAN = /usr/local/man
  12.  
  13. BINDIR = $(DESTBIN)
  14. MANDIR = $(DESTMAN)/man1
  15.  
  16. # ----------------------------------------------------------------------
  17. # Special compilation options may be needed only on a few platforms.
  18. # See also the header file port.h for portability issues.
  19. # ----------------------------------------------------------------------
  20.  
  21. #if defined(_AIX)
  22. SYSDEFS = -D_BSD -D_BSD_INCLUDES -U__STR__ -DBIT_ZERO_ON_LEFT
  23. #endif
  24.  
  25. #if defined(ultrix) && You are using the default ultrix <resolv.h>
  26. SYSDEFS = -DULTRIX_RESOLV
  27. #endif
  28.  
  29. #if defined(solaris) && You do not want to use BSD compatibility mode
  30. SYSDEFS = -DSYSV
  31. #endif
  32.  
  33. #if defined(solaris) && You are using its default broken resolver library
  34. SYSDEFS = -DNO_YP_LOOKUP
  35. #endif
  36.  
  37. SYSDEFS =
  38.  
  39. # ----------------------------------------------------------------------
  40. # Configuration definitions.
  41. # ----------------------------------------------------------------------
  42.  
  43. #if defined(BIND_48) && You want to use the default bind res_send()
  44. CONFIGDEFS = -DBIND_RES_SEND
  45. #endif
  46.  
  47. #if defined(BIND_49) && You want to use the special host res_send()
  48. CONFIGDEFS = -DHOST_RES_SEND
  49. #endif
  50.  
  51. # This is the default in either case if you compile stand-alone.
  52. CONFIGDEFS = -DHOST_RES_SEND
  53.  
  54. # ----------------------------------------------------------------------
  55. # Compilation definitions.
  56. # ----------------------------------------------------------------------
  57.  
  58. DEFS = $(CONFIGDEFS) $(SYSDEFS)
  59.  
  60. COPTS =
  61. COPTS = -O
  62.  
  63. CFLAGS = $(COPTS) $(DEFS)
  64.  
  65. # Select your favorite compiler.
  66. CC = cc
  67. CC = /usr/ucb/cc            #if defined(solaris) && BSD
  68. CC = /bin/cc
  69.  
  70. # ----------------------------------------------------------------------
  71. # Linking definitions.
  72. # libresolv.a should contain the resolver library of BIND 4.8.2 or later.
  73. # Link it in only if your default library is different.
  74. # libnet.a contains the getnet...() getserv...() getproto...() calls.
  75. # It is safe to leave it out and use your default library.
  76. # ----------------------------------------------------------------------
  77.  
  78. RES = ../res/libresolv.a
  79. RES = -lresolv
  80.  
  81. COMPLIB =
  82. COMPLIB = -lnet
  83.  
  84. LIBS = -lsocket -lnsl            #if defined(solaris) && not BSD
  85. LIBS =
  86.  
  87. LIBRARIES = $(RES) $(COMPLIB) $(LIBS)
  88.  
  89. LDFLAGS =
  90.  
  91. # ----------------------------------------------------------------------
  92. # Compatibility for compilation via the BIND master Makefile.
  93. # ----------------------------------------------------------------------
  94.  
  95. # redefined by bind
  96. INCL = .
  97. COMPINCL = .
  98. INCS = -I$(INCL) -I$(COMPINCL)
  99.  
  100. # redefined by bind
  101. CDEBUG = $(COPTS) $(CONFIGDEFS)
  102. CDEFS = $(SYSDEFS) $(INCS)
  103. CFLAGS = $(CDEBUG) $(CDEFS)
  104.  
  105. # ----------------------------------------------------------------------
  106. # Miscellaneous definitions.
  107. # ----------------------------------------------------------------------
  108.  
  109. MAKE = make $(MFLAGS)
  110.  
  111. # This assumes the BSD install.
  112. INSTALL = install -c
  113.  
  114. # Grrr
  115. SHELL = /bin/sh
  116.  
  117. # ----------------------------------------------------------------------
  118. # Files.
  119. # ----------------------------------------------------------------------
  120.  
  121. HDRS = port.h exit.h type.h rrec.h defs.h
  122. SRCS = host.c send.c vers.c
  123. OBJS = host.o send.o vers.o
  124. PROG = host
  125. MANS = host.1
  126. DOCS = RELEASE_NOTES
  127.  
  128. FILES = Makefile $(DOCS) $(HDRS) $(SRCS) $(MANS)
  129.  
  130. # ----------------------------------------------------------------------
  131. # Rules for installation.
  132. # ----------------------------------------------------------------------
  133.  
  134. all: $(PROG)
  135.  
  136. $(PROG): $(OBJS)
  137.     $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBRARIES)
  138.  
  139. install: $(PROG)
  140.     $(INSTALL) -m 755 -s $(PROG) $(BINDIR)
  141.  
  142. man: $(MANS)
  143.     $(INSTALL) -m 444 host.1 $(MANDIR)
  144.  
  145. clean:
  146.     rm -f $(PROG) $(OBJS) *.o a.out core host.tar host.tar.Z
  147.  
  148. # ----------------------------------------------------------------------
  149. # host may be called with alternative names, querytype names and "zone".
  150. # A few frequently used abbreviations are handy.
  151. # ----------------------------------------------------------------------
  152.  
  153. ABBREVIATIONS = a ns cname soa wks ptr hinfo mx txt    # standard
  154. ABBREVIATIONS = mb mg mr minfo                # deprecated
  155. ABBREVIATIONS = md mf null                # obsolete
  156. ABBREVIATIONS = rp afsdb x25 isdn rt nsap nsap-ptr    # new
  157. ABBREVIATIONS = uinfo uid gid unspec            # nonstandard
  158. ABBREVIATIONS = maila mailb any                # filters
  159.  
  160. ABBREVIATIONS = mx ns soa zone
  161.  
  162. links:
  163.     for i in $(ABBREVIATIONS) ; do \
  164.         (cd $(BINDIR) ; ln -s $(PROG) $$i) ; \
  165.     done
  166.  
  167. # ----------------------------------------------------------------------
  168. # Rules for maintenance.
  169. # ----------------------------------------------------------------------
  170.  
  171. lint:
  172.     lint $(DEFS) $(SRCS)
  173.  
  174. llint:
  175.     lint $(DEFS) $(SRCS) -lresolv
  176.  
  177. print:
  178.     lpr -J $(PROG) -p Makefile $(DOCS) $(HDRS) $(SRCS)
  179.  
  180. dist:
  181.     tar cf host.tar $(FILES)
  182.     compress host.tar
  183.  
  184. newversion:
  185.     cp -p host.c.dist host.c.old
  186.     cp -p send.c.dist send.c.old
  187.     cp -p host.c      host.c.dist
  188.     cp -p send.c      send.c.dist
  189.     @(echo "enter version" ; read x ; echo $$x >version)
  190.     touch patch.`cat version`
  191.     -diff -c host.c.old host.c >>patch.`cat version`
  192.     -diff -c send.c.old send.c >>patch.`cat version`
  193.  
  194. depend:
  195.     mkdep $(DEFS) $(SRCS)
  196.  
  197. # DO NOT DELETE THIS LINE -- mkdep uses it.
  198. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
  199.