]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b19ccc9e | 2 | # "$Id: Makefile 7924 2008-09-10 17:36:13Z mike $" |
ef416fc2 | 3 | # |
f8b3a85b | 4 | # Backend makefile for CUPS. |
ef416fc2 | 5 | # |
eac3a0a0 | 6 | # Copyright 2007-2011 by Apple Inc. |
09a101d6 | 7 | # Copyright 1997-2007 by Easy Software Products, all rights reserved. |
ef416fc2 | 8 | # |
9 | # These coded instructions, statements, and computer programs are the | |
bc44d920 | 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/". | |
ef416fc2 | 14 | # |
15 | # This file is subject to the Apple OS-Developed Software exception. | |
16 | # | |
17 | ||
18 | include ../Makedefs | |
19 | ||
f8b3a85b MS |
20 | # |
21 | # Object files... | |
22 | # | |
23 | ||
a4845881 MS |
24 | RBACKENDS = \ |
25 | ipp \ | |
26 | lpd \ | |
27 | $(DNSSD_BACKEND) | |
28 | UBACKENDS = \ | |
29 | snmp \ | |
30 | socket \ | |
31 | usb | |
32 | UNITTESTS = \ | |
33 | test1284 \ | |
34 | testbackend \ | |
35 | testsupplies | |
36 | TARGETS = \ | |
37 | libbackend.a \ | |
38 | $(RBACKENDS) \ | |
39 | $(UBACKENDS) | |
40 | LIBOBJS = \ | |
41 | ieee1284.o \ | |
42 | network.o \ | |
43 | runloop.o \ | |
44 | snmp-supplies.o | |
45 | OBJS = \ | |
46 | ipp.o \ | |
47 | lpd.o \ | |
48 | dnssd.o \ | |
49 | snmp.o \ | |
50 | socket.o \ | |
51 | test1284.o \ | |
52 | testbackend.o \ | |
53 | testsupplies.o \ | |
54 | usb.o | |
ef416fc2 | 55 | |
56 | ||
57 | # | |
58 | # Make all targets... | |
59 | # | |
60 | ||
61 | all: $(TARGETS) | |
62 | ||
63 | ||
c9fc04c6 MS |
64 | # |
65 | # Make library targets... | |
66 | # | |
67 | ||
68 | libs: | |
69 | ||
70 | ||
5f64df29 MS |
71 | # |
72 | # Make unit tests... | |
73 | # | |
74 | ||
1340db2d | 75 | unittests: $(UNITTESTS) |
5f64df29 MS |
76 | |
77 | ||
ef416fc2 | 78 | # |
79 | # Clean all object files... | |
80 | # | |
81 | ||
82 | clean: | |
a4845881 | 83 | $(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http https ipps mdns |
ef416fc2 | 84 | |
85 | ||
86 | # | |
87 | # Update dependencies (without system header dependencies...) | |
88 | # | |
89 | ||
90 | depend: | |
91 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 | |
92 | ||
93 | ||
94 | # | |
95 | # Install all targets... | |
96 | # | |
97 | ||
50fe7201 MS |
98 | install: all install-data install-headers install-libs install-exec |
99 | ||
100 | ||
101 | # | |
102 | # Install data files... | |
103 | # | |
104 | ||
105 | install-data: | |
106 | ||
107 | ||
108 | # | |
109 | # Install programs... | |
110 | # | |
111 | ||
eac3a0a0 MS |
112 | install-exec: $(INSTALLXPC) |
113 | echo Installing backends in $(SERVERBIN)/backend | |
bd7854cb | 114 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend |
e00b005a | 115 | for file in $(RBACKENDS); do \ |
839a51c8 | 116 | $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \ |
e00b005a | 117 | done |
118 | for file in $(UBACKENDS); do \ | |
ef416fc2 | 119 | $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \ |
120 | done | |
eac3a0a0 MS |
121 | for file in $(IPPALIASES); do \ |
122 | $(RM) $(SERVERBIN)/backend/$$file; \ | |
123 | $(LN) ipp $(SERVERBIN)/backend/$$file; \ | |
124 | done | |
49d87452 MS |
125 | if test "x$(DNSSD_BACKEND)" != x; then \ |
126 | $(RM) $(SERVERBIN)/backend/mdns; \ | |
127 | $(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \ | |
128 | fi | |
09a101d6 | 129 | if test "x$(SYMROOT)" != "x"; then \ |
130 | $(INSTALL_DIR) $(SYMROOT); \ | |
131 | for file in $(TARGETS); do \ | |
132 | cp $$file $(SYMROOT); \ | |
133 | done \ | |
134 | fi | |
ef416fc2 | 135 | |
eac3a0a0 MS |
136 | install-xpc: ipp |
137 | echo Installing XPC backends in $(SERVERBIN)/apple | |
138 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/apple | |
139 | $(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple | |
140 | for file in $(IPPALIASES); do \ | |
141 | $(RM) $(SERVERBIN)/apple/$$file; \ | |
142 | $(LN) ipp $(SERVERBIN)/apple/$$file; \ | |
143 | done | |
144 | ||
ef416fc2 | 145 | |
50fe7201 MS |
146 | # |
147 | # Install headers... | |
148 | # | |
149 | ||
150 | install-headers: | |
151 | ||
152 | ||
153 | # | |
154 | # Install libraries... | |
155 | # | |
156 | ||
157 | install-libs: | |
158 | ||
159 | ||
757d2cad | 160 | # |
161 | # Uninstall all targets... | |
162 | # | |
163 | ||
164 | uninstall: | |
eac3a0a0 MS |
165 | $(RM) $(SERVERBIN)/apple/ipp |
166 | for file in $(IPPALIASES); do \ | |
167 | $(RM) $(SERVERBIN)/apple/$$file; \ | |
168 | done | |
169 | -$(RMDIR) $(SERVERBIN)/apple | |
757d2cad | 170 | for file in $(RBACKENDS) $(UBACKENDS); do \ |
171 | $(RM) $(SERVERBIN)/backend/$$file; \ | |
172 | done | |
eac3a0a0 MS |
173 | for file in $(IPPALIASES); do \ |
174 | $(RM) $(SERVERBIN)/backend/$$file; \ | |
175 | done | |
757d2cad | 176 | -$(RMDIR) $(SERVERBIN)/backend |
177 | -$(RMDIR) $(SERVERBIN) | |
178 | ||
179 | ||
ef416fc2 | 180 | # |
568fa3fa | 181 | # test1284 |
ef416fc2 | 182 | # |
183 | ||
f8b3a85b | 184 | test1284: test1284.o ../cups/$(LIBCUPSSTATIC) |
ef416fc2 | 185 | echo Linking $@... |
f8b3a85b | 186 | $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \ |
c168a833 | 187 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 188 | |
189 | ||
190 | # | |
568fa3fa | 191 | # testbackend |
ef416fc2 | 192 | # |
193 | ||
f8b3a85b | 194 | testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC) |
ef416fc2 | 195 | echo Linking $@... |
f8b3a85b | 196 | $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \ |
c168a833 | 197 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 198 | |
199 | ||
568fa3fa MS |
200 | # |
201 | # testsupplies | |
202 | # | |
203 | ||
f8b3a85b | 204 | testsupplies: testsupplies.o libbackend.a ../cups/$(LIBCUPSSTATIC) |
568fa3fa MS |
205 | echo Linking $@... |
206 | $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \ | |
f8b3a85b | 207 | ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ |
c168a833 | 208 | $(COMMONLIBS) $(LIBZ) |
568fa3fa MS |
209 | |
210 | ||
ed486911 | 211 | # |
212 | # libbackend.a | |
213 | # | |
214 | ||
215 | libbackend.a: $(LIBOBJS) | |
216 | echo Archiving $@... | |
217 | $(RM) $@ | |
218 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
219 | $(RANLIB) $@ | |
220 | ||
221 | ||
c5571a1d MS |
222 | # |
223 | # dnssd | |
224 | # | |
225 | ||
226 | dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a | |
227 | echo Linking $@... | |
228 | $(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS) | |
229 | $(RM) mdns | |
230 | $(LN) dnssd mdns | |
231 | ||
232 | ||
ef416fc2 | 233 | # |
234 | # ipp | |
235 | # | |
236 | ||
7a14d768 | 237 | ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 238 | echo Linking $@... |
7a14d768 | 239 | $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS) |
ef416fc2 | 240 | $(RM) http |
241 | $(LN) ipp http | |
242 | ||
243 | ||
244 | # | |
245 | # lpd | |
246 | # | |
247 | ||
7a14d768 | 248 | lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 249 | echo Linking $@... |
7a14d768 MS |
250 | $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS) |
251 | ||
252 | ||
89d46774 | 253 | # |
254 | # snmp | |
255 | # | |
256 | ||
ed486911 | 257 | snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a |
89d46774 | 258 | echo Linking $@... |
ed486911 | 259 | $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS) |
89d46774 | 260 | |
261 | ||
ef416fc2 | 262 | # |
263 | # socket | |
264 | # | |
265 | ||
ed486911 | 266 | socket: socket.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 267 | echo Linking $@... |
ed486911 | 268 | $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS) |
ef416fc2 | 269 | |
270 | ||
271 | # | |
272 | # usb | |
273 | # | |
274 | ||
ed486911 | 275 | usb: usb.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 276 | echo Linking $@... |
58dc1933 | 277 | $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \ |
9a4f8274 | 278 | $(BACKLIBS) $(LIBS) |
75bd9771 | 279 | usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c |
ef416fc2 | 280 | |
281 | ||
282 | # | |
283 | # Dependencies... | |
284 | # | |
285 | ||
286 | include Dependencies | |
287 | ||
288 | ||
289 | # | |
b19ccc9e | 290 | # End of "$Id: Makefile 7924 2008-09-10 17:36:13Z mike $". |
ef416fc2 | 291 | # |