4 # Backend makefile for CUPS.
6 # Copyright 2007-2012 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...
115 # Install programs...
118 install-exec
: $(INSTALLXPC
)
119 echo Installing backends in
$(SERVERBIN
)/backend
120 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/backend
121 for file in
$(RBACKENDS
); do \
122 $(LIBTOOL
) $(INSTALL_BIN
) -m
700 $$file $(SERVERBIN
)/backend
; \
124 for file in
$(UBACKENDS
); do \
125 $(INSTALL_BIN
) $$file $(SERVERBIN
)/backend
; \
127 for file in
$(IPPALIASES
); do \
128 $(RM
) $(SERVERBIN
)/backend
/$$file; \
129 $(LN
) ipp
$(SERVERBIN
)/backend
/$$file; \
131 if
test "x$(DNSSD_BACKEND)" != x
-a
`uname` = Darwin
; then \
132 $(RM
) $(SERVERBIN
)/backend
/mdns
; \
133 $(LN
) $(DNSSD_BACKEND
) $(SERVERBIN
)/backend
/mdns
; \
135 if
test "x$(SYMROOT)" != "x"; then \
136 $(INSTALL_DIR
) $(SYMROOT
); \
137 for file in
$(RBACKENDS
) $(UBACKENDS
); do \
138 cp
$$file $(SYMROOT
); \
139 dsymutil
$(SYMROOT
)/$$file; \
144 echo Installing XPC backends in
$(SERVERBIN
)/apple
145 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/apple
146 $(LIBTOOL
) $(INSTALL_BIN
) ipp
$(SERVERBIN
)/apple
147 for file in
$(IPPALIASES
); do \
148 $(RM
) $(SERVERBIN
)/apple
/$$file; \
149 $(LN
) ipp
$(SERVERBIN
)/apple
/$$file; \
161 # Install libraries...
168 # Uninstall all targets...
172 $(RM
) $(SERVERBIN
)/apple
/ipp
173 for file in
$(IPPALIASES
); do \
174 $(RM
) $(SERVERBIN
)/apple
/$$file; \
176 -$(RMDIR
) $(SERVERBIN
)/apple
177 for file in
$(RBACKENDS
) $(UBACKENDS
); do \
178 $(RM
) $(SERVERBIN
)/backend
/$$file; \
180 for file in
$(IPPALIASES
); do \
181 $(RM
) $(SERVERBIN
)/backend
/$$file; \
183 -$(RMDIR
) $(SERVERBIN
)/backend
184 -$(RMDIR
) $(SERVERBIN
)
191 test1284
: test1284.o ..
/cups
/$(LIBCUPSSTATIC
)
193 $(CC
) $(LDFLAGS
) -o test1284 test1284.o ..
/cups
/$(LIBCUPSSTATIC
) \
194 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
201 testbackend
: testbackend.o ..
/cups
/$(LIBCUPSSTATIC
)
203 $(CC
) $(LDFLAGS
) -o testbackend testbackend.o ..
/cups
/$(LIBCUPSSTATIC
) \
204 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
211 testsupplies
: testsupplies.o libbackend.a ..
/cups
/$(LIBCUPSSTATIC
)
213 $(CC
) $(LDFLAGS
) -o testsupplies testsupplies.o libbackend.a \
214 ..
/cups
/$(LIBCUPSSTATIC
) $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) \
215 $(COMMONLIBS
) $(LIBZ
)
222 libbackend.a
: $(LIBOBJS
)
225 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
233 dnssd
: dnssd.o ..
/cups
/$(LIBCUPS
) libbackend.a
235 $(CC
) $(LDFLAGS
) -o dnssd dnssd.o libbackend.a
$(LIBS
)
236 if
test `uname` = Darwin
; then \
246 ipp
: ipp.o ..
/cups
/$(LIBCUPS
) libbackend.a
248 $(CC
) $(LDFLAGS
) -o ipp ipp.o libbackend.a
$(LIBS
)
257 lpd
: lpd.o ..
/cups
/$(LIBCUPS
) libbackend.a
259 $(CC
) $(LDFLAGS
) -o lpd lpd.o libbackend.a
$(LIBS
)
266 snmp
: snmp.o ..
/cups
/$(LIBCUPS
) libbackend.a
268 $(CC
) $(LDFLAGS
) -o snmp snmp.o libbackend.a
$(LIBS
)
275 socket
: socket.o ..
/cups
/$(LIBCUPS
) libbackend.a
277 $(CC
) $(LDFLAGS
) -o socket socket.o libbackend.a
$(LIBS
)
284 usb
: usb.o ..
/cups
/$(LIBCUPS
) libbackend.a
286 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o usb usb.o libbackend.a
$(LIBUSB
) \
288 usb.o
: usb.c usb-darwin.c usb-libusb.c usb-unix.c