2 # "$Id: Makefile 10425 2012-04-23 17:42:12Z mike $"
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 = ipp ipp14 lpd $(DNSSD_BACKEND)
25 UBACKENDS = $(LEGACY_BACKENDS) serial snmp socket usb
26 UNITTESTS = test1284 testbackend testsupplies
27 TARGETS = libbackend.a $(RBACKENDS) $(UBACKENDS)
28 LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o
29 OBJS = ipp.o ipp14.o lpd.o dnssd.o parallel.o serial.o snmp.o \
30 socket.o test1284.o testbackend.o testsupplies.o usb.o
41 # Make library targets...
51 unittests: $(UNITTESTS)
55 # Clean all object files...
59 $(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http mdns
63 # Update dependencies (without system header dependencies...)
67 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
71 # Install all targets...
74 install: all install-data install-headers install-libs install-exec
78 # Install data files...
88 install-exec: $(INSTALLXPC)
89 echo Installing backends in $(SERVERBIN)/backend
90 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
91 for file in $(RBACKENDS); do \
92 $(LIBTOOL) $(INSTALL_BIN) -m 744 $$file $(SERVERBIN)/backend; \
94 for file in $(UBACKENDS); do \
95 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
97 for file in $(IPPALIASES); do \
98 $(RM) $(SERVERBIN)/backend/$$file; \
99 $(LN) ipp $(SERVERBIN)/backend/$$file; \
101 if test "x$(DNSSD_BACKEND)" != x -a `uname` = Darwin; then \
102 $(RM) $(SERVERBIN)/backend/mdns; \
103 $(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
105 if test "x$(SYMROOT)" != "x"; then \
106 $(INSTALL_DIR) $(SYMROOT); \
107 for file in $(TARGETS); do \
108 cp $$file $(SYMROOT); \
113 echo Installing XPC backends in $(SERVERBIN)/apple
114 $(INSTALL_DIR) -m 755 $(SERVERBIN)/apple
115 $(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple
116 for file in $(IPPALIASES); do \
117 $(RM) $(SERVERBIN)/apple/$$file; \
118 $(LN) ipp $(SERVERBIN)/apple/$$file; \
130 # Install libraries...
137 # Uninstall all targets...
141 $(RM) $(SERVERBIN)/apple/ipp
142 for file in $(IPPALIASES); do \
143 $(RM) $(SERVERBIN)/apple/$$file; \
145 -$(RMDIR) $(SERVERBIN)/apple
146 for file in $(RBACKENDS) $(UBACKENDS); do \
147 $(RM) $(SERVERBIN)/backend/$$file; \
149 for file in $(IPPALIASES); do \
150 $(RM) $(SERVERBIN)/backend/$$file; \
152 -$(RMDIR) $(SERVERBIN)/backend
153 -$(RMDIR) $(SERVERBIN)
160 test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
162 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \
163 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
170 testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
172 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \
173 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
180 testsupplies: testsupplies.o libbackend.a ../cups/$(LIBCUPSSTATIC)
182 $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
183 ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
184 $(COMMONLIBS) $(LIBZ)
191 libbackend.a: $(LIBOBJS)
194 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
202 dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
204 $(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
213 ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
215 $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
224 ipp14: ipp14.o ../cups/$(LIBCUPS) libbackend.a
226 $(CC) $(LDFLAGS) -o ipp14 ipp14.o libbackend.a $(LIBS)
235 lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
237 $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
244 parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
246 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
253 serial: serial.o ../cups/$(LIBCUPS) libbackend.a
255 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
262 snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
264 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
271 socket: socket.o ../cups/$(LIBCUPS) libbackend.a
273 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
280 usb: usb.o ../cups/$(LIBCUPS) libbackend.a
282 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
284 usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
295 # End of "$Id: Makefile 10425 2012-04-23 17:42:12Z mike $".