Print this page
8609 want a position independent CRT
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/cron/Makefile
+++ new/usr/src/cmd/cron/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25
26 26 DEFAULTFILES = cron.dfl
27 27
28 28 include ../Makefile.cmd
29 29
30 30 MANIFEST = cron.xml
31 31
32 32 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
33 33 ROOTMETHOD = $(ROOTLIBSVCMETHOD)/svc-cron
34 34
35 35 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util
36 36 CERRWARN += -_gcc=-Wno-parentheses
37 37 CERRWARN += -_gcc=-Wno-unused-label
38 38 CERRWARN += -_gcc=-Wno-uninitialized
39 39 CERRWARN += -_gcc=-Wno-unused-variable
40 40 CERRWARN += -_gcc=-Wno-unused-value
41 41
42 42 ROOTVAR = $(ROOT)/var
43 43
44 44 ROOTSPCRON = $(ROOTVAR)/spool/cron
45 45 ROOTCROND = $(ROOTETC)/cron.d
46 46 ROOTCRONTABS = $(ROOTSPCRON)/crontabs
47 47 ROOTATJOBS = $(ROOTSPCRON)/atjobs
48 48 ROOTLIBCRON = $(ROOTLIB)/cron
49 49
50 50 PROG1 = cron
51 51 PROG2 = at atq atrm crontab
52 52 XPG6PROG = crontab
53 53 XPG4PROG = at crontab
54 54 PROG = $(PROG1) $(PROG2)
55 55
56 56 SCRIPT = batch
57 57 XPG4SCRIPT = batch.xpg4
58 58
59 59 POFILE= $(PROG1)_cmd.po
60 60 POFILES1= at.po crontab.po funcs.po batch.po
61 61 POFILES= $(POFILES1) atrm.po
62 62 $(POFILES1) := XGETFLAGS= -a -x $(PROG1).xcl
63 63
64 64 ROOTDIRS = $(ROOTSPCRON) $(ROOTCROND) \
65 65 $(ROOTCRONTABS) $(ROOTATJOBS)
66 66
67 67 ROOTPROG = $(PROG1:%=$(ROOTUSRSBIN)/%) $(PROG2:%=$(ROOTBIN)/%) \
68 68 $(SCRIPT:%=$(ROOTBIN)/%) \
69 69 $(XPG6PROG:%=$(ROOTXPG6BIN)/%) \
70 70 $(XPG4PROG:%=$(ROOTXPG4BIN)/%) \
71 71 $(XPG4SCRIPT:%.xpg4=$(ROOTXPG4BIN)/%)
72 72
73 73 ROOTSYMLINK = $(ROOTLIBCRON) $(ROOTETC)/cron
74 74
75 75 GETRESPSRC= $(SRC)/common/util/getresponse.c
76 76 GETRESPOBJ= getresponse.o
77 77 COMMONOBJ1= permit.o
78 78 COMMONOBJ2= funcs.o
79 79 COMMONOBJS= $(COMMONOBJ1) $(COMMONOBJ2)
80 80 CRONOBJS= cron.o elm.o
81 81 ATOBJS= at.o att1.o att2.o
82 82 XPG4OBJS= values-xpg4.o
83 83 ATRMOBJS1= atrm.o
84 84 ATRMOBJS= $(ATRMOBJS1) $(GETRESPOBJ)
85 85 ATQOBJS= atq.o
86 86 CRONTABOBJS1= crontab.o
87 87 CRONTABOBJS= $(CRONTABOBJS1) $(GETRESPOBJ)
88 88
89 89 # /usr/xpg*/bin/crontab isn't linked with values-xpg*.o since it isn't
90 90 # required by any specific behavior differences; this makes these
91 91 # setuid variants less likely to accidently trip over differences that
92 92 # could unintentionally open up a security hole.
93 93 XPG4COMMONOBJS= $(COMMONOBJS:%=objs.xpg4/%)
94 94 XPG4CTOBJS= $(CRONTABOBJS:%=objs.xpg4/%)
95 95 XPG4ATOBJS= $(ATOBJS:%=objs.xpg4/%) $(XPG4OBJS:%=objs.xpg4/%)
96 96 XPG6COMMONOBJS= $(COMMONOBJS:%=objs.xpg6/%)
97 97 XPG6CTOBJS= $(CRONTABOBJS:%=objs.xpg6/%)
98 98
99 99 cron := POBJS = $(CRONOBJS) $(COMMONOBJ2)
100 100 at := POBJS = $(ATOBJS) $(COMMONOBJS)
101 101 at.xpg4 := POBJS = $(XPG4ATOBJS) $(XPG4COMMONOBJS)
102 102 atrm := POBJS = $(ATRMOBJS) $(COMMONOBJS)
103 103 atq := POBJS = $(ATQOBJS) $(COMMONOBJS)
104 104 crontab := POBJS = $(CRONTABOBJS) $(COMMONOBJS)
105 105 crontab.xpg4 := POBJS = $(XPG4CTOBJS) $(XPG4COMMONOBJS)
106 106 crontab.xpg6 := POBJS = $(XPG6CTOBJS) $(XPG6COMMONOBJS)
107 107
108 108 CFLAGS += $(CCVERBOSE)
109 109
110 110 NOBJS= $(CRONOBJS) $(ATOBJS) $(ATRMOBJS1) $(ATQOBJS) $(CRONTABOBJS1) \
111 111 $(COMMONOBJS)
112 112 OBJS = $(NOBJS) $(XPG4COMMONOBJS) $(XPG4ATOBJS) $(XPG4CTOBJS) \
113 113 $(XPG6COMMONOBJS) $(XPG6CTOBJS) $(GETRESPOBJ)
114 114
115 115 SRCS = $(NOBJS:%.o=%.c) $(GETRESPSRC)
116 116
117 117 CLOBBERFILES += $(SCRIPT) $(XPG4SCRIPT)
118 118
119 119 $(ROOTLIBCRON) := SYMLNKDEST = ../../etc/cron.d
120 120 $(ROOTETC)/cron := SYMLNKDEST = ../usr/sbin/cron
121 121
122 122 $(ROOTBIN)/at := FILEMODE = 04755
123 123 $(ROOTXPG4BIN)/at := FILEMODE = 04755
124 124 $(ROOTBIN)/atrm := FILEMODE = 04755
125 125 $(ROOTBIN)/atq := FILEMODE = 04755
126 126 $(ROOTBIN)/crontab := FILEMODE = 04555
127 127 $(ROOTXPG6BIN)/crontab := FILEMODE = 04555
128 128 $(ROOTXPG4BIN)/crontab := FILEMODE = 04555
129 129 $(ROOTUSRSBIN)/cron := FILEMODE = 0555
130 130
131 131 LDLIBS += -lbsm
132 132
133 133 at := LDLIBS += -lproject -lsecdb
134 134 at.xpg4 := LDLIBS += -lproject -lsecdb
135 135 atq := LDLIBS += -lsecdb
136 136 atrm := LDLIBS += -lsecdb
137 137 cron := LDLIBS += -lpam -lproject -lcontract -lzoneinfo
138 138 crontab := LDLIBS += -lsecdb -lpam -lzoneinfo
139 139 crontab.xpg6 := LDLIBS += -lsecdb -lpam -lzoneinfo
140 140 crontab.xpg4 := LDLIBS += -lsecdb -lpam -lzoneinfo
141 141
142 142 lint := LDLIBS += -lproject -lsecdb -lcontract -lpam
143 143
144 144 $(XPG4) := CFLAGS += -DXPG4
145 145 $(XPG6) := CFLAGS += -DXPG6
146 146
147 147 LINTFLAGS += -u
148 148
149 149 $(ROOTSVCSYSTEM)/cron.xml := FILEMODE = 0444
150 150 $(ROOTLIBSVCMETHOD)/svc-cron := FILEMODE = 0555
151 151
152 152
153 153 .KEEP_STATE:
154 154
155 155 all : $(PROG) $(XPG4) $(XPG6) $(SCRIPT) $(XPG4SCRIPT) $(FILES)
156 156
157 157 install : all $(ROOTPROG) $(ROOTETCDEFAULTFILES) $(ROOTSYMLINK) \
158 158 $(ROOTMANIFEST) $(ROOTMETHOD)
159 159
160 160 $(PROG) : $$(POBJS)
161 161 $(LINK.c) $(POBJS) -o $@ $(LDLIBS)
162 162 $(POST_PROCESS)
163 163
164 164 $(XPG4) : objs.xpg4 $$(POBJS)
165 165 $(LINK.c) $(POBJS) -o $@ $(LDLIBS)
166 166 $(POST_PROCESS)
167 167
168 168 $(XPG6) : objs.xpg6 $$(POBJS)
169 169 $(LINK.c) $(POBJS) -o $@ $(LDLIBS)
170 170 $(POST_PROCESS)
171 171
172 172 objs.xpg6/%.o: %.c
173 173 $(COMPILE.c) -o $@ $<
↓ open down ↓ |
173 lines elided |
↑ open up ↑ |
174 174
175 175 objs.xpg6:
176 176 -@mkdir -p $@
177 177
178 178 objs.xpg4/%.o: %.c
179 179 $(COMPILE.c) -o $@ $<
180 180
181 181 objs.xpg4:
182 182 -@mkdir -p $@
183 183
184 -objs.xpg4/values-xpg4.o: ../../lib/common/common/values-xpg4.c
185 - $(COMPILE.c) -o $@ ../../lib/common/common/values-xpg4.c
184 +objs.xpg4/values-xpg4.o: ../../lib/crt/common/values-xpg4.c
185 + $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c
186 186
187 187 %.o: $(SRC)/common/util/%.c
188 188 $(COMPILE.c) $(OUTPUT_OPTION) $<
189 189 $(POST_PROCESS_O)
190 190
191 191 objs.xpg4/%.o: $(SRC)/common/util/%.c
192 192 $(COMPILE.c) -o $@ $<
193 193 $(POST_PROCESS_O)
194 194
195 195 objs.xpg6/%.o: $(SRC)/common/util/%.c
196 196 $(COMPILE.c) -o $@ $<
197 197 $(POST_PROCESS_O)
198 198
199 199 att1.c : att1.y
200 200 $(YACC.y) -d att1.y
201 201 $(MV) y.tab.c att1.c
202 202 $(MV) y.tab.h att1.h
203 203
204 204 att2.c : att2.l att2.ed att1.c
205 205 $(LEX) att2.l
206 206 ed - lex.yy.c < att2.ed
207 207 $(MV) lex.yy.c att2.c
208 208
209 209 # Don't re-install directories installed by Targetdirs
210 210 #$(ROOTDIRS):
211 211 # $(INS.dir)
212 212
213 213 $(ROOTSYMLINK) :
214 214 $(RM) $@; $(SYMLINK) $(SYMLNKDEST) $@
215 215
216 216 check: $(CHKMANIFEST)
217 217
218 218 $(POFILE): $(POFILES)
219 219 $(RM) $@; cat $(POFILES) > $@
220 220
221 221 clean :
222 222 $(RM) $(OBJS) att1.h att1.c att2.c
223 223
224 224 lint : lint_SRCS
225 225
226 226 strip :
227 227 $(STRIP) $(PROG) $(XPG4) $(XPG6)
228 228
229 229 include ../Makefile.targ
↓ open down ↓ |
34 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX