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