home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / hf-1.2.tar.gz / hf-1.2.tar / hf-1.2 / Makefile.in < prev    next >
Makefile  |  2009-12-13  |  5KB  |  168 lines

  1. #  Copyright (c) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2008, 2009
  2. #     The Regents of the University of California.  All rights reserved.
  3. #
  4. #  Redistribution and use in source and binary forms, with or without
  5. #  modification, are permitted provided that: (1) source code distributions
  6. #  retain the above copyright notice and this paragraph in its entirety, (2)
  7. #  distributions including binary code include the above copyright notice and
  8. #  this paragraph in its entirety in the documentation or other materials
  9. #  provided with the distribution, and (3) all advertising materials mentioning
  10. #  features or use of this software display the following acknowledgement:
  11. #  ``This product includes software developed by the University of California,
  12. #  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  13. #  the University nor the names of its contributors may be used to endorse
  14. #  or promote products derived from this software without specific prior
  15. #  written permission.
  16. #  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  17. #  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  18. #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19. #
  20. # @(#) $Id: Makefile.in 179 2009-12-13 07:23:09Z leres $ (LBL)
  21.  
  22. #
  23. # Various configurable paths (remember to edit Makefile.in, not Makefile)
  24. #
  25.  
  26. # Top level hierarchy
  27. prefix = @prefix@
  28. exec_prefix = @exec_prefix@
  29. datarootdir = @datarootdir@
  30. # Pathname of directory to install the binary
  31. BINDEST = @bindir@
  32. # Pathname of directory to install the man page
  33. MANDEST = @prefix@/man
  34.  
  35. # VPATH
  36. srcdir = @srcdir@
  37. VPATH = @srcdir@
  38.  
  39. #
  40. # You shouldn't need to edit anything below here.
  41. #
  42.  
  43. PROG = hf
  44. ALL = ${PROG} ef nf pf
  45. CC = @CC@
  46. CCOPT = @V_CCOPT@
  47. INCLS = @V_INCLS@
  48. DEFS = @DEFS@
  49.  
  50. # Standard CFLAGS
  51. CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
  52.  
  53. # Standard LDFLAGS
  54. LDFLAGS = @LDFLAGS@
  55.  
  56. # Standard LIBS
  57. LIBS = @LIBS@
  58.  
  59. INSTALL = @INSTALL@
  60. LEX = @V_LEX@
  61.  
  62. # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
  63. # Also, gcc does not remove the .o before forking 'as', which can be a
  64. # problem if you don't own the file but can write to the directory.
  65. .c.o:
  66.     @rm -f $@
  67.     $(CC) $(CFLAGS) -c $(srcdir)/$*.c
  68.  
  69. .l.c:
  70.     $(LEX) $(srcdir)/$*.l ; rm -f $@ ; mv lex.yy.c $@
  71.  
  72. GENSRC = hf.c ef.c nf.c pf.c version.c
  73. LIBOBJS = @LIBOBJS@
  74. LIBSRCS = $(LIBOBJS:.o=.c)
  75. ASYNC_LIBS = @V_ASYNC_LIBS@
  76. ASYNC_OBJS = @V_ASYNC_OBJS@
  77. ASYNC_SRCS = $(ASYNC_OBJS:.o=.c)
  78. OBJS = hf.o setsignal.o version.o $(LIBOBJS)
  79.  
  80. TAGHDR = \
  81.     /usr/include/arpa/nameser.h \
  82.     /usr/include/resolv.h \
  83.     /usr/include/netdb.h
  84.  
  85. TAGFILES = hf.l nb_dns.c nb_dns.h $(TAGHDR)
  86.  
  87. CLEANFILES = $(ALL) $(GENSRC) $(OBJS) $(LIBOBJS) $(ASYNC_OBJS) \
  88.     purify $(OBJS:.o=_pure_*.o)
  89.  
  90. all: $(ALL)
  91.  
  92. hf: $(OBJS) $(ASYNC_OBJS)
  93.     @rm -f $@
  94.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(ASYNC_OBJS) $(ASYNC_LIBS) $(LIBS)
  95.  
  96. hf.c: hf.l
  97.  
  98. purify: $(OBJS)
  99.     @rm -f $@
  100.     purify $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(ASYNC_OBJS) $(ASYNC_LIBS) $(LIBS)
  101.  
  102. version.o: version.c
  103. version.c: $(srcdir)/VERSION
  104.     @rm -f $@
  105.     sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
  106.  
  107. ef: ef.c $(LIBOBJS)
  108.     @rm -f $@
  109.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBOBJS) $(LIBS)
  110.  
  111. nf: nf.c $(LIBOBJS)
  112.     @rm -f $@
  113.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBOBJS) $(ASYNC_LIBS) $(LIBS)
  114.  
  115. pf: pf.c $(LIBOBJS)
  116.     @rm -f $@
  117.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBOBJS) $(LIBS)
  118.  
  119. install: install-hf install-ef install-nf install-pf
  120.  
  121. install-hf: hf
  122.     $(INSTALL) -m 555 -o bin -g bin hf $(DESTDIR)$(BINDEST)
  123.     @diff $(srcdir)/hf.1 $(DESTDIR)$(MANDEST)/man1 >/dev/null 2>&1 || \
  124.         $(INSTALL) -v -m 444 -o bin -g bin $(srcdir)/hf.1 $(DESTDIR)$(MANDEST)/man1
  125.  
  126. install-ef: ef
  127.     $(INSTALL) -m 555 -o bin -g bin ef $(DESTDIR)$(BINDEST)
  128.  
  129. install-nf: nf
  130.     $(INSTALL) -m 555 -o bin -g bin nf $(DESTDIR)$(BINDEST)
  131.  
  132. install-pf: pf
  133.     $(INSTALL) -m 555 -o bin -g bin pf $(DESTDIR)$(BINDEST)
  134.  
  135. clean: force
  136.     rm -f $(CLEANFILES)
  137.  
  138. distclean: force
  139.     rm -rf $(CLEANFILES) Makefile config.cache config.log config.status \
  140.         gnuc.h os-proto.h autom4te.cache
  141.  
  142. tags: $(TAGFILES)
  143.     ctags -wtd $(TAGFILES)
  144.  
  145. dist tar: force
  146.     @cwd=`pwd` ; name=${PROG}-`cat VERSION` ; \
  147.         list="" ; tar="tar chf" ; temp="$$name.tar.gz" ; \
  148.         for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
  149.         echo \
  150.         "rm -f $$name; ln -s . $$name" ; \
  151.          rm -f $$name; ln -s . $$name ; \
  152.         echo \
  153.         "$$tar - [lots of files] | gzip > $$temp" ; \
  154.          $$tar - $$list | gzip > $$temp ; \
  155.         echo \
  156.         "rm -f $$name" ; \
  157.          rm -f $$name
  158.  
  159. sign:
  160.     @name=${PROG}-`cat VERSION`.tar.gz; \
  161.         set -x; \
  162.         rm -f $${name}.asc; \
  163.         gpg --armor --detach-sign $${name}
  164.  
  165. force: /tmp
  166. depend: $(GENSRC) force
  167.     ./mkdep -c $(CC) $(DEFS) $(INCLS) $(GENSRC) $(LIBSRCS) $(ASYNC_SRCS) setsignal.c
  168.