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