]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
75bd9771 | 2 | # "$Id: Makefile 7687 2008-06-24 01:28:36Z mike $" |
ef416fc2 | 3 | # |
4 | # Backend makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
91c84a35 | 6 | # Copyright 2007-2008 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 | ||
7a14d768 | 20 | RBACKENDS = ipp lpd $(MDNS) |
7ff4fea9 | 21 | UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb |
568fa3fa MS |
22 | TARGETS = test1284 testbackend testsupplies \ |
23 | libbackend.a $(RBACKENDS) $(UBACKENDS) | |
7a14d768 MS |
24 | LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o |
25 | OBJS = ipp.o lpd.o mdns.o pap.o parallel.o scsi.o serial.o snmp.o \ | |
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 | ||
47 | unittests: | |
48 | ||
49 | ||
ef416fc2 | 50 | # |
51 | # Clean all object files... | |
52 | # | |
53 | ||
54 | clean: | |
26d47ec6 | 55 | $(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http |
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 | |
09a101d6 | 94 | if test "x$(SYMROOT)" != "x"; then \ |
95 | $(INSTALL_DIR) $(SYMROOT); \ | |
96 | for file in $(TARGETS); do \ | |
97 | cp $$file $(SYMROOT); \ | |
98 | done \ | |
99 | fi | |
ef416fc2 | 100 | |
101 | ||
50fe7201 MS |
102 | # |
103 | # Install headers... | |
104 | # | |
105 | ||
106 | install-headers: | |
107 | ||
108 | ||
109 | # | |
110 | # Install libraries... | |
111 | # | |
112 | ||
113 | install-libs: | |
114 | ||
115 | ||
757d2cad | 116 | # |
117 | # Uninstall all targets... | |
118 | # | |
119 | ||
120 | uninstall: | |
121 | for file in $(RBACKENDS) $(UBACKENDS); do \ | |
122 | $(RM) $(SERVERBIN)/backend/$$file; \ | |
123 | done | |
124 | $(RM) $(SERVERBIN)/backend/http | |
125 | -$(RMDIR) $(SERVERBIN)/backend | |
126 | -$(RMDIR) $(SERVERBIN) | |
127 | ||
128 | ||
ef416fc2 | 129 | # |
568fa3fa | 130 | # test1284 |
ef416fc2 | 131 | # |
132 | ||
568fa3fa | 133 | test1284: test1284.o ../cups/libcups.a |
ef416fc2 | 134 | echo Linking $@... |
568fa3fa | 135 | $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \ |
ae71f5de | 136 | $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 137 | |
138 | ||
139 | # | |
568fa3fa | 140 | # testbackend |
ef416fc2 | 141 | # |
142 | ||
568fa3fa | 143 | testbackend: testbackend.o ../cups/libcups.a |
ef416fc2 | 144 | echo Linking $@... |
568fa3fa | 145 | $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \ |
ae71f5de | 146 | $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 147 | |
148 | ||
568fa3fa MS |
149 | # |
150 | # testsupplies | |
151 | # | |
152 | ||
153 | testsupplies: testsupplies.o libbackend.a ../cups/libcups.a | |
154 | echo Linking $@... | |
155 | $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \ | |
156 | ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) | |
157 | ||
158 | ||
ed486911 | 159 | # |
160 | # libbackend.a | |
161 | # | |
162 | ||
163 | libbackend.a: $(LIBOBJS) | |
164 | echo Archiving $@... | |
165 | $(RM) $@ | |
166 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
167 | $(RANLIB) $@ | |
168 | ||
169 | ||
ef416fc2 | 170 | # |
171 | # ipp | |
172 | # | |
173 | ||
7a14d768 | 174 | ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 175 | echo Linking $@... |
7a14d768 | 176 | $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS) |
ef416fc2 | 177 | $(RM) http |
178 | $(LN) ipp http | |
179 | ||
180 | ||
181 | # | |
182 | # lpd | |
183 | # | |
184 | ||
7a14d768 | 185 | lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 186 | echo Linking $@... |
7a14d768 MS |
187 | $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS) |
188 | ||
189 | ||
190 | # | |
191 | # mdns | |
192 | # | |
193 | ||
194 | mdns: mdns.o ../cups/$(LIBCUPS) libbackend.a | |
195 | echo Linking $@... | |
196 | $(CC) $(LDFLAGS) -o mdns mdns.o libbackend.a $(LIBS) | |
ef416fc2 | 197 | |
198 | ||
a74454a7 | 199 | # |
200 | # pap | |
201 | # | |
202 | ||
203 | pap: pap.o ../cups/$(LIBCUPS) | |
204 | echo Linking $@... | |
205 | $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk | |
206 | ||
207 | ||
ef416fc2 | 208 | # |
209 | # parallel | |
210 | # | |
211 | ||
ed486911 | 212 | parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 213 | echo Linking $@... |
ed486911 | 214 | $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS) |
ef416fc2 | 215 | |
216 | ||
217 | # | |
218 | # scsi | |
219 | # | |
220 | ||
221 | scsi: scsi.o ../cups/$(LIBCUPS) | |
222 | echo Linking $@... | |
223 | $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS) | |
224 | ||
225 | scsi.o: scsi.c scsi-irix.c scsi-linux.c | |
226 | ||
227 | ||
228 | # | |
229 | # serial | |
230 | # | |
231 | ||
ed486911 | 232 | serial: serial.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 233 | echo Linking $@... |
ed486911 | 234 | $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS) |
ef416fc2 | 235 | |
236 | ||
89d46774 | 237 | # |
238 | # snmp | |
239 | # | |
240 | ||
ed486911 | 241 | snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a |
89d46774 | 242 | echo Linking $@... |
ed486911 | 243 | $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS) |
89d46774 | 244 | |
245 | ||
ef416fc2 | 246 | # |
247 | # socket | |
248 | # | |
249 | ||
ed486911 | 250 | socket: socket.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 251 | echo Linking $@... |
ed486911 | 252 | $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS) |
ef416fc2 | 253 | |
254 | ||
255 | # | |
256 | # usb | |
257 | # | |
258 | ||
ed486911 | 259 | usb: usb.o ../cups/$(LIBCUPS) libbackend.a |
ef416fc2 | 260 | echo Linking $@... |
75bd9771 MS |
261 | $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) $(BACKLIBS) $(LIBS) |
262 | usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c | |
ef416fc2 | 263 | |
264 | ||
265 | # | |
266 | # Dependencies... | |
267 | # | |
268 | ||
269 | include Dependencies | |
270 | ||
271 | ||
272 | # | |
75bd9771 | 273 | # End of "$Id: Makefile 7687 2008-06-24 01:28:36Z mike $". |
ef416fc2 | 274 | # |