]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
f2d18633 | 2 | # "$Id$" |
ef416fc2 | 3 | # |
5a1d7a17 | 4 | # Scheduler Makefile for CUPS. |
ef416fc2 | 5 | # |
fb458c34 | 6 | # Copyright 2007-2015 by Apple Inc. |
5a1d7a17 | 7 | # Copyright 1997-2007 by Easy Software Products, all rights reserved. |
ef416fc2 | 8 | # |
5a1d7a17 MS |
9 | # These coded instructions, statements, and computer programs are the |
10 | # property of Apple Inc. and are protected by Federal copyright | |
11 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | # which should have been included with this file. If this file is | |
13 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | # |
15 | ||
16 | include ../Makedefs | |
17 | ||
18 | CUPSDOBJS = \ | |
19 | auth.o \ | |
20 | banners.o \ | |
21 | cert.o \ | |
22 | classes.o \ | |
23 | client.o \ | |
a29fd7dd | 24 | colorman.o \ |
ef416fc2 | 25 | conf.o \ |
26 | dirsvc.o \ | |
27 | env.o \ | |
321d8d57 | 28 | file.o \ |
ef416fc2 | 29 | main.o \ |
30 | ipp.o \ | |
31 | listen.o \ | |
32 | job.o \ | |
33 | log.o \ | |
34 | network.o \ | |
35 | policy.o \ | |
36 | printers.o \ | |
37 | process.o \ | |
38 | quotas.o \ | |
f7deaa1a | 39 | select.o \ |
ef416fc2 | 40 | server.o \ |
41 | statbuf.o \ | |
09ec0018 | 42 | subscriptions.o \ |
d3d89474 | 43 | sysman.o |
50fe7201 | 44 | LIBOBJS = \ |
ef416fc2 | 45 | filter.o \ |
46 | mime.o \ | |
47 | type.o | |
4509bb49 | 48 | COBJS = \ |
ef416fc2 | 49 | $(CUPSDOBJS) \ |
50fe7201 | 50 | $(LIBOBJS) \ |
bc44d920 | 51 | cupsfilter.o \ |
ef416fc2 | 52 | cups-deviced.o \ |
0268488e | 53 | cups-exec.o \ |
ef416fc2 | 54 | cups-lpd.o \ |
d09495fa | 55 | testlpd.o \ |
ef416fc2 | 56 | testmime.o \ |
57 | testspeed.o \ | |
07725fee | 58 | testsub.o \ |
ef416fc2 | 59 | util.o |
4509bb49 MS |
60 | CXXOBJS = \ |
61 | cups-driverd.o | |
62 | OBJS = \ | |
63 | $(COBJS) \ | |
64 | $(CXXOBJS) | |
c9fc04c6 MS |
65 | LIBTARGETS = \ |
66 | $(LIBCUPSMIME) \ | |
9a4f8274 MS |
67 | libcupsmime.a |
68 | ||
69 | UNITTARGETS = \ | |
9a4f8274 MS |
70 | testlpd \ |
71 | testmime \ | |
72 | testspeed \ | |
73 | testsub | |
c9fc04c6 | 74 | |
0268488e | 75 | PROGRAMS = \ |
ef416fc2 | 76 | cupsd \ |
bc44d920 | 77 | cupsfilter \ |
ef416fc2 | 78 | cups-deviced \ |
79 | cups-driverd \ | |
0268488e | 80 | cups-exec \ |
a2326b5b | 81 | cups-lpd |
f8b3a85b MS |
82 | |
83 | TARGETS = \ | |
84 | $(LIBTARGETS) \ | |
0268488e | 85 | $(PROGRAMS) |
ef416fc2 | 86 | |
87 | ||
88 | # | |
89 | # Make everything... | |
90 | # | |
91 | ||
92 | all: $(TARGETS) | |
93 | ||
94 | ||
c9fc04c6 MS |
95 | # |
96 | # Make library targets... | |
97 | # | |
98 | ||
99 | libs: $(LIBTARGETS) | |
100 | ||
101 | ||
5f64df29 MS |
102 | # |
103 | # Make unit tests... | |
104 | # | |
105 | ||
9a4f8274 | 106 | unittests: $(UNITTARGETS) |
5f64df29 MS |
107 | |
108 | ||
ef416fc2 | 109 | # |
110 | # Clean all object files... | |
111 | # | |
112 | ||
113 | clean: | |
114 | $(RM) $(OBJS) | |
9a4f8274 | 115 | $(RM) $(TARGETS) $(UNITTARGETS) convert |
5a1d7a17 | 116 | $(RM) libcupsmime.so libcupsmime.dylib |
ef416fc2 | 117 | |
118 | ||
119 | # | |
120 | # Update dependencies (without system header dependencies...) | |
121 | # | |
122 | ||
123 | depend: | |
12f89d24 MS |
124 | $(CC) -MM $(ALL_CFLAGS) $(COBJS:.o=.c) >Dependencies |
125 | $(CXX) -MM $(ALL_CXXFLAGS) $(CXXOBJS:.o=.cxx) >>Dependencies | |
ef416fc2 | 126 | |
127 | ||
6961465f MS |
128 | # |
129 | # Run oclint to check code coverage... | |
130 | # | |
131 | ||
132 | oclint: | |
133 | oclint -o=oclint.html -html $(CUPSDOBJS:.o=.c) $(LIBOBJS:.o=.c) -- $(ALL_CFLAGS) | |
134 | ||
135 | ||
ef416fc2 | 136 | # |
50fe7201 | 137 | # Install all targets... |
ef416fc2 | 138 | # |
139 | ||
50fe7201 MS |
140 | install: all install-data install-headers install-libs install-exec |
141 | ||
142 | ||
143 | # | |
144 | # Install data files... | |
145 | # | |
146 | ||
147 | install-data: | |
ef416fc2 | 148 | echo Creating $(SERVERBIN)/driver... |
923edb68 | 149 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver |
ef416fc2 | 150 | echo Creating $(SERVERROOT)... |
e07d4801 | 151 | $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT) |
ef416fc2 | 152 | echo Creating $(SERVERROOT)/interfaces... |
e07d4801 | 153 | $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/interfaces |
ef416fc2 | 154 | echo Creating $(SERVERROOT)/ppd... |
e07d4801 MS |
155 | $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/ppd |
156 | if test "x`uname`" != xDarwin; then \ | |
bc44d920 | 157 | echo Creating $(SERVERROOT)/ssl...; \ |
e07d4801 MS |
158 | $(INSTALL_DIR) -m 700 -g $(CUPS_GROUP) $(SERVERROOT)/ssl; \ |
159 | fi | |
160 | if test "$(STATEDIR)" != "$(SERVERROOT)"; then \ | |
09a101d6 | 161 | echo Creating $(STATEDIR)...; \ |
162 | $(INSTALL_DIR) -m 755 $(STATEDIR); \ | |
09a101d6 | 163 | fi |
e07d4801 | 164 | echo Creating $(STATEDIR)/certs... |
f11a948a MS |
165 | $(INSTALL_DIR) -m 511 -o $(CUPS_USER) -g $(CUPS_PRIMARY_SYSTEM_GROUP) \ |
166 | $(STATEDIR)/certs | |
ef416fc2 | 167 | echo Creating $(LOGDIR)... |
923edb68 | 168 | $(INSTALL_DIR) -m 755 $(LOGDIR) |
ef416fc2 | 169 | echo Creating $(REQUESTS)... |
e07d4801 | 170 | $(INSTALL_DIR) -m 710 -g $(CUPS_GROUP) $(REQUESTS) |
923edb68 | 171 | echo Creating $(REQUESTS)/tmp... |
e07d4801 | 172 | $(INSTALL_DIR) -m 1770 -g $(CUPS_GROUP) $(REQUESTS)/tmp |
ef416fc2 | 173 | echo Creating $(CACHEDIR)... |
6ca7b7a8 | 174 | $(INSTALL_DIR) -m 770 -g $(CUPS_GROUP) $(CACHEDIR) |
4d301e69 MS |
175 | if test "x$(INITDIR)" != x; then \ |
176 | echo Installing init scripts...; \ | |
177 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \ | |
178 | $(INSTALL_SCRIPT) cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \ | |
179 | for level in $(RCLEVELS); do \ | |
180 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \ | |
181 | $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/S$(RCSTART)cups; \ | |
4d301e69 MS |
182 | $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/K$(RCSTOP)cups; \ |
183 | done; \ | |
184 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \ | |
185 | $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc0.d/K$(RCSTOP)cups; \ | |
186 | fi | |
f2b8078b MS |
187 | if test "x$(INITDDIR)" != x; then \ |
188 | echo Installing init script...; \ | |
189 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR); \ | |
190 | $(INSTALL_SCRIPT) cups.sh $(BUILDROOT)$(INITDDIR); \ | |
191 | fi | |
192 | if test "x$(LAUNCHD_DIR)" != x; then \ | |
db6ac615 | 193 | echo Installing launchd configuration files...; \ |
f2b8078b | 194 | $(INSTALL_DIR) $(BUILDROOT)$(LAUNCHD_DIR); \ |
db6ac615 MS |
195 | $(INSTALL_DATA) org.cups.cupsd.plist $(BUILDROOT)$(LAUNCHD_DIR); \ |
196 | $(INSTALL_DATA) org.cups.cups-lpd.plist $(BUILDROOT)$(LAUNCHD_DIR); \ | |
4d301e69 MS |
197 | fi |
198 | if test "x$(SMFMANIFESTDIR)" != x; then \ | |
199 | echo Installing SMF manifest in $(SMFMANIFESTDIR)...;\ | |
200 | $(INSTALL_DIR) $(BUILDROOT)/$(SMFMANIFESTDIR); \ | |
201 | $(INSTALL_SCRIPT) cups.xml $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \ | |
202 | fi | |
f2b8078b | 203 | if test "x$(SYSTEMD_DIR)" != x; then \ |
db6ac615 | 204 | echo Installing systemd configuration files...; \ |
f2b8078b | 205 | $(INSTALL_DIR) $(BUILDROOT)$(SYSTEMD_DIR); \ |
db6ac615 MS |
206 | $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR); \ |
207 | $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR); \ | |
208 | $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR); \ | |
451d5797 MS |
209 | $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cups-lpd@.service; \ |
210 | $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR); \ | |
211 | elif test "x$(XINETD)" != x; then \ | |
4d301e69 MS |
212 | echo Installing xinetd configuration file for cups-lpd...; \ |
213 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \ | |
214 | $(INSTALL_DATA) cups-lpd.xinetd $(BUILDROOT)$(XINETD)/cups-lpd; \ | |
215 | fi | |
50fe7201 MS |
216 | |
217 | ||
218 | # | |
219 | # Install programs... | |
220 | # | |
221 | ||
222 | install-exec: | |
223 | echo Installing programs in $(SBINDIR)... | |
224 | $(INSTALL_DIR) -m 755 $(SBINDIR) | |
82cc1f9a | 225 | $(INSTALL_BIN) -m $(CUPS_CUPSD_FILE_PERM) cupsd $(SBINDIR) |
50fe7201 | 226 | $(INSTALL_BIN) cupsfilter $(SBINDIR) |
50fe7201 MS |
227 | echo Installing programs in $(SERVERBIN)/daemon... |
228 | $(INSTALL_DIR) -m 755 $(SERVERBIN) | |
229 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/daemon | |
230 | $(INSTALL_BIN) cups-deviced $(SERVERBIN)/daemon | |
231 | $(INSTALL_BIN) cups-driverd $(SERVERBIN)/daemon | |
0268488e | 232 | $(INSTALL_BIN) cups-exec $(SERVERBIN)/daemon |
50fe7201 | 233 | $(INSTALL_BIN) cups-lpd $(SERVERBIN)/daemon |
09a101d6 | 234 | if test "x$(SYMROOT)" != "x"; then \ |
235 | $(INSTALL_DIR) $(SYMROOT); \ | |
84315f46 | 236 | for file in $(PROGRAMS); do \ |
09a101d6 | 237 | cp $$file $(SYMROOT); \ |
cb7f98ee | 238 | dsymutil $(SYMROOT)/$$file; \ |
09a101d6 | 239 | done \ |
240 | fi | |
ef416fc2 | 241 | |
242 | ||
50fe7201 MS |
243 | # |
244 | # Install headers... | |
245 | # | |
246 | ||
247 | install-headers: | |
248 | echo Installing header files in $(INCLUDEDIR)/cups... | |
249 | $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups | |
250 | $(INSTALL_DATA) mime.h $(INCLUDEDIR)/cups | |
251 | ||
252 | ||
253 | # | |
254 | # Install libraries... | |
255 | # | |
256 | ||
e6013cfa | 257 | install-libs: $(INSTALLSTATIC) |
50fe7201 MS |
258 | echo Installing libraries in $(LIBDIR)... |
259 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
260 | $(INSTALL_LIB) $(LIBCUPSMIME) $(LIBDIR) | |
5a1d7a17 | 261 | if test $(LIBCUPSMIME) = "libcupsmime.so.1"; then \ |
50fe7201 MS |
262 | $(RM) $(LIBDIR)/`basename $(LIBCUPSMIME) .1`; \ |
263 | $(LN) $(LIBCUPSMIME) $(LIBDIR)/`basename $(LIBCUPSMIME) .1`; \ | |
264 | fi | |
265 | if test $(LIBCUPSMIME) = "libcupsmime.1.dylib"; then \ | |
50fe7201 MS |
266 | $(RM) $(LIBDIR)/libcupsmime.dylib; \ |
267 | $(LN) $(LIBCUPSMIME) $(LIBDIR)/libcupsmime.dylib; \ | |
268 | fi | |
269 | if test "x$(SYMROOT)" != "x"; then \ | |
270 | $(INSTALL_DIR) $(SYMROOT); \ | |
271 | cp $(LIBCUPSMIME) $(SYMROOT); \ | |
0fa6c7fa | 272 | dsymutil $(SYMROOT)/$(LIBCUPSMIME); \ |
50fe7201 MS |
273 | fi |
274 | ||
275 | installstatic: | |
276 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
97c9a8d7 | 277 | $(INSTALL_LIB) -m 755 libcupsmime.a $(LIBDIR) |
50fe7201 | 278 | $(RANLIB) $(LIBDIR)/libcupsmime.a |
97c9a8d7 | 279 | $(CHMOD) 555 $(LIBDIR)/libcupsmime.a |
50fe7201 | 280 | |
50fe7201 | 281 | |
757d2cad | 282 | # |
283 | # Uninstall the scheduler... | |
284 | # | |
285 | ||
e6013cfa | 286 | uninstall: |
757d2cad | 287 | $(RM) $(SBINDIR)/cupsd |
cc0d019f | 288 | $(RM) $(SBINDIR)/cupsfilter |
757d2cad | 289 | $(RM) $(SERVERBIN)/daemon/cups-deviced |
290 | $(RM) $(SERVERBIN)/daemon/cups-driverd | |
0268488e | 291 | $(RM) $(SERVERBIN)/daemon/cups-exec |
757d2cad | 292 | $(RM) $(SERVERBIN)/daemon/cups-lpd |
757d2cad | 293 | -$(RMDIR) $(STATEDIR)/certs |
294 | -$(RMDIR) $(STATEDIR) | |
295 | -$(RMDIR) $(SERVERROOT)/ppd | |
296 | -$(RMDIR) $(SERVERROOT)/interfaces | |
297 | -$(RMDIR) $(SERVERROOT) | |
298 | -$(RMDIR) $(SERVERBIN)/driver | |
299 | -$(RMDIR) $(SERVERBIN)/daemon | |
300 | -$(RMDIR) $(SERVERBIN) | |
301 | -$(RMDIR) $(SBINDIR) | |
302 | -$(RMDIR) $(REQUESTS)/tmp | |
303 | -$(RMDIR) $(REQUESTS) | |
304 | -$(RMDIR) $(LOGDIR) | |
305 | -$(RMDIR) $(CACHEDIR) | |
50fe7201 MS |
306 | $(RM) $(LIBDIR)/libcupsmime.1.dylib |
307 | $(RM) $(LIBDIR)/libcupsmime.a | |
308 | $(RM) $(LIBDIR)/libcupsmime.dylib | |
50fe7201 MS |
309 | $(RM) $(LIBDIR)/libcupsmime.so |
310 | $(RM) $(LIBDIR)/libcupsmime.so.1 | |
311 | -$(RMDIR) $(LIBDIR) | |
312 | $(RM) $(INCLUDEDIR)/cups/mime.h | |
313 | -$(RMDIR) $(INCLUDEDIR)/cups | |
4d301e69 | 314 | if test "x$(INITDIR)" != x; then \ |
1720786e | 315 | echo Uninstalling init scripts...; \ |
4d301e69 MS |
316 | $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \ |
317 | $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \ | |
318 | $(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \ | |
319 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \ | |
320 | $(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \ | |
321 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \ | |
322 | $(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \ | |
323 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \ | |
324 | $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \ | |
325 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \ | |
326 | fi | |
1720786e MS |
327 | if test "x$(INITDDIR)" != x; then \ |
328 | echo Uninstalling startup script...; \ | |
329 | $(RM) $(BUILDROOT)$(INITDDIR)/cups.sh; \ | |
4d301e69 MS |
330 | $(RMDIR) $(BUILDROOT)$(INITDDIR); \ |
331 | fi | |
db6ac615 MS |
332 | if test "x$LAUNCHD_DIR" != x; then \ |
333 | echo Uninstalling launchd files...; \ | |
334 | $(RM) $(BUILDROOT)$(LAUNCHD_DIR)/org.cups.cupsd.plist; \ | |
335 | $(RM) $(BUILDROOT)$(LAUNCHD_DIR)/org.cups.cups-lpd.plist; \ | |
1720786e | 336 | fi |
db6ac615 MS |
337 | if test "x$SYSTEMD_DIR" != x; then \ |
338 | echo Uninstalling systemd files...; \ | |
339 | $(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.path; \ | |
340 | $(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.service; \ | |
341 | $(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.socket; \ | |
1720786e | 342 | fi |
4d301e69 | 343 | if test "x$(SMFMANIFESTDIR)" != x; then \ |
1720786e | 344 | echo Uninstalling SMF manifest file...;\ |
4d301e69 MS |
345 | $(RM) $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \ |
346 | fi | |
347 | if test "x$(XINETD)" != x; then \ | |
348 | echo Uninstalling xinetd configuration file for cups-lpd...; \ | |
349 | $(RM) $(BUILDROOT)$(XINETD)/cups-lpd; \ | |
350 | fi | |
50fe7201 | 351 | |
50fe7201 MS |
352 | |
353 | # | |
354 | # Automatic API help files... | |
355 | # | |
356 | ||
357 | apihelp: | |
358 | mxmldoc --section "Programming" \ | |
359 | --title "MIME API" \ | |
360 | --css ../doc/cups-printable.css \ | |
361 | --header api-mime.header --intro api-mime.shtml \ | |
362 | mime.h $(LIBOBJS:.o=.c) >../doc/help/api-mime.html | |
f11a948a MS |
363 | mxmldoc --tokens help/api-mime.html api-mime.xml >../doc/help/api-mime.tokens |
364 | $(RM) api-mime.xml | |
50fe7201 MS |
365 | |
366 | framedhelp: | |
367 | mxmldoc --framed api-mime \ | |
368 | --section "Programming" \ | |
369 | --title "MIME API" \ | |
370 | --css ../doc/cups-printable.css \ | |
371 | --header api-mime.header --intro api-mime.shtml \ | |
372 | mime.h $(LIBOBJS:.o=.c) | |
757d2cad | 373 | |
374 | ||
ef416fc2 | 375 | # |
376 | # Make the scheduler executable, "cupsd". | |
377 | # | |
378 | ||
50fe7201 | 379 | cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cups/$(LIBCUPS) |
ef416fc2 | 380 | echo Linking $@... |
50fe7201 | 381 | $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \ |
b423cd4c | 382 | $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ |
1720786e MS |
383 | $(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(ONDEMANDLIBS) \ |
384 | $(DNSSDLIBS) $(LIBS) $(LIBGSSAPI) $(LIBWRAP) | |
ef416fc2 | 385 | |
f8b3a85b | 386 | cupsd-static: $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC) |
ef416fc2 | 387 | echo Linking $@... |
50fe7201 | 388 | $(CC) $(LDFLAGS) -o cupsd-static $(CUPSDOBJS) libcupsmime.a \ |
b423cd4c | 389 | $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ |
f8b3a85b | 390 | ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \ |
1720786e MS |
391 | $(LIBMALLOC) $(SERVERLIBS) $(ONDEMANDLIBS) $(DNSSDLIBS) \ |
392 | $(LIBGSSAPI) $(LIBWRAP) | |
ef416fc2 | 393 | |
394 | ||
bc44d920 | 395 | # |
396 | # Make the cupsfilter utility. | |
397 | # | |
398 | ||
50fe7201 | 399 | cupsfilter: cupsfilter.o $(LIBCUPSMIME) ../cups/$(LIBCUPS) |
bc44d920 | 400 | echo Linking $@... |
50fe7201 | 401 | $(CC) $(LDFLAGS) -o cupsfilter cupsfilter.o -L. -lcupsmime $(LIBS) |
cc0d019f MS |
402 | $(RM) convert |
403 | $(LN) cupsfilter convert | |
bc44d920 | 404 | |
fb458c34 MS |
405 | cupsfilter-static: cupsfilter.o libcupsmime.a ../cups/$(LIBCUPSSTATIC) |
406 | echo Linking $@... | |
407 | $(CC) $(LDFLAGS) -o cupsfilter-static cupsfilter.o libcupsmime.a \ | |
408 | ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(SSLLIBS) \ | |
409 | $(DNSSDLIBS) $(LIBGSSAPI) | |
410 | ||
bc44d920 | 411 | |
ef416fc2 | 412 | # |
413 | # Make the device daemon, "cups-deviced". | |
414 | # | |
415 | ||
416 | cups-deviced: cups-deviced.o util.o ../cups/$(LIBCUPS) | |
417 | echo Linking $@... | |
418 | $(CC) $(LDFLAGS) -o cups-deviced cups-deviced.o util.o $(LIBS) | |
419 | ||
420 | ||
421 | # | |
422 | # Make the driver daemon, "cups-driverd". | |
423 | # | |
424 | ||
4509bb49 | 425 | cups-driverd: cups-driverd.o util.o ../cups/$(LIBCUPS) ../ppdc/$(LIBCUPSPPDC) |
ef416fc2 | 426 | echo Linking $@... |
4509bb49 MS |
427 | $(CXX) $(LDFLAGS) -o cups-driverd cups-driverd.o util.o \ |
428 | -L../ppdc -lcupsppdc $(LIBS) | |
ef416fc2 | 429 | |
430 | ||
0268488e MS |
431 | # |
432 | # Make the sandbox execution helper, "cups-exec". | |
433 | # | |
434 | ||
435 | cups-exec: cups-exec.o | |
436 | echo Linking $@... | |
437 | $(CC) $(LDFLAGS) -o cups-exec cups-exec.o $(LIBS) | |
438 | ||
439 | ||
ef416fc2 | 440 | # |
441 | # Make the line printer daemon, "cups-lpd". | |
442 | # | |
443 | ||
444 | cups-lpd: cups-lpd.o ../cups/$(LIBCUPS) | |
445 | echo Linking $@... | |
446 | $(CC) $(LDFLAGS) -o cups-lpd cups-lpd.o $(LIBS) | |
447 | ||
448 | ||
ef416fc2 | 449 | # |
5a1d7a17 | 450 | # libcupsmime.so.1 |
50fe7201 MS |
451 | # |
452 | ||
5a1d7a17 | 453 | libcupsmime.so.1: $(LIBOBJS) |
50fe7201 MS |
454 | echo Linking $@... |
455 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBS) | |
456 | $(RM) `basename $@ .1` | |
457 | $(LN) $@ `basename $@ .1` | |
458 | ||
459 | ||
50fe7201 MS |
460 | # |
461 | # libcupsmime.1.dylib | |
462 | # | |
463 | ||
464 | libcupsmime.1.dylib: $(LIBOBJS) libcupsmime.exp | |
465 | echo Linking $@... | |
466 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ | |
467 | -install_name $(libdir)/$@ \ | |
468 | -current_version 1.0.0 \ | |
469 | -compatibility_version 1.0.0 \ | |
470 | -exported_symbols_list libcupsmime.exp \ | |
471 | $(LIBOBJS) $(LIBS) | |
472 | $(RM) libcupsmime.dylib | |
473 | $(LN) $@ libcupsmime.dylib | |
474 | ||
475 | ||
50fe7201 MS |
476 | # |
477 | # libcupsmime.la | |
478 | # | |
479 | ||
480 | libcupsmime.la: $(LIBOBJS) | |
481 | echo Linking $@... | |
482 | $(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \ | |
483 | -version-info 1:0 $(LIBS) | |
484 | ||
485 | ||
486 | # | |
487 | # libcupsmime.a | |
ef416fc2 | 488 | # |
489 | ||
50fe7201 | 490 | libcupsmime.a: $(LIBOBJS) |
ef416fc2 | 491 | echo Archiving $@... |
492 | $(RM) $@ | |
50fe7201 | 493 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) |
ef416fc2 | 494 | $(RANLIB) $@ |
495 | ||
496 | ||
d09495fa | 497 | # |
498 | # Make the test program, "testlpd". | |
499 | # | |
500 | ||
f8b3a85b | 501 | testlpd: testlpd.o ../cups/$(LIBCUPSSTATIC) cups-lpd |
d09495fa | 502 | echo Linking $@... |
f8b3a85b | 503 | $(CC) $(LDFLAGS) -o testlpd testlpd.o ../cups/$(LIBCUPSSTATIC) \ |
c168a833 | 504 | $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI) |
d09495fa | 505 | |
506 | ||
ef416fc2 | 507 | # |
508 | # testmime | |
509 | # | |
510 | ||
f8b3a85b | 511 | testmime: testmime.o libcupsmime.a ../cups/$(LIBCUPSSTATIC) |
ef416fc2 | 512 | echo Linking $@... |
c9fc04c6 | 513 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testmime.o libcupsmime.a \ |
f8b3a85b | 514 | ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(SSLLIBS) \ |
c168a833 | 515 | $(DNSSDLIBS) $(LIBGSSAPI) |
c9fc04c6 MS |
516 | echo Running MIME tests... |
517 | ./testmime | |
ef416fc2 | 518 | |
519 | ||
520 | # | |
521 | # Make the test program, "testspeed". | |
522 | # | |
523 | ||
f8b3a85b | 524 | testspeed: testspeed.o ../cups/$(LIBCUPSSTATIC) |
ef416fc2 | 525 | echo Linking $@... |
f8b3a85b | 526 | $(CC) $(LDFLAGS) -o testspeed testspeed.o ../cups/$(LIBCUPSSTATIC) \ |
c168a833 | 527 | $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI) |
ef416fc2 | 528 | |
529 | ||
07725fee | 530 | # |
531 | # Make the test program, "testsub". | |
532 | # | |
533 | ||
f8b3a85b | 534 | testsub: testsub.o ../cups/$(LIBCUPSSTATIC) |
07725fee | 535 | echo Linking $@... |
f8b3a85b | 536 | $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/$(LIBCUPSSTATIC) \ |
c168a833 | 537 | $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI) |
07725fee | 538 | |
539 | ||
84315f46 MS |
540 | # |
541 | # Lines of code computation... | |
542 | # | |
543 | ||
544 | sloc: | |
545 | echo "cupsd: \c" | |
9c80ffa2 | 546 | sloccount $(CUPSDOBJS:.o=.c) $(LIBOBJS:.o=.c) cups-driverd.cxx cups-lpd.c 2>/dev/null | grep "Total Physical" | awk '{print $$9}' |
84315f46 MS |
547 | |
548 | ||
ef416fc2 | 549 | # |
550 | # Dependencies... | |
551 | # | |
321d8d57 | 552 | |
ef416fc2 | 553 | include Dependencies |
554 | ||
555 | ||
556 | # | |
f2d18633 | 557 | # End of "$Id$". |
ef416fc2 | 558 | # |