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