xref: /freebsd/usr.sbin/cron/doc/Makefile.vixie (revision c1839039b193b48c8eb7520c75487f0bd4340c3b)
1#/* Copyright 1988,1990,1993,1994 by Paul Vixie
2# * All rights reserved
3# */
4
5## Copyright (c) 1997 by Internet Software Consortium.
6##
7## Permission to use, copy, modify, and distribute this software for any
8## purpose with or without fee is hereby granted, provided that the above
9## copyright notice and this permission notice appear in all copies.
10##
11## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
12## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
13## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
14## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
16## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
17## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
18## SOFTWARE.
19
20# Makefile for vixie's cron
21#
22# $Id: Makefile,v 1.2 1998/08/14 00:32:35 vixie Exp $
23#
24# vix 03mar88 [moved to RCS, rest of log is in there]
25# vix 30mar87 [goodbye, time.c; hello, getopt]
26# vix 12feb87 [cleanup for distribution]
27# vix 30dec86 [written]
28
29# NOTES:
30#	'make' can be done by anyone
31#	'make install' must be done by root
32#
33#	this package needs getopt(3), bitstring(3), and BSD install(8).
34#
35#	the configurable stuff in this makefile consists of compilation
36#	options (use -O, cron runs forever) and destination directories.
37#	SHELL is for the 'augumented make' systems where 'make' imports
38#	SHELL from the environment and then uses it to run its commands.
39#	if your environment SHELL variable is /bin/csh, make goes real
40#	slow and sometimes does the wrong thing.
41#
42#	this package needs the 'bitstring macros' library, which is
43#	available from me or from the comp.sources.unix archive.  if you
44#	put 'bitstring.h' in a non-standard place (i.e., not intuited by
45#	cc(1)), you will have to define INCLUDE to set the include
46#	directory for cc.  INCLUDE should be `-Isomethingorother'.
47#
48#	there's more configuration info in config.h; edit that first!
49
50#################################### begin configurable stuff
51#<<DESTROOT is assumed to have ./etc, ./bin, and ./man subdirectories>>
52DESTROOT	=	$(DESTDIR)/usr
53DESTSBIN	=	$(DESTROOT)/sbin
54DESTBIN		=	$(DESTROOT)/bin
55DESTMAN		=	$(DESTROOT)/share/man
56#<<need bitstring.h>>
57INCLUDE		=	-I.
58#INCLUDE	=
59#<<need getopt()>>
60LIBS		=
61#<<optimize or debug?>>
62#CDEBUG		=	-O
63CDEBUG		=	-g
64#<<lint flags of choice?>>
65LINTFLAGS	=	-hbxa $(INCLUDE) $(DEBUGGING)
66#<<want to use a nonstandard CC?>>
67CC		=	gcc -Wall -Wno-unused -Wno-comment
68#<<manifest defines>>
69DEFS		=
70#(SGI IRIX systems need this)
71#DEFS		=	-D_BSD_SIGNALS -Dconst=
72#<<the name of the BSD-like install program>>
73#INSTALL = installbsd
74INSTALL = install
75#<<any special load flags>>
76LDFLAGS		=
77#################################### end configurable stuff
78
79SHELL		=	/bin/sh
80CFLAGS		=	$(CDEBUG) $(INCLUDE) $(DEFS)
81
82INFOS		=	README CHANGES FEATURES INSTALL CONVERSION THANKS MAIL
83MANPAGES	=	bitstring.3 crontab.5 crontab.1 cron.8 putman.sh
84HEADERS		=	bitstring.h cron.h config.h pathnames.h externs.h
85SOURCES		=	cron.c crontab.c database.c do_command.c entry.c \
86			env.c job.c user.c popen.c misc.c
87SHAR_SOURCE	=	$(INFOS) $(MANPAGES) Makefile $(HEADERS) $(SOURCES)
88LINT_CRON	=	cron.c database.c user.c entry.c \
89			misc.c job.c do_command.c env.c popen.c
90LINT_CRONTAB	=	crontab.c misc.c entry.c env.c
91CRON_OBJ	=	cron.o database.o user.o entry.o job.o do_command.o \
92			misc.o env.o popen.o
93CRONTAB_OBJ	=	crontab.o misc.o entry.o env.o
94
95all		:	cron crontab
96
97lint		:
98			lint $(LINTFLAGS) $(LINT_CRON) $(LIBS) \
99			|grep -v "constant argument to NOT" 2>&1
100			lint $(LINTFLAGS) $(LINT_CRONTAB) $(LIBS) \
101			|grep -v "constant argument to NOT" 2>&1
102
103cron		:	$(CRON_OBJ)
104			$(CC) $(LDFLAGS) -o cron $(CRON_OBJ) $(LIBS)
105
106crontab		:	$(CRONTAB_OBJ)
107			$(CC) $(LDFLAGS) -o crontab $(CRONTAB_OBJ) $(LIBS)
108
109install		:	all
110			$(INSTALL) -c -m  111 -o root -s cron    $(DESTSBIN)/
111			$(INSTALL) -c -m 4111 -o root -s crontab $(DESTBIN)/
112			sh putman.sh crontab.1 $(DESTMAN)
113			sh putman.sh cron.8    $(DESTMAN)
114			sh putman.sh crontab.5 $(DESTMAN)
115
116clean		:;	rm -f *.o cron crontab a.out core tags *~ #*
117
118tags		:;	ctags ${SOURCES}
119
120kit		:	$(SHAR_SOURCE)
121			makekit -m -s99k $(SHAR_SOURCE)
122
123$(CRON_OBJ)	:	cron.h config.h externs.h pathnames.h Makefile
124$(CRONTAB_OBJ)	:	cron.h config.h externs.h pathnames.h Makefile
125