]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
07725fee | 2 | # "$Id: Makefile 5940 2006-09-11 18:30:09Z mike $" |
ef416fc2 | 3 | # |
4 | # Scheduler Makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
bd7854cb | 6 | # Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 7 | # |
8 | # These coded instructions, statements, and computer programs are the | |
9 | # property of Easy Software Products and are protected by Federal | |
10 | # copyright law. Distribution and use rights are outlined in the file | |
11 | # "LICENSE.txt" which should have been included with this file. If this | |
12 | # file is missing or damaged please contact Easy Software Products | |
13 | # at: | |
14 | # | |
15 | # Attn: CUPS Licensing Information | |
16 | # Easy Software Products | |
17 | # 44141 Airport View Drive, Suite 204 | |
18 | # Hollywood, Maryland 20636 USA | |
19 | # | |
20 | # Voice: (301) 373-9600 | |
21 | # EMail: cups-info@cups.org | |
22 | # WWW: http://www.cups.org | |
23 | # | |
24 | ||
25 | include ../Makedefs | |
26 | ||
27 | CUPSDOBJS = \ | |
28 | auth.o \ | |
29 | banners.o \ | |
30 | cert.o \ | |
31 | classes.o \ | |
32 | client.o \ | |
33 | conf.o \ | |
34 | dirsvc.o \ | |
35 | env.o \ | |
36 | main.o \ | |
37 | ipp.o \ | |
38 | listen.o \ | |
39 | job.o \ | |
40 | log.o \ | |
41 | network.o \ | |
42 | policy.o \ | |
43 | printers.o \ | |
44 | process.o \ | |
45 | quotas.o \ | |
46 | server.o \ | |
47 | statbuf.o \ | |
09ec0018 | 48 | subscriptions.o \ |
49 | sysman.o | |
ef416fc2 | 50 | MIMEOBJS = \ |
51 | filter.o \ | |
52 | mime.o \ | |
53 | type.o | |
54 | OBJS = \ | |
55 | $(CUPSDOBJS) \ | |
56 | $(MIMEOBJS) \ | |
57 | cups-deviced.o \ | |
58 | cups-driverd.o \ | |
59 | cups-lpd.o \ | |
60 | cups-polld.o \ | |
61 | testdirsvc.o \ | |
d09495fa | 62 | testlpd.o \ |
ef416fc2 | 63 | testmime.o \ |
64 | testspeed.o \ | |
07725fee | 65 | testsub.o \ |
ef416fc2 | 66 | util.o |
67 | TARGETS = \ | |
68 | cupsd \ | |
69 | cups-deviced \ | |
70 | cups-driverd \ | |
71 | cups-lpd \ | |
72 | cups-polld \ | |
73 | libmime.a \ | |
74 | testdirsvc \ | |
d09495fa | 75 | testlpd \ |
ef416fc2 | 76 | testmime \ |
07725fee | 77 | testspeed \ |
78 | testsub | |
ef416fc2 | 79 | |
80 | ||
81 | # | |
82 | # Make everything... | |
83 | # | |
84 | ||
85 | all: $(TARGETS) | |
86 | ||
87 | ||
88 | # | |
89 | # Clean all object files... | |
90 | # | |
91 | ||
92 | clean: | |
93 | $(RM) $(OBJS) | |
94 | $(RM) $(TARGETS) | |
95 | ||
96 | ||
97 | # | |
98 | # Update dependencies (without system header dependencies...) | |
99 | # | |
100 | ||
101 | depend: | |
102 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 | |
103 | ||
104 | ||
105 | # | |
106 | # Install the scheduler... | |
107 | # | |
108 | ||
109 | install: all | |
110 | echo Creating $(SBINDIR)... | |
923edb68 | 111 | $(INSTALL_DIR) -m 755 $(SBINDIR) |
ef416fc2 | 112 | echo Installing cupsd in $(SBINDIR)... |
113 | $(INSTALL_BIN) cupsd $(SBINDIR) | |
114 | echo Creating $(SERVERBIN)... | |
923edb68 | 115 | $(INSTALL_DIR) -m 755 $(SERVERBIN) |
ef416fc2 | 116 | echo Creating $(SERVERBIN)/daemon... |
923edb68 | 117 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/daemon |
ef416fc2 | 118 | echo Installing cups-deviced, cups-driverd, cups-lpd, and cups-polld in $(SERVERBIN)/daemon... |
119 | $(INSTALL_BIN) cups-deviced $(SERVERBIN)/daemon | |
120 | $(INSTALL_BIN) cups-driverd $(SERVERBIN)/daemon | |
121 | $(INSTALL_BIN) cups-lpd $(SERVERBIN)/daemon | |
122 | $(INSTALL_BIN) cups-polld $(SERVERBIN)/daemon | |
123 | echo Creating $(SERVERBIN)/driver... | |
923edb68 | 124 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver |
ef416fc2 | 125 | echo Creating $(SERVERROOT)... |
923edb68 | 126 | $(INSTALL_DIR) -m 755 $(SERVERROOT) |
bd7854cb | 127 | -chgrp $(CUPS_GROUP) $(SERVERROOT) |
ef416fc2 | 128 | echo Creating $(SERVERROOT)/interfaces... |
bd7854cb | 129 | $(INSTALL_DIR) -m 755 $(SERVERROOT)/interfaces |
130 | -chgrp $(CUPS_GROUP) $(SERVERROOT)/interfaces | |
ef416fc2 | 131 | echo Creating $(SERVERROOT)/ppd... |
bd7854cb | 132 | $(INSTALL_DIR) -m 755 $(SERVERROOT)/ppd |
133 | -chgrp $(CUPS_GROUP) $(SERVERROOT)/ppd | |
8ca02f3c | 134 | echo Creating $(SERVERROOT)/ssl... |
135 | $(INSTALL_DIR) -m 700 $(SERVERROOT)/ssl | |
136 | -chgrp $(CUPS_GROUP) $(SERVERROOT)/ssl | |
ef416fc2 | 137 | echo Creating $(STATEDIR)... |
923edb68 | 138 | $(INSTALL_DIR) -m 755 $(STATEDIR) |
ef416fc2 | 139 | echo Creating $(STATEDIR)/certs... |
bd7854cb | 140 | $(INSTALL_DIR) -m 511 $(STATEDIR)/certs |
141 | -chgrp $(CUPS_PRIMARY_SYSTEM_GROUP) $(STATEDIR)/certs | |
ef416fc2 | 142 | echo Creating $(LOGDIR)... |
923edb68 | 143 | $(INSTALL_DIR) -m 755 $(LOGDIR) |
ef416fc2 | 144 | echo Creating $(REQUESTS)... |
bd7854cb | 145 | $(INSTALL_DIR) -m 710 $(REQUESTS) |
146 | -chgrp $(CUPS_GROUP) $(REQUESTS) | |
923edb68 | 147 | echo Creating $(REQUESTS)/tmp... |
bd7854cb | 148 | $(INSTALL_DIR) -m 1770 $(REQUESTS)/tmp |
149 | -chgrp $(CUPS_GROUP) $(REQUESTS)/tmp | |
ef416fc2 | 150 | echo Creating $(CACHEDIR)... |
bd7854cb | 151 | $(INSTALL_DIR) -m 775 $(CACHEDIR) |
152 | -chgrp $(CUPS_GROUP) $(CACHEDIR) | |
923edb68 | 153 | # echo Creating $(CACHEDIR)/ppd... |
154 | # $(INSTALL_DIR) -m 755 $(CACHEDIR)/ppd | |
bd7854cb | 155 | # -chgrp $(CUPS_GROUP) $(CACHEDIR)/ppd |
ef416fc2 | 156 | |
157 | ||
757d2cad | 158 | # |
159 | # Uninstall the scheduler... | |
160 | # | |
161 | ||
162 | uninstall: all | |
163 | $(RM) $(SBINDIR)/cupsd | |
164 | $(RM) $(SERVERBIN)/daemon/cups-deviced | |
165 | $(RM) $(SERVERBIN)/daemon/cups-driverd | |
166 | $(RM) $(SERVERBIN)/daemon/cups-lpd | |
167 | $(RM) $(SERVERBIN)/daemon/cups-polld | |
168 | -$(RMDIR) $(STATEDIR)/certs | |
169 | -$(RMDIR) $(STATEDIR) | |
170 | -$(RMDIR) $(SERVERROOT)/ppd | |
171 | -$(RMDIR) $(SERVERROOT)/interfaces | |
172 | -$(RMDIR) $(SERVERROOT) | |
173 | -$(RMDIR) $(SERVERBIN)/driver | |
174 | -$(RMDIR) $(SERVERBIN)/daemon | |
175 | -$(RMDIR) $(SERVERBIN) | |
176 | -$(RMDIR) $(SBINDIR) | |
177 | -$(RMDIR) $(REQUESTS)/tmp | |
178 | -$(RMDIR) $(REQUESTS) | |
179 | -$(RMDIR) $(LOGDIR) | |
180 | -$(RMDIR) $(CACHEDIR) | |
181 | ||
182 | ||
ef416fc2 | 183 | # |
184 | # Make the scheduler executable, "cupsd". | |
185 | # | |
186 | ||
187 | cupsd: $(CUPSDOBJS) libmime.a ../cups/$(LIBCUPS) | |
188 | echo Linking $@... | |
189 | $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) libmime.a \ | |
b423cd4c | 190 | $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ |
09ec0018 | 191 | $(LIBPAPER) $(LIBMALLOC) $(CUPSDLIBS) $(LIBS) |
ef416fc2 | 192 | |
193 | cupsd-static: $(CUPSDOBJS) libmime.a ../cups/libcups.a | |
194 | echo Linking $@... | |
195 | $(CC) $(LDFLAGS) -o cupsd-static $(CUPSDOBJS) libmime.a \ | |
b423cd4c | 196 | $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ |
197 | ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \ | |
198 | $(LIBMALLOC) $(CUPSDLIBS) | |
ef416fc2 | 199 | |
200 | ||
201 | # | |
202 | # Make the device daemon, "cups-deviced". | |
203 | # | |
204 | ||
205 | cups-deviced: cups-deviced.o util.o ../cups/$(LIBCUPS) | |
206 | echo Linking $@... | |
207 | $(CC) $(LDFLAGS) -o cups-deviced cups-deviced.o util.o $(LIBS) | |
208 | ||
209 | ||
210 | # | |
211 | # Make the driver daemon, "cups-driverd". | |
212 | # | |
213 | ||
214 | cups-driverd: cups-driverd.o util.o ../cups/$(LIBCUPS) | |
215 | echo Linking $@... | |
216 | $(CC) $(LDFLAGS) -o cups-driverd cups-driverd.o util.o $(LIBS) | |
217 | ||
218 | ||
219 | # | |
220 | # Make the line printer daemon, "cups-lpd". | |
221 | # | |
222 | ||
223 | cups-lpd: cups-lpd.o ../cups/$(LIBCUPS) | |
224 | echo Linking $@... | |
225 | $(CC) $(LDFLAGS) -o cups-lpd cups-lpd.o $(LIBS) | |
226 | ||
227 | ||
228 | # | |
229 | # Make the polling daemon, "cups-polld". | |
230 | # | |
231 | ||
232 | cups-polld: cups-polld.o ../cups/$(LIBCUPS) | |
233 | echo Linking $@... | |
234 | $(CC) $(LDFLAGS) -o cups-polld cups-polld.o $(LIBS) | |
235 | ||
236 | ||
237 | # | |
238 | # libmime.a | |
239 | # | |
240 | ||
241 | libmime.a: $(MIMEOBJS) | |
242 | echo Archiving $@... | |
243 | $(RM) $@ | |
244 | $(AR) $(ARFLAGS) $@ $(MIMEOBJS) | |
245 | $(RANLIB) $@ | |
246 | ||
247 | ||
248 | # | |
249 | # Make the test program, "testdirsvc". | |
250 | # | |
251 | ||
252 | testdirsvc: testdirsvc.o | |
253 | echo Linking $@... | |
254 | $(CC) $(LDFLAGS) -o testdirsvc testdirsvc.o $(COMMONLIBS) $(NETLIBS) | |
255 | ||
256 | ||
d09495fa | 257 | # |
258 | # Make the test program, "testlpd". | |
259 | # | |
260 | ||
261 | testlpd: testlpd.o ../cups/libcups.a cups-lpd | |
262 | echo Linking $@... | |
263 | $(CC) $(LDFLAGS) -o testlpd testlpd.o ../cups/libcups.a \ | |
264 | $(COMMONLIBS) $(LIBZ) $(SSLLIBS) | |
265 | ||
266 | ||
ef416fc2 | 267 | # |
268 | # testmime | |
269 | # | |
270 | ||
fa73b229 | 271 | testmime: testmime.o libmime.a ../cups/libcups.a |
ef416fc2 | 272 | echo Linking $@... |
273 | $(CC) $(LDFLAGS) -o $@ testmime.o libmime.a ../cups/libcups.a \ | |
fa73b229 | 274 | $(COMMONLIBS) $(LIBZ) $(SSLLIBS) |
ef416fc2 | 275 | |
276 | ||
277 | # | |
278 | # Make the test program, "testspeed". | |
279 | # | |
280 | ||
d09495fa | 281 | testspeed: testspeed.o ../cups/libcups.a |
ef416fc2 | 282 | echo Linking $@... |
d09495fa | 283 | $(CC) $(LDFLAGS) -o testspeed testspeed.o ../cups/libcups.a \ |
284 | $(COMMONLIBS) $(LIBZ) $(SSLLIBS) | |
ef416fc2 | 285 | |
286 | ||
07725fee | 287 | # |
288 | # Make the test program, "testsub". | |
289 | # | |
290 | ||
291 | testsub: testsub.o ../cups/libcups.a | |
292 | echo Linking $@... | |
293 | $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \ | |
294 | $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) | |
295 | ||
296 | ||
ef416fc2 | 297 | # |
298 | # Dependencies... | |
299 | # | |
300 | ||
301 | include Dependencies | |
302 | ||
303 | ||
304 | # | |
07725fee | 305 | # End of "$Id: Makefile 5940 2006-09-11 18:30:09Z mike $". |
ef416fc2 | 306 | # |