]> git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / Makefile
1 #
2 # "$Id: Makefile 6565 2007-06-18 23:50:16Z mike $"
3 #
4 # Scheduler Makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
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 select.o \
47 server.o \
48 statbuf.o \
49 subscriptions.o \
50 sysman.o
51 MIMEOBJS = \
52 filter.o \
53 mime.o \
54 type.o
55 OBJS = \
56 $(CUPSDOBJS) \
57 $(MIMEOBJS) \
58 cups-deviced.o \
59 cups-driverd.o \
60 cups-lpd.o \
61 cups-polld.o \
62 testdirsvc.o \
63 testlpd.o \
64 testmime.o \
65 testspeed.o \
66 testsub.o \
67 util.o
68 TARGETS = \
69 cupsd \
70 cups-deviced \
71 cups-driverd \
72 cups-lpd \
73 cups-polld \
74 libmime.a \
75 testdirsvc \
76 testlpd \
77 testmime \
78 testspeed \
79 testsub
80
81
82 #
83 # Make everything...
84 #
85
86 all: $(TARGETS)
87
88
89 #
90 # Clean all object files...
91 #
92
93 clean:
94 $(RM) $(OBJS)
95 $(RM) $(TARGETS)
96
97
98 #
99 # Update dependencies (without system header dependencies...)
100 #
101
102 depend:
103 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
104
105
106 #
107 # Install the scheduler...
108 #
109
110 install: all
111 echo Creating $(SBINDIR)...
112 $(INSTALL_DIR) -m 755 $(SBINDIR)
113 echo Installing cupsd in $(SBINDIR)...
114 $(INSTALL_BIN) cupsd $(SBINDIR)
115 echo Creating $(SERVERBIN)...
116 $(INSTALL_DIR) -m 755 $(SERVERBIN)
117 echo Creating $(SERVERBIN)/daemon...
118 $(INSTALL_DIR) -m 755 $(SERVERBIN)/daemon
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...
125 $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver
126 echo Creating $(SERVERROOT)...
127 $(INSTALL_DIR) -m 755 $(SERVERROOT)
128 -chgrp $(CUPS_GROUP) $(SERVERROOT)
129 echo Creating $(SERVERROOT)/interfaces...
130 $(INSTALL_DIR) -m 755 $(SERVERROOT)/interfaces
131 -chgrp $(CUPS_GROUP) $(SERVERROOT)/interfaces
132 echo Creating $(SERVERROOT)/ppd...
133 $(INSTALL_DIR) -m 755 $(SERVERROOT)/ppd
134 -chgrp $(CUPS_GROUP) $(SERVERROOT)/ppd
135 echo Creating $(SERVERROOT)/ssl...
136 $(INSTALL_DIR) -m 700 $(SERVERROOT)/ssl
137 -chgrp $(CUPS_GROUP) $(SERVERROOT)/ssl
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
145 echo Creating $(LOGDIR)...
146 $(INSTALL_DIR) -m 755 $(LOGDIR)
147 echo Creating $(REQUESTS)...
148 $(INSTALL_DIR) -m 710 $(REQUESTS)
149 -chgrp $(CUPS_GROUP) $(REQUESTS)
150 echo Creating $(REQUESTS)/tmp...
151 $(INSTALL_DIR) -m 1770 $(REQUESTS)/tmp
152 -chgrp $(CUPS_GROUP) $(REQUESTS)/tmp
153 echo Creating $(CACHEDIR)...
154 $(INSTALL_DIR) -m 775 $(CACHEDIR)
155 -chgrp $(CUPS_GROUP) $(CACHEDIR)
156 # echo Creating $(CACHEDIR)/ppd...
157 # $(INSTALL_DIR) -m 755 $(CACHEDIR)/ppd
158 # -chgrp $(CUPS_GROUP) $(CACHEDIR)/ppd
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
165
166
167 #
168 # Uninstall the scheduler...
169 #
170
171 uninstall: 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
192 #
193 # Make the scheduler executable, "cupsd".
194 #
195
196 cupsd: $(CUPSDOBJS) libmime.a ../cups/$(LIBCUPS)
197 echo Linking $@...
198 $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) libmime.a \
199 $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
200 $(LIBPAPER) $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBS) \
201 $(LIBGSSAPI)
202
203 cupsd-static: $(CUPSDOBJS) libmime.a ../cups/libcups.a
204 echo Linking $@...
205 $(CC) $(LDFLAGS) -o cupsd-static $(CUPSDOBJS) libmime.a \
206 $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
207 ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
208 $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
209
210
211 #
212 # Make the device daemon, "cups-deviced".
213 #
214
215 cups-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
224 cups-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
233 cups-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
242 cups-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
251 libmime.a: $(MIMEOBJS)
252 echo Archiving $@...
253 $(RM) $@
254 $(AR) $(ARFLAGS) $@ $(MIMEOBJS)
255 $(RANLIB) $@
256
257
258 #
259 # Make the test program, "testdirsvc".
260 #
261
262 testdirsvc: testdirsvc.o
263 echo Linking $@...
264 $(CC) $(LDFLAGS) -o testdirsvc testdirsvc.o $(COMMONLIBS) $(NETLIBS)
265
266
267 #
268 # Make the test program, "testlpd".
269 #
270
271 testlpd: testlpd.o ../cups/libcups.a cups-lpd
272 echo Linking $@...
273 $(CC) $(LDFLAGS) -o testlpd testlpd.o ../cups/libcups.a \
274 $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
275
276
277 #
278 # testmime
279 #
280
281 testmime: testmime.o libmime.a ../cups/libcups.a
282 echo Linking $@...
283 $(CC) $(LDFLAGS) -o $@ testmime.o libmime.a ../cups/libcups.a \
284 $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
285
286
287 #
288 # Make the test program, "testspeed".
289 #
290
291 testspeed: testspeed.o ../cups/libcups.a
292 echo Linking $@...
293 $(CC) $(LDFLAGS) -o testspeed testspeed.o ../cups/libcups.a \
294 $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
295
296
297 #
298 # Make the test program, "testsub".
299 #
300
301 testsub: testsub.o ../cups/libcups.a
302 echo Linking $@...
303 $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \
304 $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
305
306
307 #
308 # Dependencies...
309 #
310
311 include Dependencies
312
313
314 #
315 # End of "$Id: Makefile 6565 2007-06-18 23:50:16Z mike $".
316 #