]> git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / Makefile
1 #
2 # "$Id: Makefile 6291 2007-02-19 21:54:27Z 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 echo Creating $(STATEDIR)...
139 $(INSTALL_DIR) -m 755 $(STATEDIR)
140 echo Creating $(STATEDIR)/certs...
141 $(INSTALL_DIR) -m 511 $(STATEDIR)/certs
142 -chgrp $(CUPS_PRIMARY_SYSTEM_GROUP) $(STATEDIR)/certs
143 echo Creating $(LOGDIR)...
144 $(INSTALL_DIR) -m 755 $(LOGDIR)
145 echo Creating $(REQUESTS)...
146 $(INSTALL_DIR) -m 710 $(REQUESTS)
147 -chgrp $(CUPS_GROUP) $(REQUESTS)
148 echo Creating $(REQUESTS)/tmp...
149 $(INSTALL_DIR) -m 1770 $(REQUESTS)/tmp
150 -chgrp $(CUPS_GROUP) $(REQUESTS)/tmp
151 echo Creating $(CACHEDIR)...
152 $(INSTALL_DIR) -m 775 $(CACHEDIR)
153 -chgrp $(CUPS_GROUP) $(CACHEDIR)
154 # echo Creating $(CACHEDIR)/ppd...
155 # $(INSTALL_DIR) -m 755 $(CACHEDIR)/ppd
156 # -chgrp $(CUPS_GROUP) $(CACHEDIR)/ppd
157
158
159 #
160 # Uninstall the scheduler...
161 #
162
163 uninstall: all
164 $(RM) $(SBINDIR)/cupsd
165 $(RM) $(SERVERBIN)/daemon/cups-deviced
166 $(RM) $(SERVERBIN)/daemon/cups-driverd
167 $(RM) $(SERVERBIN)/daemon/cups-lpd
168 $(RM) $(SERVERBIN)/daemon/cups-polld
169 -$(RMDIR) $(STATEDIR)/certs
170 -$(RMDIR) $(STATEDIR)
171 -$(RMDIR) $(SERVERROOT)/ppd
172 -$(RMDIR) $(SERVERROOT)/interfaces
173 -$(RMDIR) $(SERVERROOT)
174 -$(RMDIR) $(SERVERBIN)/driver
175 -$(RMDIR) $(SERVERBIN)/daemon
176 -$(RMDIR) $(SERVERBIN)
177 -$(RMDIR) $(SBINDIR)
178 -$(RMDIR) $(REQUESTS)/tmp
179 -$(RMDIR) $(REQUESTS)
180 -$(RMDIR) $(LOGDIR)
181 -$(RMDIR) $(CACHEDIR)
182
183
184 #
185 # Make the scheduler executable, "cupsd".
186 #
187
188 cupsd: $(CUPSDOBJS) libmime.a ../cups/$(LIBCUPS)
189 echo Linking $@...
190 $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) libmime.a \
191 $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
192 $(LIBPAPER) $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBS) \
193 $(LIBGSSAPI)
194
195 cupsd-static: $(CUPSDOBJS) libmime.a ../cups/libcups.a
196 echo Linking $@...
197 $(CC) $(LDFLAGS) -o cupsd-static $(CUPSDOBJS) libmime.a \
198 $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
199 ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
200 $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
201
202
203 #
204 # Make the device daemon, "cups-deviced".
205 #
206
207 cups-deviced: cups-deviced.o util.o ../cups/$(LIBCUPS)
208 echo Linking $@...
209 $(CC) $(LDFLAGS) -o cups-deviced cups-deviced.o util.o $(LIBS)
210
211
212 #
213 # Make the driver daemon, "cups-driverd".
214 #
215
216 cups-driverd: cups-driverd.o util.o ../cups/$(LIBCUPS)
217 echo Linking $@...
218 $(CC) $(LDFLAGS) -o cups-driverd cups-driverd.o util.o $(LIBS)
219
220
221 #
222 # Make the line printer daemon, "cups-lpd".
223 #
224
225 cups-lpd: cups-lpd.o ../cups/$(LIBCUPS)
226 echo Linking $@...
227 $(CC) $(LDFLAGS) -o cups-lpd cups-lpd.o $(LIBS)
228
229
230 #
231 # Make the polling daemon, "cups-polld".
232 #
233
234 cups-polld: cups-polld.o ../cups/$(LIBCUPS)
235 echo Linking $@...
236 $(CC) $(LDFLAGS) -o cups-polld cups-polld.o $(LIBS)
237
238
239 #
240 # libmime.a
241 #
242
243 libmime.a: $(MIMEOBJS)
244 echo Archiving $@...
245 $(RM) $@
246 $(AR) $(ARFLAGS) $@ $(MIMEOBJS)
247 $(RANLIB) $@
248
249
250 #
251 # Make the test program, "testdirsvc".
252 #
253
254 testdirsvc: testdirsvc.o
255 echo Linking $@...
256 $(CC) $(LDFLAGS) -o testdirsvc testdirsvc.o $(COMMONLIBS) $(NETLIBS)
257
258
259 #
260 # Make the test program, "testlpd".
261 #
262
263 testlpd: testlpd.o ../cups/libcups.a cups-lpd
264 echo Linking $@...
265 $(CC) $(LDFLAGS) -o testlpd testlpd.o ../cups/libcups.a \
266 $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
267
268
269 #
270 # testmime
271 #
272
273 testmime: testmime.o libmime.a ../cups/libcups.a
274 echo Linking $@...
275 $(CC) $(LDFLAGS) -o $@ testmime.o libmime.a ../cups/libcups.a \
276 $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
277
278
279 #
280 # Make the test program, "testspeed".
281 #
282
283 testspeed: testspeed.o ../cups/libcups.a
284 echo Linking $@...
285 $(CC) $(LDFLAGS) -o testspeed testspeed.o ../cups/libcups.a \
286 $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
287
288
289 #
290 # Make the test program, "testsub".
291 #
292
293 testsub: testsub.o ../cups/libcups.a
294 echo Linking $@...
295 $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \
296 $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
297
298
299 #
300 # Dependencies...
301 #
302
303 include Dependencies
304
305
306 #
307 # End of "$Id: Makefile 6291 2007-02-19 21:54:27Z mike $".
308 #