2 # "$Id: Makefile 7924 2008-09-10 17:36:13Z mike $"
4 # Backend makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 2007-2008 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.
20 RBACKENDS
= ipp lpd
$(DNSSD_BACKEND
)
21 UBACKENDS
= $(PAP
) $(LEGACY_BACKENDS
) serial snmp socket usb
22 TARGETS
= test1284 testbackend testsupplies \
23 libbackend.a
$(RBACKENDS
) $(UBACKENDS
)
24 LIBOBJS
= ieee1284.o network.o runloop.o snmp-supplies.o
25 OBJS
= ipp.o lpd.o dnssd.o pap.o parallel.o scsi.o serial.o snmp.o \
26 socket.o test1284.o testbackend.o testsupplies.o usb.o
37 # Make library targets...
51 # Clean all object files...
55 $(RM
) $(OBJS
) $(TARGETS
) $(LIBOBJS
) http mdns
59 # Update dependencies (without system header dependencies...)
63 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
67 # Install all targets...
70 install: all install-data install-headers install-libs install-exec
74 # Install data files...
85 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/backend
86 for file in
$(RBACKENDS
); do \
87 $(LIBTOOL
) $(INSTALL_BIN
) -m
700 $$file $(SERVERBIN
)/backend
; \
89 for file in
$(UBACKENDS
); do \
90 $(INSTALL_BIN
) $$file $(SERVERBIN
)/backend
; \
92 $(RM
) $(SERVERBIN
)/backend
/http
93 $(LN
) ipp
$(SERVERBIN
)/backend
/http
94 if
test "x$(DNSSD_BACKEND)" != x
; then \
95 $(RM
) $(SERVERBIN
)/backend
/mdns
; \
96 $(LN
) $(DNSSD_BACKEND
) $(SERVERBIN
)/backend
/mdns
; \
98 if
test "x$(SYMROOT)" != "x"; then \
99 $(INSTALL_DIR
) $(SYMROOT
); \
100 for file in
$(TARGETS
); do \
101 cp
$$file $(SYMROOT
); \
114 # Install libraries...
121 # Uninstall all targets...
125 for file in
$(RBACKENDS
) $(UBACKENDS
); do \
126 $(RM
) $(SERVERBIN
)/backend
/$$file; \
128 $(RM
) $(SERVERBIN
)/backend
/http
129 -$(RMDIR
) $(SERVERBIN
)/backend
130 -$(RMDIR
) $(SERVERBIN
)
137 test1284
: test1284.o ..
/cups
/libcups.a
139 $(CC
) $(LDFLAGS
) -o test1284 test1284.o ..
/cups
/libcups.a \
140 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
147 testbackend
: testbackend.o ..
/cups
/libcups.a
149 $(CC
) $(LDFLAGS
) -o testbackend testbackend.o ..
/cups
/libcups.a \
150 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
157 testsupplies
: testsupplies.o libbackend.a ..
/cups
/libcups.a
159 $(CC
) $(LDFLAGS
) -o testsupplies testsupplies.o libbackend.a \
160 ..
/cups
/libcups.a
$(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
167 libbackend.a
: $(LIBOBJS
)
170 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
178 dnssd
: dnssd.o ..
/cups
/$(LIBCUPS
) libbackend.a
180 $(CC
) $(LDFLAGS
) -o dnssd dnssd.o libbackend.a
$(LIBS
)
189 ipp
: ipp.o ..
/cups
/$(LIBCUPS
) libbackend.a
191 $(CC
) $(LDFLAGS
) -o ipp ipp.o libbackend.a
$(LIBS
)
200 lpd
: lpd.o ..
/cups
/$(LIBCUPS
) libbackend.a
202 $(CC
) $(LDFLAGS
) -o lpd lpd.o libbackend.a
$(LIBS
)
209 pap
: pap.o ..
/cups
/$(LIBCUPS
)
211 $(CC
) $(LDFLAGS
) -o pap pap.o
$(BACKLIBS
) $(LIBS
) -framework AppleTalk
218 parallel
: parallel.o ..
/cups
/$(LIBCUPS
) libbackend.a
220 $(CC
) $(LDFLAGS
) -o parallel parallel.o libbackend.a
$(LIBS
)
227 scsi
: scsi.o ..
/cups
/$(LIBCUPS
)
229 $(CC
) $(LDFLAGS
) -o scsi scsi.o
$(LIBS
)
231 scsi.o
: scsi.c scsi-irix.c scsi-linux.c
238 serial
: serial.o ..
/cups
/$(LIBCUPS
) libbackend.a
240 $(CC
) $(LDFLAGS
) -o serial serial.o libbackend.a
$(BACKLIBS
) $(LIBS
)
247 snmp
: snmp.o ..
/cups
/$(LIBCUPS
) libbackend.a
249 $(CC
) $(LDFLAGS
) -o snmp snmp.o libbackend.a
$(LIBS
)
256 socket
: socket.o ..
/cups
/$(LIBCUPS
) libbackend.a
258 $(CC
) $(LDFLAGS
) -o socket socket.o libbackend.a
$(LIBS
)
265 usb
: usb.o ..
/cups
/$(LIBCUPS
) libbackend.a
267 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o usb usb.o libbackend.a
$(LIBUSB
) \
269 usb.o
: usb.c usb-darwin.c usb-libusb.c usb-unix.c
280 # End of "$Id: Makefile 7924 2008-09-10 17:36:13Z mike $".