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