home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / acld-1.11.tar.gz / acld-1.11.tar / acld-1.11 / Makefile.in < prev    next >
Makefile  |  2011-09-27  |  6KB  |  191 lines

  1. #  Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 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 783 2011-09-28 01:23:30Z 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. # Pathname of directory to install the binary
  30. SBINDEST = @sbindir@
  31. # Pathname of directory to install executables that other programs run
  32. LIBEXECDIR = @libexecdir@
  33. # Pathname of directory to install the man page
  34. MANDEST = @mandir@
  35. # The root of the directory tree for read-only
  36. datarootdir = @datarootdir@
  37. # Configuration files
  38. sysconfdir = @sysconfdir@
  39. # Pathname of directory to install the rc.d script
  40. RCDDEST = ${exec_prefix}/etc/rc.d
  41. # /etc/init.d
  42. INITDDIR = /etc/init.d
  43.  
  44. # VPATH
  45. srcdir = @srcdir@
  46. VPATH = @srcdir@
  47.  
  48. #
  49. # You shouldn't need to edit anything below here.
  50. #
  51.  
  52. PROG = acld
  53. ALL = ${PROG} @ACLC@
  54. CC = @CC@
  55. CCOPT = @V_CCOPT@
  56. INCLS = @V_INCLS@
  57. DEFS = @DEFS@
  58.  
  59. # Standard CFLAGS
  60. CFLAGS = @CFLAGS@ @CPPFLAGS@ $(CCOPT) $(DEFS) $(INCLS)
  61.  
  62. # Optional build environment variables
  63. ENVIRONMENT = @V_ENVIRONMENT@
  64. BROCCOLI_VERSION = @BROCCOLI_VERSION@
  65.  
  66. # Standard LDFLAGS
  67. LDFLAGS = @LDFLAGS@
  68.  
  69. # Standard LIBS
  70. LIBS = @LIBS@
  71.  
  72. INSTALL = @INSTALL@
  73.  
  74. INSTALL_START = @INSTALL_START@
  75.  
  76. # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
  77. # Also, gcc does not remove the .o before forking 'as', which can be a
  78. # problem if you don't own the file but can write to the directory.
  79. .c.o:
  80.     @rm -f $@
  81.     $(CC) $(CFLAGS) -c $(srcdir)/$*.c
  82.  
  83. SRCS = acld.c acl.c cf.c child.c client.c io.c util.c route.c \
  84.     server.c setsignal.c stats.c timer.c whitelist.c \
  85.     @CFORCESRCS@ @BRODSRCS@
  86. CSRCS = aclc.c
  87. GENSRC = version.c
  88. LIBOBJS = @LIBOBJS@
  89. LIBSRCS = $(LIBOBJS:.o=.c)
  90. OBJS = $(SRCS:.c=.o) $(LIBOBJS) $(GENSRC:.c=.o)
  91. HDRS = acld.h acl.h cf.h child.h client.h io.h util.h route.h server.h \
  92.     setsignal.h stats.h timer.h util.h whitelist.h @V_LIBHDRS@
  93. COBJS = $(CSRCS:.c=.o) $(LIBOBJS) $(GENSRC:.c=.o)
  94.  
  95. TAGFILES = $(SRCS) $(CSRCS) $(LIBOBJS:.o=.c) $(HDRS)
  96.  
  97. CLEANFILES = $(ALL) $(OBJS) $(COBJS) $(GENSRC) $(LIBOBJS) \
  98.     purify $(OBJS:.o=_pure_*.o)
  99.  
  100. all: $(ALL)
  101.  
  102. acld: $(OBJS)
  103.     @rm -f $@
  104.     $(ENVIRONMENT) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  105.  
  106. aclc: $(COBJS)
  107.     @rm -f $@
  108.     $(ENVIRONMENT) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COBJS) $(LIBS)
  109.  
  110. purify: $(OBJS)
  111.     @rm -f $@
  112.     purify $(CC) $(CFLAGS) $(LDFLAGS) -o purify $(OBJS) $(LIBS)
  113.     #ln -s ln -s /home/cpacket/cForce/bin/cforce_linux.so libcforce_linux.so
  114.     #purify $(CC) $(CFLAGS) $(LDFLAGS) -o purify $(OBJS) -L. -lcforce_linux
  115.  
  116. version.o: version.c
  117. version.c: $(srcdir)/VERSION
  118.     @rm -f $@
  119.     (sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION ; \
  120.     echo 'char broccoli_version[] = "$(BROCCOLI_VERSION)";') > $@
  121.  
  122. install: $(ALL) $(INSTALL_START)
  123.     @for f in $(ALL); do \
  124.         $(INSTALL) -v -m 555 -o bin -g bin $${f} $(DESTDIR)$(SBINDEST); \
  125.         done
  126.     @diff acl.exp $(DESTDIR)$(LIBEXECDIR) >/dev/null 2>&1 || \
  127.         $(INSTALL) -v -m 555 -o bin -g bin acl.exp $(DESTDIR)$(LIBEXECDIR)
  128.     @diff aclcompact.sh $(DESTDIR)$(LIBEXECDIR)/aclcompact >/dev/null 2>&1 || \
  129.         $(INSTALL) -v -m 555 -o bin -g bin aclcompact.sh $(DESTDIR)$(LIBEXECDIR)/aclcompact
  130.     @diff check_acld.py $(DESTDIR)$(LIBEXECDIR)/check_acld >/dev/null 2>&1 || \
  131.         $(INSTALL) -v -m 555 -o bin -g bin check_acld.py $(DESTDIR)$(LIBEXECDIR)/check_acld
  132.     @for f in cisco.expect force10.expect ipfw.expect; do \
  133.         diff $(srcdir)/$${f} $(DESTDIR)$(sysconfdir) >/dev/null 2>&1 || \
  134.             $(INSTALL) -v -m 444 -o bin -g bin $(srcdir)/$${f} $(DESTDIR)$(sysconfdir); \
  135.     done
  136.     @mkdir -pv -m 775 /var/log/acld
  137.     @mkdir -pv -m 775 /var/run/acld
  138.     @for f in $(ALL); do \
  139.         diff $(srcdir)/$${f}.8 $(DESTDIR)$(MANDEST)/man8 >/dev/null 2>&1 || \
  140.             $(INSTALL) -v -m 444 -o bin -g bin $(srcdir)/$${f}.8 $(DESTDIR)$(MANDEST)/man8; \
  141.     done
  142.  
  143. # Startup scripts for /usr/local/etc/rc.d (e.g. FreeBSD)
  144. install-localrcd:
  145.     @for f in acld aclfw; do \
  146.         diff $(srcdir)/$${f}.sh $(DESTDIR)$(RCDDEST)/$${f} >/dev/null 2>&1 || \
  147.             $(INSTALL) -v -m 555 -o bin -g bin $(srcdir)/$${f}.sh $(DESTDIR)$(RCDDEST)/$${f}; \
  148.     done
  149.  
  150. # Startup scripts for update-rc.d (e.g. Ubuntu)
  151. install-updatercd:
  152.     @diff $(srcdir)/$(PROG)-init.d.sh $(INITDDIR)/$(PROG) >/dev/null 2>&1 || \
  153.         $(INSTALL) -v -m 555 -o bin -g bin $(srcdir)/$(PROG)-init.d.sh $(INITDDIR)/$(PROG)
  154.     update-rc.d $(PROG) defaults
  155.  
  156. clean: force
  157.     rm -f $(CLEANFILES)
  158.  
  159. distclean: force
  160.     rm -rf $(CLEANFILES) Makefile config.cache config.log config.status \
  161.         autom4te.cache gnuc.h os-proto.h \
  162.         acl.exp aclcompact.sh acld.sh acld-init.d.sh aclfw.sh check_acld.py
  163.  
  164. tags:    $(TAGFILES)
  165.     ctags -wtd $(TAGFILES)
  166.  
  167. dist tar: force
  168.     @cwd=`pwd` ; name=${PROG}-`cat VERSION` ; \
  169.         list="" ; tar="tar chf" ; temp="$${name}.tar.gz" ; \
  170.         for i in `cat FILES` ; do list="$${list} $${name}/$${i}" ; done; \
  171.         echo \
  172.         "rm -f $${name}.tar.gz.asc $${name}; ln -s . $${name}" ; \
  173.          rm -f $${name}.tar.gz.asc $${name}; ln -s . $${name} ; \
  174.         echo \
  175.         "$${tar} - [lots of files] | gzip > $${temp}" ; \
  176.          $${tar} - $${list} | gzip > $${temp} ; \
  177.         echo \
  178.         "rm -f $${name}" ; \
  179.          rm -f $${name}
  180.  
  181. sign:
  182.     @name=${PROG}-`cat VERSION`.tar.gz; \
  183.         set -x; \
  184.         rm -f $${name}.asc; \
  185.         gpg --armor --detach-sign $${name}
  186.  
  187.  
  188. force:    /tmp
  189. depend:    force $(GENSRC)
  190.     ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRCS) $(GENSRC) $(LIBSRCS)
  191.