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.
25 # Copyright (c) 2018, Joyent, Inc.
27 DEFAULTFILES
= cron.dfl
29 include ..
/Makefile.cmd
33 ROOTMANIFESTDIR
= $(ROOTSVCSYSTEM
)
34 ROOTMETHOD
= $(ROOTLIBSVCMETHOD
)/svc-cron
36 CPPFLAGS
+= -I
$(SRC
)/common
/util
37 CERRWARN
+= -Wno-parentheses
38 CERRWARN
+= -Wno-unused-label
39 CERRWARN
+= -Wno-uninitialized
40 CERRWARN
+= -Wno-unused-variable
41 CERRWARN
+= -Wno-unused-value
50 ROOTSPCRON
= $(ROOTVAR
)/spool
/cron
51 ROOTCROND
= $(ROOTETC
)/cron.d
52 ROOTCRONTABS
= $(ROOTSPCRON
)/crontabs
53 ROOTATJOBS
= $(ROOTSPCRON
)/atjobs
54 ROOTLIBCRON
= $(ROOTLIB
)/cron
57 PROG2
= at atq atrm crontab
58 PROG
= $(PROG1
) $(PROG2
)
62 POFILE
= $(PROG1
)_cmd.po
63 POFILES1
= at_cmd.po crontab.po funcs.po batch.po
64 POFILES
= $(POFILES1
) atrm.po
65 $(POFILES1
) := XGETFLAGS
= -a
-x
$(PROG1
).xcl
67 ROOTDIRS
= $(ROOTSPCRON
) $(ROOTCROND
) \
68 $(ROOTCRONTABS
) $(ROOTATJOBS
)
70 ROOTPROG
= $(PROG1
:%=$(ROOTUSRSBIN
)/%) $(PROG2
:%=$(ROOTBIN
)/%) \
71 $(SCRIPT
:%=$(ROOTBIN
)/%)
73 ROOTSYMLINK
= $(ROOTLIBCRON
)
75 GETRESPSRC
= $(SRC
)/common
/util
/getresponse.c
76 GETRESPOBJ
= getresponse.o
79 COMMONOBJS
= $(COMMONOBJ1
) $(COMMONOBJ2
)
80 CRONOBJS
= cron.o elm.o
81 ATOBJS
= at_cmd.o att1.o att2.o values-xpg4.o
83 ATRMOBJS
= $(ATRMOBJS1
) $(GETRESPOBJ
)
85 CRONTABOBJS1
= crontab.o
86 CRONTABOBJS
= $(CRONTABOBJS1
) $(GETRESPOBJ
)
88 cron
:= POBJS
= $(CRONOBJS
) $(COMMONOBJ2
)
89 at
:= POBJS
= $(ATOBJS
) $(COMMONOBJS
)
90 atrm
:= POBJS
= $(ATRMOBJS
) $(COMMONOBJS
)
91 atq
:= POBJS
= $(ATQOBJS
) $(COMMONOBJS
)
92 crontab
:= POBJS
= $(CRONTABOBJS
) $(COMMONOBJS
)
95 NOBJS
= $(CRONOBJS
) $(ATOBJS
) $(ATRMOBJS1
) $(ATQOBJS
) $(CRONTABOBJS1
) \
97 OBJS
= $(NOBJS
) $(GETRESPOBJ
)
99 SRCS
= $(NOBJS
:%.o
=%.c
) $(GETRESPSRC
)
101 CLOBBERFILES
+= $(SCRIPT
)
103 $(ROOTLIBCRON
) := SYMLNKDEST
= ..
/..
/etc
/cron.d
105 $(ROOTBIN
)/at
:= FILEMODE
= 04755
106 $(ROOTBIN
)/atrm
:= FILEMODE
= 04755
107 $(ROOTBIN
)/atq
:= FILEMODE
= 04755
108 $(ROOTBIN
)/crontab
:= FILEMODE
= 04555
109 $(ROOTUSRSBIN
)/cron
:= FILEMODE
= 0555
111 at
:= LDLIBS
+= -lproject
-lsecdb
112 atq
:= LDLIBS
+= -lsecdb
113 atrm
:= LDLIBS
+= -lsecdb
114 cron
:= LDLIBS
+= -lpam
-lproject
-lcontract
115 crontab
:= LDLIBS
+= -lsecdb
-lpam
118 $(ROOTSVCSYSTEM
)/cron.xml
:= FILEMODE
= 0444
119 $(ROOTLIBSVCMETHOD
)/svc-cron
:= FILEMODE
= 0555
124 all : $(PROG
) $(SCRIPT
) $(FILES
)
126 install : all $(ROOTPROG
) $(ROOTETCDEFAULTFILES
) $(ROOTSYMLINK
) \
127 $(ROOTMANIFEST
) $(ROOTMETHOD
)
130 $(LINK.c
) $(POBJS
) -o
$@
$(LDLIBS
)
133 values-xpg4.o
: ..
/..
/lib
/crt
/common
/values-xpg4.c
134 $(COMPILE.c
) -o
$@ ..
/..
/lib
/crt
/common
/values-xpg4.c
136 %.o
: $(SRC
)/common
/util
/%.c
137 $(COMPILE.c
) $(OUTPUT_OPTION
) $<
145 att2.c
: att2.l att2.ed att1.c
147 ed
- lex.yy.c
< att2.ed
148 $(MV
) lex.yy.c att2.c
151 $(RM
) $@
; $(SYMLINK
) $(SYMLNKDEST
) $@
153 check: $(CHKMANIFEST
)
155 $(POFILE
): $(POFILES
)
156 $(RM
) $@
; cat
$(POFILES
) > $@
159 $(RM
) $(OBJS
) att1.h att1.c att2.c
164 include ..
/Makefile.targ