4 # Backend makefile for CUPS.
6 # Copyright 2007-2013 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 are installed mode 0755 so cupsd will run them as an unprivileged
29 # See http://www.cups.org/documentation.php/api-filter.html for more info...
71 # Make library targets...
81 unittests
: $(UNITTESTS
)
85 # Clean all object files...
89 $(RM
) $(OBJS
) $(TARGETS
) $(UNITTESTS
) $(LIBOBJS
) http https ipps mdns
93 # Update dependencies (without system header dependencies...)
97 $(CC
) -MM
$(ALL_CFLAGS
) $(OBJS
:.o
=.c
) >Dependencies
101 # Install all targets...
104 install: all install-data install-headers install-libs install-exec
108 # Install data files...
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
); \
120 # Install programs...
123 install-exec
: $(INSTALLXPC
)
124 echo Installing backends in
$(SERVERBIN
)/backend
125 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/backend
126 for file in
$(RBACKENDS
); do \
127 $(LIBTOOL
) $(INSTALL_BIN
) -m
700 $$file $(SERVERBIN
)/backend
; \
129 for file in
$(UBACKENDS
); do \
130 $(INSTALL_BIN
) $$file $(SERVERBIN
)/backend
; \
132 for file in
$(IPPALIASES
); do \
133 $(RM
) $(SERVERBIN
)/backend
/$$file; \
134 $(LN
) ipp
$(SERVERBIN
)/backend
/$$file; \
136 if
test "x$(DNSSD_BACKEND)" != x
-a
`uname` = Darwin
; then \
137 $(RM
) $(SERVERBIN
)/backend
/mdns
; \
138 $(LN
) $(DNSSD_BACKEND
) $(SERVERBIN
)/backend
/mdns
; \
140 if
test "x$(SYMROOT)" != "x"; then \
141 $(INSTALL_DIR
) $(SYMROOT
); \
142 for file in
$(RBACKENDS
) $(UBACKENDS
); do \
143 cp
$$file $(SYMROOT
); \
144 dsymutil
$(SYMROOT
)/$$file; \
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; \
166 # Install libraries...
173 # Uninstall all targets...
177 $(RM
) $(SERVERBIN
)/apple
/ipp
178 for file in
$(IPPALIASES
); do \
179 $(RM
) $(SERVERBIN
)/apple
/$$file; \
181 -$(RMDIR
) $(SERVERBIN
)/apple
182 for file in
$(RBACKENDS
) $(UBACKENDS
); do \
183 $(RM
) $(SERVERBIN
)/backend
/$$file; \
185 for file in
$(IPPALIASES
); do \
186 $(RM
) $(SERVERBIN
)/backend
/$$file; \
188 -$(RMDIR
) $(SERVERBIN
)/backend
189 -$(RMDIR
) $(SERVERBIN
)
196 test1284
: test1284.o ..
/cups
/$(LIBCUPSSTATIC
)
198 $(CC
) $(LDFLAGS
) -o test1284 test1284.o ..
/cups
/$(LIBCUPSSTATIC
) \
199 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
206 testbackend
: testbackend.o ..
/cups
/$(LIBCUPSSTATIC
)
208 $(CC
) $(LDFLAGS
) -o testbackend testbackend.o ..
/cups
/$(LIBCUPSSTATIC
) \
209 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
216 testsupplies
: testsupplies.o libbackend.a ..
/cups
/$(LIBCUPSSTATIC
)
218 $(CC
) $(LDFLAGS
) -o testsupplies testsupplies.o libbackend.a \
219 ..
/cups
/$(LIBCUPSSTATIC
) $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) \
220 $(COMMONLIBS
) $(LIBZ
)
227 libbackend.a
: $(LIBOBJS
)
230 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
238 dnssd
: dnssd.o ..
/cups
/$(LIBCUPS
) libbackend.a
240 $(CC
) $(LDFLAGS
) -o dnssd dnssd.o libbackend.a
$(LIBS
)
241 if
test `uname` = Darwin
; then \
251 ipp
: ipp.o ..
/cups
/$(LIBCUPS
) libbackend.a
253 $(CC
) $(LDFLAGS
) -o ipp ipp.o libbackend.a
$(LIBS
)
262 lpd
: lpd.o ..
/cups
/$(LIBCUPS
) libbackend.a
264 $(CC
) $(LDFLAGS
) -o lpd lpd.o libbackend.a
$(LIBS
)
271 snmp
: snmp.o ..
/cups
/$(LIBCUPS
) libbackend.a
273 $(CC
) $(LDFLAGS
) -o snmp snmp.o libbackend.a
$(LIBS
)
280 socket
: socket.o ..
/cups
/$(LIBCUPS
) libbackend.a
282 $(CC
) $(LDFLAGS
) -o socket socket.o libbackend.a
$(LIBS
)
289 usb
: usb.o ..
/cups
/$(LIBCUPS
) libbackend.a
291 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o usb usb.o libbackend.a
$(LIBUSB
) \
293 usb.o
: usb.c usb-darwin.c usb-libusb.c usb-unix.c