home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / CronVixie2.1 / Makefile < prev    next >
Makefile  |  1992-01-14  |  5KB  |  125 lines

  1. # Makefile for vixie's cron
  2. #
  3. # $Header: /private/Net/beauty/src/vixie-cron-2.1/RCS/Makefile,v 2.3 91/05/29 11:36:11 vixie Exp Locker: irving $
  4. #
  5. # vix 03mar88 [moved to RCS, rest of log is in there]
  6. # vix 30mar87 [goodbye, time.c; hello, getopt]
  7. # vix 12feb87 [cleanup for distribution]
  8. # vix 30dec86 [written]
  9.  
  10. #/* Copyright 1988,1990 by Paul Vixie
  11. # * All rights reserved
  12. # *
  13. # * Distribute freely, except: don't remove my name from the source or
  14. # * documentation (don't take credit for my work), mark your changes (don't
  15. # * get me blamed for your possible bugs), don't alter or remove this
  16. # * notice.  May be sold if buildable source is provided to buyer.  No
  17. # * warrantee of any kind, express or implied, is included with this
  18. # * software; use at your own risk, responsibility for damages (if any) to
  19. # * anyone resulting from the use of this software rests entirely with the
  20. # * user.
  21. # *
  22. # * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
  23. # * I'll try to keep a version up to date.  I can be reached as follows:
  24. # * Paul Vixie, 329 Noe Street, San Francisco, CA, 94114, (415) 864-7013,
  25. # * paul@vixie.sf.ca.us || {hoptoad,pacbell,decwrl,crash}!vixie!paul
  26. # */
  27.  
  28. # NOTES:
  29. #    'make' can be done by anyone
  30. #    'make install' must be done by root
  31. #
  32. #    this package needs getopt(3), bitstring(3), and BSD install(8).
  33. #
  34. #    the configurable stuff in this makefile consists of compilation
  35. #    options (use -O, cron runs forever) and destination directories.
  36. #    SHELL is for the 'augumented make' systems where 'make' imports
  37. #    SHELL from the environment and then uses it to run its commands.
  38. #    if your environment SHELL variable is /bin/csh, make goes real
  39. #    slow and sometimes does the wrong thing.  BINDIR is where the
  40. #    'crontab' command goes, and should be a common place like /usr/bin.
  41. #    LIBDIR is where the cron daemon lives; /usr/etc is common.
  42. #
  43. #    this package needs the 'bitstring macros' library, which is
  44. #    available from me or from the comp.sources.unix archive.  if you
  45. #    put 'bitstring.h' in a non-standard place (i.e., not intuited by
  46. #    cc(1)), you will have to define INCLUDE to set the include
  47. #    directory for cc.  INCLUDE should be `-Isomethingorother'.
  48. #
  49. #    there's more configuration info in config.h; edit that first!
  50.  
  51. #################################### begin configurable stuff
  52. #<<DESTROOT is assumed to have ./etc, ./bin, and ./man subdirectories>>
  53. DESTROOT    =    $(DESTDIR)/usr/local
  54. #<<CRONDIR will be created by crond or crontab if nec'y>>
  55. CRONDIR        =    /var/cron
  56. #<<need bitstring.h>>
  57. INCLUDE        =    -I.
  58. #INCLUDE    =
  59. #<<need getopt()>>
  60. #LIBS        =    /usr/local/lib/getopt.o
  61. LIBS        =
  62. #<<optimize or debug?>>
  63. OPTIM        =    -O
  64. #OPTIM        =    -g
  65. #<<want -x flag for debugging?>>
  66. DEBUGGING    =    -DDEBUGGING=1
  67. #DEBUGGING    =    -DDEBUGGING=0
  68. #<<ATT or BSD?>>
  69. # (ATT untested)
  70. #COMPAT        =    -DATT
  71. #COMPAT        =    -DBSD
  72. COMPAT        =    -DBSD -bsd
  73. #<<lint flags of choice?>>
  74. LINTFLAGS    =    -hbxa $(INCLUDE) $(COMPAT) $(DEBUGGING)
  75. #<<want to use a nonstandard CC?>>
  76. #CC        =    vcc
  77. #<<manifest defines>>
  78. DEFS        =    '-DCRONDIR="$(CRONDIR)"'
  79. #################################### end configurable stuff
  80.  
  81. SHELL        =    /bin/sh
  82. CFLAGS        =    $(OPTIM) $(INCLUDE) $(COMPAT) $(DEBUGGING) $(DEFS)
  83.  
  84. INFOS        =    README CHANGES.V2 FEATURES INSTALL CONVERSION THANKS
  85. MANPAGES    =    bitstring.3 crontab.5 crontab.1 crond.8
  86. HEADERS        =    bitstring.h cron.h config.h
  87. SOURCES        =    crond.c crontab.c database.c do_command.c \
  88.             entry.c env.c job.c misc.c user.c
  89. SHAR_SOURCE    =    $(INFOS) $(MANPAGES) Makefile $(HEADERS) $(SOURCES)
  90. LINT_CROND    =    crond.c database.c user.c entry.c \
  91.             misc.c job.c do_command.c env.c
  92. LINT_CRONTAB    =    crontab.c misc.c entry.c env.c
  93. CRON_OBJ    =    crond.o database.o user.o entry.o \
  94.             misc.o job.o do_command.o env.o
  95. CRONTAB_OBJ    =    crontab.o misc.o entry.o env.o
  96.  
  97. all        :    crond crontab
  98.  
  99. lint        :
  100.             lint $(LINTFLAGS) $(LINT_CROND) $(LIBS) \
  101.             |grep -v "constant argument to NOT" 2>&1
  102.             lint $(LINTFLAGS) $(LINT_CRONTAB) $(LIBS) \
  103.             |grep -v "constant argument to NOT" 2>&1
  104.  
  105. crond        :    $(CRON_OBJ)
  106.             $(CC) -o crond $(CRON_OBJ) $(LIBS)
  107.  
  108. crontab        :    $(CRONTAB_OBJ)
  109.             $(CC) -o crontab $(CRONTAB_OBJ) $(LIBS)
  110.  
  111. install        :    all
  112.             install -c -m 111 -o root -s crond $(DESTROOT)/etc/
  113.             install -c -m 4111 -o root -s crontab $(DESTROOT)/bin/
  114.             install -c crontab.1 $(DESTROOT)/man/man1/crontab.1
  115.             install -c crond.8   $(DESTROOT)/man/man8/crond.8
  116.             install -c crontab.5 $(DESTROOT)/man/man5/crontab.5
  117.  
  118. clean        :;    rm -f *.o crond crontab a.out core tags *~ #*
  119.  
  120. kit        :    $(SHAR_SOURCE)
  121.             makekit -m -s50k $(SHAR_SOURCE)
  122.  
  123. $(CRON_OBJ)    :    cron.h config.h Makefile
  124. $(CRONTAB_OBJ)    :    cron.h config.h Makefile
  125.