]> git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / Makefile
1 #
2 # "$Id: Makefile 6664 2007-07-13 17:41:02Z mike $"
3 #
4 # Scheduler Makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 2007 by Apple Inc.
7 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
8 #
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/".
14 #
15
16 include ../Makedefs
17
18 CUPSDOBJS = \
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 \
37 select.o \
38 server.o \
39 statbuf.o \
40 subscriptions.o \
41 sysman.o
42 MIMEOBJS = \
43 filter.o \
44 mime.o \
45 type.o
46 OBJS = \
47 $(CUPSDOBJS) \
48 $(MIMEOBJS) \
49 cupsfilter.o \
50 cups-deviced.o \
51 cups-driverd.o \
52 cups-lpd.o \
53 cups-polld.o \
54 testdirsvc.o \
55 testlpd.o \
56 testmime.o \
57 testspeed.o \
58 testsub.o \
59 util.o
60 TARGETS = \
61 cupsd \
62 cupsfilter \
63 cups-deviced \
64 cups-driverd \
65 cups-lpd \
66 cups-polld \
67 libmime.a \
68 testdirsvc \
69 testlpd \
70 testmime \
71 testspeed \
72 testsub
73
74
75 #
76 # Make everything...
77 #
78
79 all: $(TARGETS)
80
81
82 #
83 # Clean all object files...
84 #
85
86 clean:
87 $(RM) $(OBJS)
88 $(RM) $(TARGETS)
89
90
91 #
92 # Update dependencies (without system header dependencies...)
93 #
94
95 depend:
96 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
97
98
99 #
100 # Install the scheduler...
101 #
102
103 install: all
104 echo Creating $(SBINDIR)...
105 $(INSTALL_DIR) -m 755 $(SBINDIR)
106 echo Installing cupsd in $(SBINDIR)...
107 $(INSTALL_BIN) cupsd $(SBINDIR)
108 echo Installing cupsfilter in $(SBINDIR)...
109 $(INSTALL_BIN) cupsfilter $(SBINDIR)
110 echo Creating $(SERVERBIN)...
111 $(INSTALL_DIR) -m 755 $(SERVERBIN)
112 echo Creating $(SERVERBIN)/daemon...
113 $(INSTALL_DIR) -m 755 $(SERVERBIN)/daemon
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...
120 $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver
121 echo Creating $(SERVERROOT)...
122 $(INSTALL_DIR) -m 755 $(SERVERROOT)
123 -chgrp $(CUPS_GROUP) $(SERVERROOT)
124 echo Creating $(SERVERROOT)/interfaces...
125 $(INSTALL_DIR) -m 755 $(SERVERROOT)/interfaces
126 -chgrp $(CUPS_GROUP) $(SERVERROOT)/interfaces
127 echo Creating $(SERVERROOT)/ppd...
128 $(INSTALL_DIR) -m 755 $(SERVERROOT)/ppd
129 -chgrp $(CUPS_GROUP) $(SERVERROOT)/ppd
130 -if test "x`uname`" != xDarwin; then \
131 echo Creating $(SERVERROOT)/ssl...; \
132 $(INSTALL_DIR) -m 700 $(SERVERROOT)/ssl; \
133 -chgrp $(CUPS_GROUP) $(SERVERROOT)/ssl; \
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
140 echo Creating $(LOGDIR)...
141 $(INSTALL_DIR) -m 755 $(LOGDIR)
142 echo Creating $(REQUESTS)...
143 $(INSTALL_DIR) -m 710 $(REQUESTS)
144 -chgrp $(CUPS_GROUP) $(REQUESTS)
145 echo Creating $(REQUESTS)/tmp...
146 $(INSTALL_DIR) -m 1770 $(REQUESTS)/tmp
147 -chgrp $(CUPS_GROUP) $(REQUESTS)/tmp
148 echo Creating $(CACHEDIR)...
149 $(INSTALL_DIR) -m 775 $(CACHEDIR)
150 -chgrp $(CUPS_GROUP) $(CACHEDIR)
151 # echo Creating $(CACHEDIR)/ppd...
152 # $(INSTALL_DIR) -m 755 $(CACHEDIR)/ppd
153 # -chgrp $(CUPS_GROUP) $(CACHEDIR)/ppd
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
160
161
162 #
163 # Uninstall the scheduler...
164 #
165
166 uninstall: 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
187 #
188 # Make the scheduler executable, "cupsd".
189 #
190
191 cupsd: $(CUPSDOBJS) libmime.a ../cups/$(LIBCUPS)
192 echo Linking $@...
193 $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) libmime.a \
194 $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
195 $(LIBPAPER) $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBS) \
196 $(LIBGSSAPI)
197
198 cupsd-static: $(CUPSDOBJS) libmime.a ../cups/libcups.a
199 echo Linking $@...
200 $(CC) $(LDFLAGS) -o cupsd-static $(CUPSDOBJS) libmime.a \
201 $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
202 ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
203 $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
204
205
206 #
207 # Make the cupsfilter utility.
208 #
209
210 cupsfilter: cupsfilter.o libmime.a ../cups/$(LIBCUPS)
211 echo Linking $@...
212 $(CC) $(LDFLAGS) -o cupsfilter cupsfilter.o libmime.a $(LIBS)
213
214
215 #
216 # Make the device daemon, "cups-deviced".
217 #
218
219 cups-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
228 cups-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
237 cups-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
246 cups-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
255 libmime.a: $(MIMEOBJS)
256 echo Archiving $@...
257 $(RM) $@
258 $(AR) $(ARFLAGS) $@ $(MIMEOBJS)
259 $(RANLIB) $@
260
261
262 #
263 # Make the test program, "testdirsvc".
264 #
265
266 testdirsvc: testdirsvc.o
267 echo Linking $@...
268 $(CC) $(LDFLAGS) -o testdirsvc testdirsvc.o $(COMMONLIBS) $(NETLIBS)
269
270
271 #
272 # Make the test program, "testlpd".
273 #
274
275 testlpd: testlpd.o ../cups/libcups.a cups-lpd
276 echo Linking $@...
277 $(CC) $(LDFLAGS) -o testlpd testlpd.o ../cups/libcups.a \
278 $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
279
280
281 #
282 # testmime
283 #
284
285 testmime: testmime.o libmime.a ../cups/libcups.a
286 echo Linking $@...
287 $(CC) $(LDFLAGS) -o $@ testmime.o libmime.a ../cups/libcups.a \
288 $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
289
290
291 #
292 # Make the test program, "testspeed".
293 #
294
295 testspeed: testspeed.o ../cups/libcups.a
296 echo Linking $@...
297 $(CC) $(LDFLAGS) -o testspeed testspeed.o ../cups/libcups.a \
298 $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
299
300
301 #
302 # Make the test program, "testsub".
303 #
304
305 testsub: testsub.o ../cups/libcups.a
306 echo Linking $@...
307 $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \
308 $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
309
310
311 #
312 # Dependencies...
313 #
314
315 include Dependencies
316
317
318 #
319 # End of "$Id: Makefile 6664 2007-07-13 17:41:02Z mike $".
320 #