]> git.ipfire.org Git - thirdparty/cups.git/blob - backend/Makefile
Import CUPS 1.4svn-r7908.
[thirdparty/cups.git] / backend / Makefile
1 #
2 # "$Id: Makefile 7687 2008-06-24 01:28:36Z mike $"
3 #
4 # Backend makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 2007-2008 by Apple Inc.
7 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
8 #
9 # These coded instructions, statements, and computer programs are the
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/".
14 #
15 # This file is subject to the Apple OS-Developed Software exception.
16 #
17
18 include ../Makedefs
19
20 RBACKENDS = ipp lpd $(DNSSD_BACKEND)
21 UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
22 TARGETS = test1284 testbackend testsupplies \
23 libbackend.a $(RBACKENDS) $(UBACKENDS)
24 LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o
25 OBJS = ipp.o lpd.o dnssd.o pap.o parallel.o scsi.o serial.o snmp.o \
26 socket.o test1284.o testbackend.o testsupplies.o usb.o
27
28
29 #
30 # Make all targets...
31 #
32
33 all: $(TARGETS)
34
35
36 #
37 # Make library targets...
38 #
39
40 libs:
41
42
43 #
44 # Make unit tests...
45 #
46
47 unittests:
48
49
50 #
51 # Clean all object files...
52 #
53
54 clean:
55 $(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http mdns
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
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:
85 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
86 for file in $(RBACKENDS); do \
87 $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
88 done
89 for file in $(UBACKENDS); do \
90 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
91 done
92 $(RM) $(SERVERBIN)/backend/http
93 $(LN) ipp $(SERVERBIN)/backend/http
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
100
101
102 #
103 # Install headers...
104 #
105
106 install-headers:
107
108
109 #
110 # Install libraries...
111 #
112
113 install-libs:
114
115
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
129 #
130 # test1284
131 #
132
133 test1284: test1284.o ../cups/libcups.a
134 echo Linking $@...
135 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
136 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
137
138
139 #
140 # testbackend
141 #
142
143 testbackend: testbackend.o ../cups/libcups.a
144 echo Linking $@...
145 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
146 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
147
148
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
159 #
160 # libbackend.a
161 #
162
163 libbackend.a: $(LIBOBJS)
164 echo Archiving $@...
165 $(RM) $@
166 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
167 $(RANLIB) $@
168
169
170 #
171 # dnssd
172 #
173
174 dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
175 echo Linking $@...
176 $(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
177 $(RM) mdns
178 $(LN) dnssd mdns
179
180
181 #
182 # ipp
183 #
184
185 ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
186 echo Linking $@...
187 $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
188 $(RM) http
189 $(LN) ipp http
190
191
192 #
193 # lpd
194 #
195
196 lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
197 echo Linking $@...
198 $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
199
200
201 #
202 # pap
203 #
204
205 pap: pap.o ../cups/$(LIBCUPS)
206 echo Linking $@...
207 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
208
209
210 #
211 # parallel
212 #
213
214 parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
215 echo Linking $@...
216 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
217
218
219 #
220 # scsi
221 #
222
223 scsi: scsi.o ../cups/$(LIBCUPS)
224 echo Linking $@...
225 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
226
227 scsi.o: scsi.c scsi-irix.c scsi-linux.c
228
229
230 #
231 # serial
232 #
233
234 serial: serial.o ../cups/$(LIBCUPS) libbackend.a
235 echo Linking $@...
236 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
237
238
239 #
240 # snmp
241 #
242
243 snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
244 echo Linking $@...
245 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
246
247
248 #
249 # socket
250 #
251
252 socket: socket.o ../cups/$(LIBCUPS) libbackend.a
253 echo Linking $@...
254 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
255
256
257 #
258 # usb
259 #
260
261 usb: usb.o ../cups/$(LIBCUPS) libbackend.a
262 echo Linking $@...
263 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
264 $(BACKLIBS) $(LIBS)
265 usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
266
267
268 #
269 # Dependencies...
270 #
271
272 include Dependencies
273
274
275 #
276 # End of "$Id: Makefile 7687 2008-06-24 01:28:36Z mike $".
277 #