4 # Backend makefile for CUPS.
6 # Copyright 2007-2014 by Apple Inc.
7 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
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/".
15 # This file is subject to the Apple OS-Developed Software exception.
24 # RBACKENDS are installed mode 0700 so cupsd will run them as root...
26 # UBACKENDS and ULBACKENDS are installed mode 0755 so cupsd will run them as
27 # an unprivileged user...
29 # See http://www.cups.org/documentation.php/api-filter.html for more info...
73 # Make library targets...
83 unittests
: $(UNITTESTS
)
87 # Clean all object files...
91 $(RM
) $(OBJS
) $(TARGETS
) $(UNITTESTS
) $(LIBOBJS
) http https ipps mdns
95 # Update dependencies (without system header dependencies...)
99 $(CC
) -MM
$(ALL_CFLAGS
) $(OBJS
:.o
=.c
) >Dependencies
103 # Install all targets...
106 install: all install-data install-headers install-libs install-exec
110 # Install data files...
114 if
test "x$(USBQUIRKS)" != x
; then \
115 echo Installing USB quirks in
$(USBQUIRKS
); \
116 $(INSTALL_DIR
) -m
755 $(USBQUIRKS
); \
117 $(INSTALL_DATA
) org.cups.usb-quirks
$(USBQUIRKS
); \
122 # Install programs...
125 install-exec
: $(INSTALLXPC
)
126 echo Installing backends in
$(SERVERBIN
)/backend
127 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/backend
128 for file in
$(RBACKENDS
); do \
129 $(LIBTOOL
) $(INSTALL_BIN
) -m
700 $$file $(SERVERBIN
)/backend
; \
131 for file in
$(UBACKENDS
); do \
132 $(INSTALL_BIN
) $$file $(SERVERBIN
)/backend
; \
134 for file in
$(IPPALIASES
); do \
135 $(RM
) $(SERVERBIN
)/backend
/$$file; \
136 $(LN
) ipp
$(SERVERBIN
)/backend
/$$file; \
138 if
test "x$(DNSSD_BACKEND)" != x
-a
`uname` = Darwin
; then \
139 $(RM
) $(SERVERBIN
)/backend
/mdns
; \
140 $(LN
) $(DNSSD_BACKEND
) $(SERVERBIN
)/backend
/mdns
; \
142 if
test "x$(SYMROOT)" != "x"; then \
143 $(INSTALL_DIR
) $(SYMROOT
); \
144 for file in
$(RBACKENDS
) $(UBACKENDS
); do \
145 cp
$$file $(SYMROOT
); \
146 dsymutil
$(SYMROOT
)/$$file; \
151 echo Installing XPC backends in
$(SERVERBIN
)/apple
152 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/apple
153 $(LIBTOOL
) $(INSTALL_BIN
) ipp
$(SERVERBIN
)/apple
154 for file in
$(IPPALIASES
); do \
155 $(RM
) $(SERVERBIN
)/apple
/$$file; \
156 $(LN
) ipp
$(SERVERBIN
)/apple
/$$file; \
168 # Install libraries...
172 echo Installing backends in
$(SERVERBIN
)/backend
173 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/backend
174 for file in
$(ULBACKENDS
); do \
175 $(INSTALL_BIN
) $$file $(SERVERBIN
)/backend
; \
177 if
test "x$(SYMROOT)" != "x"; then \
178 $(INSTALL_DIR
) $(SYMROOT
); \
179 for file in
$(ULBACKENDS
); do \
180 cp
$$file $(SYMROOT
); \
181 dsymutil
$(SYMROOT
)/$$file; \
187 # Uninstall all targets...
191 $(RM
) $(SERVERBIN
)/apple
/ipp
192 for file in
$(IPPALIASES
); do \
193 $(RM
) $(SERVERBIN
)/apple
/$$file; \
195 -$(RMDIR
) $(SERVERBIN
)/apple
196 for file in
$(RBACKENDS
) $(UBACKENDS
) $(ULBACKENDS
); do \
197 $(RM
) $(SERVERBIN
)/backend
/$$file; \
199 for file in
$(IPPALIASES
); do \
200 $(RM
) $(SERVERBIN
)/backend
/$$file; \
202 -$(RMDIR
) $(SERVERBIN
)/backend
203 -$(RMDIR
) $(SERVERBIN
)
210 test1284
: test1284.o ..
/cups
/$(LIBCUPSSTATIC
)
212 $(CC
) $(LDFLAGS
) -o test1284 test1284.o ..
/cups
/$(LIBCUPSSTATIC
) \
213 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
220 testbackend
: testbackend.o ..
/cups
/$(LIBCUPSSTATIC
)
222 $(CC
) $(LDFLAGS
) -o testbackend testbackend.o ..
/cups
/$(LIBCUPSSTATIC
) \
223 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
230 testsupplies
: testsupplies.o libbackend.a ..
/cups
/$(LIBCUPSSTATIC
)
232 $(CC
) $(LDFLAGS
) -o testsupplies testsupplies.o libbackend.a \
233 ..
/cups
/$(LIBCUPSSTATIC
) $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) \
234 $(COMMONLIBS
) $(LIBZ
)
241 libbackend.a
: $(LIBOBJS
)
244 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
252 dnssd
: dnssd.o ..
/cups
/$(LIBCUPS
) libbackend.a
254 $(CC
) $(LDFLAGS
) -o dnssd dnssd.o libbackend.a
$(LIBS
)
255 if
test `uname` = Darwin
; then \
265 ipp
: ipp.o ..
/cups
/$(LIBCUPS
) libbackend.a
267 $(CC
) $(LDFLAGS
) -o ipp ipp.o libbackend.a
$(LIBS
)
276 lpd
: lpd.o ..
/cups
/$(LIBCUPS
) libbackend.a
278 $(CC
) $(LDFLAGS
) -o lpd lpd.o libbackend.a
$(LIBS
)
285 snmp
: snmp.o ..
/cups
/$(LIBCUPS
) libbackend.a
287 $(CC
) $(LDFLAGS
) -o snmp snmp.o libbackend.a
$(LIBS
)
294 socket
: socket.o ..
/cups
/$(LIBCUPS
) libbackend.a
296 $(CC
) $(LDFLAGS
) -o socket socket.o libbackend.a
$(LIBS
)
303 usb
: usb.o ..
/cups
/$(LIBCUPS
) libbackend.a
305 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o usb usb.o libbackend.a
$(LIBUSB
) \
307 usb.o
: usb.c usb-darwin.c usb-libusb.c usb-unix.c