]> git.ipfire.org Git - thirdparty/cups.git/blame - backend/Makefile
Update ipp documentation to reflect the behavior of configuring WiFi on IPP USB printers.
[thirdparty/cups.git] / backend / Makefile
CommitLineData
ef416fc2 1#
503b54c9 2# Backend makefile for CUPS.
ef416fc2 3#
21609267 4# Copyright 2007-2019 by Apple Inc.
503b54c9 5# Copyright 1997-2007 by Easy Software Products, all rights reserved.
ef416fc2 6#
e3101897 7# Licensed under Apache License v2.0. See the file "LICENSE" for more information.
ef416fc2 8#
9
10include ../Makedefs
11
f8b3a85b
MS
12#
13# Object files...
14#
15
f3c17241
MS
16# RBACKENDS are installed mode 0700 so cupsd will run them as root...
17#
38a68cfb
MS
18# UBACKENDS and ULBACKENDS are installed mode 0755 so cupsd will run them as
19# an unprivileged user...
f3c17241 20#
a621d151 21# See http://www.cups.org/doc/api-filter.html for more info...
a4845881
MS
22RBACKENDS = \
23 ipp \
24 lpd \
25 $(DNSSD_BACKEND)
26UBACKENDS = \
27 snmp \
38a68cfb
MS
28 socket
29ULBACKENDS = \
a4845881
MS
30 usb
31UNITTESTS = \
32 test1284 \
33 testbackend \
34 testsupplies
35TARGETS = \
36 libbackend.a \
37 $(RBACKENDS) \
38a68cfb
MS
38 $(UBACKENDS) \
39 $(ULBACKENDS)
a4845881
MS
40LIBOBJS = \
41 ieee1284.o \
42 network.o \
43 runloop.o \
44 snmp-supplies.o
45OBJS = \
46 ipp.o \
47 lpd.o \
48 dnssd.o \
49 snmp.o \
50 socket.o \
51 test1284.o \
52 testbackend.o \
53 testsupplies.o \
54 usb.o
ef416fc2 55
56
57#
58# Make all targets...
59#
60
61all: $(TARGETS)
62
63
c9fc04c6
MS
64#
65# Make library targets...
66#
67
38a68cfb 68libs: $(ULBACKENDS)
c9fc04c6
MS
69
70
5f64df29
MS
71#
72# Make unit tests...
73#
74
1340db2d 75unittests: $(UNITTESTS)
5f64df29
MS
76
77
ef416fc2 78#
79# Clean all object files...
80#
81
82clean:
6fb588e0 83 $(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http https ipps mdns socket-static
ef416fc2 84
85
86#
87# Update dependencies (without system header dependencies...)
88#
89
90depend:
12f89d24 91 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
ef416fc2 92
93
94#
95# Install all targets...
96#
97
50fe7201
MS
98install: all install-data install-headers install-libs install-exec
99
100
101#
102# Install data files...
103#
104
105install-data:
89a65306
MS
106 if test "x$(USBQUIRKS)" != x; then \
107 echo Installing USB quirks in $(USBQUIRKS); \
108 $(INSTALL_DIR) -m 755 $(USBQUIRKS); \
109 $(INSTALL_DATA) org.cups.usb-quirks $(USBQUIRKS); \
110 fi
50fe7201
MS
111
112
113#
114# Install programs...
115#
116
eac3a0a0
MS
117install-exec: $(INSTALLXPC)
118 echo Installing backends in $(SERVERBIN)/backend
bd7854cb 119 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
e00b005a 120 for file in $(RBACKENDS); do \
839a51c8 121 $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
e00b005a 122 done
123 for file in $(UBACKENDS); do \
ef416fc2 124 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
125 done
eac3a0a0
MS
126 for file in $(IPPALIASES); do \
127 $(RM) $(SERVERBIN)/backend/$$file; \
128 $(LN) ipp $(SERVERBIN)/backend/$$file; \
129 done
37e7e6e0 130 if test "x$(DNSSD_BACKEND)" != x -a `uname` = Darwin; then \
49d87452
MS
131 $(RM) $(SERVERBIN)/backend/mdns; \
132 $(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
133 fi
09a101d6 134 if test "x$(SYMROOT)" != "x"; then \
135 $(INSTALL_DIR) $(SYMROOT); \
c1420c87 136 for file in $(RBACKENDS) $(UBACKENDS); do \
09a101d6 137 cp $$file $(SYMROOT); \
c1420c87 138 dsymutil $(SYMROOT)/$$file; \
09a101d6 139 done \
140 fi
ef416fc2 141
eac3a0a0
MS
142install-xpc: ipp
143 echo Installing XPC backends in $(SERVERBIN)/apple
144 $(INSTALL_DIR) -m 755 $(SERVERBIN)/apple
145 $(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple
146 for file in $(IPPALIASES); do \
147 $(RM) $(SERVERBIN)/apple/$$file; \
148 $(LN) ipp $(SERVERBIN)/apple/$$file; \
149 done
150
ef416fc2 151
50fe7201
MS
152#
153# Install headers...
154#
155
156install-headers:
157
158
159#
160# Install libraries...
161#
162
163install-libs:
38a68cfb
MS
164 echo Installing backends in $(SERVERBIN)/backend
165 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
166 for file in $(ULBACKENDS); do \
167 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
168 done
169 if test "x$(SYMROOT)" != "x"; then \
170 $(INSTALL_DIR) $(SYMROOT); \
171 for file in $(ULBACKENDS); do \
172 cp $$file $(SYMROOT); \
173 dsymutil $(SYMROOT)/$$file; \
174 done \
175 fi
50fe7201
MS
176
177
757d2cad 178#
179# Uninstall all targets...
180#
181
182uninstall:
eac3a0a0
MS
183 $(RM) $(SERVERBIN)/apple/ipp
184 for file in $(IPPALIASES); do \
185 $(RM) $(SERVERBIN)/apple/$$file; \
186 done
187 -$(RMDIR) $(SERVERBIN)/apple
38a68cfb 188 for file in $(RBACKENDS) $(UBACKENDS) $(ULBACKENDS); do \
757d2cad 189 $(RM) $(SERVERBIN)/backend/$$file; \
190 done
eac3a0a0
MS
191 for file in $(IPPALIASES); do \
192 $(RM) $(SERVERBIN)/backend/$$file; \
193 done
757d2cad 194 -$(RMDIR) $(SERVERBIN)/backend
195 -$(RMDIR) $(SERVERBIN)
196
197
ef416fc2 198#
568fa3fa 199# test1284
ef416fc2 200#
201
f8b3a85b 202test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
ef416fc2 203 echo Linking $@...
3e391a8e 204 $(LD_CC) $(ALL_LDFLAGS) -o test1284 test1284.o $(LINKCUPSSTATIC)
00dbe99f 205 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
ef416fc2 206
207
208#
568fa3fa 209# testbackend
ef416fc2 210#
211
f8b3a85b 212testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
ef416fc2 213 echo Linking $@...
3e391a8e 214 $(LD_CC) $(ALL_LDFLAGS) -o testbackend testbackend.o $(LINKCUPSSTATIC)
00dbe99f 215 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
ef416fc2 216
217
568fa3fa
MS
218#
219# testsupplies
220#
221
f8b3a85b 222testsupplies: testsupplies.o libbackend.a ../cups/$(LIBCUPSSTATIC)
568fa3fa 223 echo Linking $@...
21609267 224 $(LD_CC) $(ALL_LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
3e391a8e 225 $(LINKCUPSSTATIC)
00dbe99f 226 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
568fa3fa
MS
227
228
ed486911 229#
230# libbackend.a
231#
232
233libbackend.a: $(LIBOBJS)
234 echo Archiving $@...
235 $(RM) $@
236 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
237 $(RANLIB) $@
238
239
c5571a1d
MS
240#
241# dnssd
242#
243
244dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
245 echo Linking $@...
7c11d5ae 246 $(LD_CC) $(ALL_LDFLAGS) -o dnssd dnssd.o libbackend.a $(DNSSDLIBS) $(LINKCUPS)
00dbe99f 247 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
37e7e6e0
MS
248 if test `uname` = Darwin; then \
249 $(RM) mdns; \
250 $(LN) dnssd mdns; \
251 fi
c5571a1d
MS
252
253
ef416fc2 254#
255# ipp
256#
257
7a14d768 258ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 259 echo Linking $@...
3e391a8e 260 $(LD_CC) $(ALL_LDFLAGS) -o ipp ipp.o libbackend.a $(LINKCUPS)
00dbe99f
MS
261 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
262 $(RM) http https ipps
263 for file in $(IPPALIASES); do \
264 $(LN) ipp $$file; \
265 done
ef416fc2 266
267
268#
269# lpd
270#
271
7a14d768 272lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 273 echo Linking $@...
3e391a8e 274 $(LD_CC) $(ALL_LDFLAGS) -o lpd lpd.o libbackend.a $(LINKCUPS)
00dbe99f 275 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
7a14d768
MS
276
277
89d46774 278#
279# snmp
280#
281
ed486911 282snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
89d46774 283 echo Linking $@...
3e391a8e 284 $(LD_CC) $(ALL_LDFLAGS) -o snmp snmp.o libbackend.a $(LINKCUPS)
00dbe99f 285 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
89d46774 286
287
ef416fc2 288#
289# socket
290#
291
ed486911 292socket: socket.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 293 echo Linking $@...
3e391a8e 294 $(LD_CC) $(ALL_LDFLAGS) -o socket socket.o libbackend.a $(LINKCUPS)
00dbe99f 295 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
ef416fc2 296
6fb588e0
MS
297socket-static: socket.o ../cups/$(LIBCUPSSTATIC) libbackend.a
298 echo Linking $@...
21609267 299 $(LD_CC) $(ALL_LDFLAGS) -o socket-static socket.o libbackend.a \
3e391a8e 300 $(LINKCUPSSTATIC)
00dbe99f 301 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
6fb588e0 302
ef416fc2 303
304#
305# usb
306#
307
ed486911 308usb: usb.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 309 echo Linking $@...
21609267 310 $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
3e391a8e 311 $(BACKLIBS) $(COMMONLIBS) $(LINKCUPS)
00dbe99f 312 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
75bd9771 313usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
ef416fc2 314
315
316#
317# Dependencies...
318#
319
320include Dependencies