home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / ipsearch-1.0.tar.gz / ipsearch-1.0.tar / ipsearch-1.0 / Makefile.in < prev    next >
Makefile  |  2011-07-06  |  4KB  |  142 lines

  1. #  Copyright (c) 2011
  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 4 2011-07-06 22:22:18Z 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 = @mandir@
  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 = ipsearch
  44. ALL = ${PROG}
  45. CC = @CC@
  46. CCOPT = @V_CCOPT@
  47. INCLS = @V_INCLS@
  48. DEFS = @DEFS@
  49.  
  50. # Standard CFLAGS
  51. CFLAGS = @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 = ipsearch.c _ipsearch.l version.c
  73. LIBOBJS = @LIBOBJS@
  74. LIBSRCS = $(LIBOBJS:.o=.c)
  75. OBJS = ${PROG}.o version.o $(LIBOBJS)
  76.  
  77. TAGHDR =
  78.  
  79. TAGFILES = ${PROG}.l $(TAGHDR)
  80.  
  81. CLEANFILES = $(ALL) $(GENSRC) $(OBJS) $(LIBOBJS) purify $(OBJS:.o=_pure_*.o)
  82.  
  83. all: $(ALL)
  84.  
  85. ipsearch: $(OBJS)
  86.     @rm -f $@
  87.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  88.  
  89. ipsearch.c: _ipsearch.l
  90.  
  91. _ipsearch.l: ipsearch.l makerules ipsearch.txt
  92.     ./makerules ipsearch.l ipsearch.txt > $@
  93.  
  94. ipsearch.c: _ipsearch.l
  95.     $(LEX) $(srcdir)/_ipsearch.l ; rm -f $@ ; mv lex.yy.c $@
  96.  
  97. purify: $(OBJS)
  98.     @rm -f $@
  99.     purify $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  100.  
  101. version.o: version.c
  102. version.c: $(srcdir)/VERSION
  103.     @rm -f $@
  104.     sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
  105.  
  106. install: ipsearch
  107.     $(INSTALL) -m 555 -o bin -g bin ipsearch $(DESTDIR)$(BINDEST)
  108.  
  109. clean: force
  110.     rm -f $(CLEANFILES)
  111.  
  112. distclean: force
  113.     rm -rf $(CLEANFILES) Makefile config.cache config.log config.status \
  114.         gnuc.h os-proto.h autom4te.cache
  115.  
  116. tags: $(TAGFILES)
  117.     ctags -wtd $(TAGFILES)
  118.  
  119. dist tar: force
  120.     @cwd=`pwd` ; name=${PROG}-`cat VERSION` ; \
  121.         list="" ; tar="tar chf" ; temp="$$name.tar.gz" ; \
  122.         for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
  123.         echo \
  124.         "rm -f $$name; ln -s . $$name" ; \
  125.          rm -f $$name; ln -s . $$name ; \
  126.         echo \
  127.         "$$tar - [lots of files] | gzip > $$temp" ; \
  128.          $$tar - $$list | gzip > $$temp ; \
  129.         echo \
  130.         "rm -f $$name" ; \
  131.          rm -f $$name
  132.  
  133. sign:
  134.     @name=${PROG}-`cat VERSION`.tar.gz; \
  135.         set -x; \
  136.         rm -f $${name}.asc; \
  137.         gpg --armor --detach-sign $${name}
  138.  
  139. force: /tmp
  140. depend: $(GENSRC) force
  141.     ./mkdep -c $(CC) $(DEFS) $(INCLS) $(GENSRC) $(LIBSRCS)
  142.