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