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