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