4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 DEFAULTFILES
= cron.dfl
28 include ..
/Makefile.cmd
32 ROOTMANIFESTDIR
= $(ROOTSVCSYSTEM
)
33 ROOTMETHOD
= $(ROOTLIBSVCMETHOD
)/svc-cron
35 CPPFLAGS
+= -D_FILE_OFFSET_BITS
=64 -I
$(SRC
)/common
/util
36 CERRWARN
+= -_gcc
=-Wno-parentheses
37 CERRWARN
+= -_gcc
=-Wno-unused-label
38 CERRWARN
+= -_gcc
=-Wno-uninitialized
39 CERRWARN
+= -_gcc
=-Wno-unused-variable
40 CERRWARN
+= -_gcc
=-Wno-unused-value
44 ROOTSPCRON
= $(ROOTVAR
)/spool
/cron
45 ROOTCROND
= $(ROOTETC
)/cron.d
46 ROOTCRONTABS
= $(ROOTSPCRON
)/crontabs
47 ROOTATJOBS
= $(ROOTSPCRON
)/atjobs
48 ROOTLIBCRON
= $(ROOTLIB
)/cron
51 PROG2
= at atq atrm crontab
54 PROG
= $(PROG1
) $(PROG2
)
57 XPG4SCRIPT
= batch.xpg4
59 POFILE
= $(PROG1
)_cmd.po
60 POFILES1
= at.po crontab.po funcs.po batch.po
61 POFILES
= $(POFILES1
) atrm.po
62 $(POFILES1
) := XGETFLAGS
= -a
-x
$(PROG1
).xcl
64 ROOTDIRS
= $(ROOTSPCRON
) $(ROOTCROND
) \
65 $(ROOTCRONTABS
) $(ROOTATJOBS
)
67 ROOTPROG
= $(PROG1
:%=$(ROOTUSRSBIN
)/%) $(PROG2
:%=$(ROOTBIN
)/%) \
68 $(SCRIPT
:%=$(ROOTBIN
)/%) \
69 $(XPG6PROG
:%=$(ROOTXPG6BIN
)/%) \
70 $(XPG4PROG
:%=$(ROOTXPG4BIN
)/%) \
71 $(XPG4SCRIPT
:%.xpg4
=$(ROOTXPG4BIN
)/%)
73 ROOTSYMLINK
= $(ROOTLIBCRON
) $(ROOTETC
)/cron
75 GETRESPSRC
= $(SRC
)/common
/util
/getresponse.c
76 GETRESPOBJ
= getresponse.o
79 COMMONOBJS
= $(COMMONOBJ1
) $(COMMONOBJ2
)
80 CRONOBJS
= cron.o elm.o
81 ATOBJS
= at.o att1.o att2.o
82 XPG4OBJS
= values-xpg4.o
84 ATRMOBJS
= $(ATRMOBJS1
) $(GETRESPOBJ
)
86 CRONTABOBJS1
= crontab.o
87 CRONTABOBJS
= $(CRONTABOBJS1
) $(GETRESPOBJ
)
89 # /usr/xpg*/bin/crontab isn't linked with values-xpg*.o since it isn't
90 # required by any specific behavior differences; this makes these
91 # setuid variants less likely to accidently trip over differences that
92 # could unintentionally open up a security hole.
93 XPG4COMMONOBJS
= $(COMMONOBJS
:%=objs.xpg4
/%)
94 XPG4CTOBJS
= $(CRONTABOBJS
:%=objs.xpg4
/%)
95 XPG4ATOBJS
= $(ATOBJS
:%=objs.xpg4
/%) $(XPG4OBJS
:%=objs.xpg4
/%)
96 XPG6COMMONOBJS
= $(COMMONOBJS
:%=objs.xpg6
/%)
97 XPG6CTOBJS
= $(CRONTABOBJS
:%=objs.xpg6
/%)
99 cron
:= POBJS
= $(CRONOBJS
) $(COMMONOBJ2
)
100 at
:= POBJS
= $(ATOBJS
) $(COMMONOBJS
)
101 at.xpg4
:= POBJS
= $(XPG4ATOBJS
) $(XPG4COMMONOBJS
)
102 atrm
:= POBJS
= $(ATRMOBJS
) $(COMMONOBJS
)
103 atq
:= POBJS
= $(ATQOBJS
) $(COMMONOBJS
)
104 crontab
:= POBJS
= $(CRONTABOBJS
) $(COMMONOBJS
)
105 crontab.xpg4
:= POBJS
= $(XPG4CTOBJS
) $(XPG4COMMONOBJS
)
106 crontab.xpg6
:= POBJS
= $(XPG6CTOBJS
) $(XPG6COMMONOBJS
)
108 CFLAGS
+= $(CCVERBOSE
)
110 NOBJS
= $(CRONOBJS
) $(ATOBJS
) $(ATRMOBJS1
) $(ATQOBJS
) $(CRONTABOBJS1
) \
112 OBJS
= $(NOBJS
) $(XPG4COMMONOBJS
) $(XPG4ATOBJS
) $(XPG4CTOBJS
) \
113 $(XPG6COMMONOBJS
) $(XPG6CTOBJS
) $(GETRESPOBJ
)
115 SRCS
= $(NOBJS
:%.o
=%.c
) $(GETRESPSRC
)
117 CLOBBERFILES
+= $(SCRIPT
) $(XPG4SCRIPT
)
119 $(ROOTLIBCRON
) := SYMLNKDEST
= ..
/..
/etc
/cron.d
120 $(ROOTETC
)/cron
:= SYMLNKDEST
= ..
/usr
/sbin
/cron
122 $(ROOTBIN
)/at
:= FILEMODE
= 04755
123 $(ROOTXPG4BIN
)/at
:= FILEMODE
= 04755
124 $(ROOTBIN
)/atrm
:= FILEMODE
= 04755
125 $(ROOTBIN
)/atq
:= FILEMODE
= 04755
126 $(ROOTBIN
)/crontab
:= FILEMODE
= 04555
127 $(ROOTXPG6BIN
)/crontab
:= FILEMODE
= 04555
128 $(ROOTXPG4BIN
)/crontab
:= FILEMODE
= 04555
129 $(ROOTUSRSBIN
)/cron
:= FILEMODE
= 0555
133 at
:= LDLIBS
+= -lproject
-lsecdb
134 at.xpg4
:= LDLIBS
+= -lproject
-lsecdb
135 atq
:= LDLIBS
+= -lsecdb
136 atrm
:= LDLIBS
+= -lsecdb
137 cron
:= LDLIBS
+= -lpam
-lproject
-lcontract
-lzoneinfo
138 crontab
:= LDLIBS
+= -lsecdb
-lpam
-lzoneinfo
139 crontab.xpg6
:= LDLIBS
+= -lsecdb
-lpam
-lzoneinfo
140 crontab.xpg4
:= LDLIBS
+= -lsecdb
-lpam
-lzoneinfo
142 lint
:= LDLIBS
+= -lproject
-lsecdb
-lcontract
-lpam
144 $(XPG4
) := CFLAGS
+= -DXPG4
145 $(XPG6
) := CFLAGS
+= -DXPG6
149 $(ROOTSVCSYSTEM
)/cron.xml
:= FILEMODE
= 0444
150 $(ROOTLIBSVCMETHOD
)/svc-cron
:= FILEMODE
= 0555
155 all : $(PROG
) $(XPG4
) $(XPG6
) $(SCRIPT
) $(XPG4SCRIPT
) $(FILES
)
157 install : all $(ROOTPROG
) $(ROOTETCDEFAULTFILES
) $(ROOTSYMLINK
) \
158 $(ROOTMANIFEST
) $(ROOTMETHOD
)
161 $(LINK.c
) $(POBJS
) -o
$@
$(LDLIBS
)
164 $(XPG4
) : objs.xpg4
$$(POBJS
)
165 $(LINK.c
) $(POBJS
) -o
$@
$(LDLIBS
)
168 $(XPG6
) : objs.xpg6
$$(POBJS
)
169 $(LINK.c
) $(POBJS
) -o
$@
$(LDLIBS
)
173 $(COMPILE.c
) -o
$@
$<
179 $(COMPILE.c
) -o
$@
$<
184 objs.xpg4
/values-xpg4.o
: ..
/..
/lib
/common
/common
/values-xpg4.c
185 $(COMPILE.c
) -o
$@ ..
/..
/lib
/common
/common
/values-xpg4.c
187 %.o
: $(SRC
)/common
/util
/%.c
188 $(COMPILE.c
) $(OUTPUT_OPTION
) $<
191 objs.xpg4
/%.o
: $(SRC
)/common
/util
/%.c
192 $(COMPILE.c
) -o
$@
$<
195 objs.xpg6
/%.o
: $(SRC
)/common
/util
/%.c
196 $(COMPILE.c
) -o
$@
$<
204 att2.c
: att2.l att2.ed att1.c
206 ed
- lex.yy.c
< att2.ed
207 $(MV
) lex.yy.c att2.c
209 # Don't re-install directories installed by Targetdirs
214 $(RM
) $@
; $(SYMLINK
) $(SYMLNKDEST
) $@
216 check: $(CHKMANIFEST
)
218 $(POFILE
): $(POFILES
)
219 $(RM
) $@
; cat
$(POFILES
) > $@
222 $(RM
) $(OBJS
) att1.h att1.c att2.c
227 $(STRIP
) $(PROG
) $(XPG4
) $(XPG6
)
229 include ..
/Makefile.targ