2 # "$Id: Makefile 6778 2007-08-08 19:27:51Z 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
$(MDNS
)
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 mdns.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...
44 # Clean all object files...
48 $(RM
) $(OBJS
) $(TARGETS
) $(LIBOBJS
) http
52 # Update dependencies (without system header dependencies...)
56 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
60 # Install all targets...
63 install: all install-data install-headers install-libs install-exec
67 # Install data files...
78 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/backend
79 for file in
$(RBACKENDS
); do \
80 $(LIBTOOL
) $(INSTALL_BIN
) -m
700 $$file $(SERVERBIN
)/backend
; \
82 for file in
$(UBACKENDS
); do \
83 $(INSTALL_BIN
) $$file $(SERVERBIN
)/backend
; \
85 $(RM
) $(SERVERBIN
)/backend
/http
86 $(LN
) ipp
$(SERVERBIN
)/backend
/http
87 if
test "x$(SYMROOT)" != "x"; then \
88 $(INSTALL_DIR
) $(SYMROOT
); \
89 for file in
$(TARGETS
); do \
90 cp
$$file $(SYMROOT
); \
103 # Install libraries...
110 # Uninstall all targets...
114 for file in
$(RBACKENDS
) $(UBACKENDS
); do \
115 $(RM
) $(SERVERBIN
)/backend
/$$file; \
117 $(RM
) $(SERVERBIN
)/backend
/http
118 -$(RMDIR
) $(SERVERBIN
)/backend
119 -$(RMDIR
) $(SERVERBIN
)
126 test1284
: test1284.o ..
/cups
/libcups.a
128 $(CC
) $(LDFLAGS
) -o test1284 test1284.o ..
/cups
/libcups.a \
129 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
136 testbackend
: testbackend.o ..
/cups
/libcups.a
138 $(CC
) $(LDFLAGS
) -o testbackend testbackend.o ..
/cups
/libcups.a \
139 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
146 testsupplies
: testsupplies.o libbackend.a ..
/cups
/libcups.a
148 $(CC
) $(LDFLAGS
) -o testsupplies testsupplies.o libbackend.a \
149 ..
/cups
/libcups.a
$(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
156 libbackend.a
: $(LIBOBJS
)
159 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
167 ipp
: ipp.o ..
/cups
/$(LIBCUPS
) libbackend.a
169 $(CC
) $(LDFLAGS
) -o ipp ipp.o libbackend.a
$(LIBS
)
178 lpd
: lpd.o ..
/cups
/$(LIBCUPS
) libbackend.a
180 $(CC
) $(LDFLAGS
) -o lpd lpd.o libbackend.a
$(LIBS
)
187 mdns
: mdns.o ..
/cups
/$(LIBCUPS
) libbackend.a
189 $(CC
) $(LDFLAGS
) -o mdns mdns.o libbackend.a
$(LIBS
)
196 pap
: pap.o ..
/cups
/$(LIBCUPS
)
198 $(CC
) $(LDFLAGS
) -o pap pap.o
$(BACKLIBS
) $(LIBS
) -framework AppleTalk
205 parallel
: parallel.o ..
/cups
/$(LIBCUPS
) libbackend.a
207 $(CC
) $(LDFLAGS
) -o parallel parallel.o libbackend.a
$(LIBS
)
214 scsi
: scsi.o ..
/cups
/$(LIBCUPS
)
216 $(CC
) $(LDFLAGS
) -o scsi scsi.o
$(LIBS
)
218 scsi.o
: scsi.c scsi-irix.c scsi-linux.c
225 serial
: serial.o ..
/cups
/$(LIBCUPS
) libbackend.a
227 $(CC
) $(LDFLAGS
) -o serial serial.o libbackend.a
$(BACKLIBS
) $(LIBS
)
234 snmp
: snmp.o ..
/cups
/$(LIBCUPS
) libbackend.a
236 $(CC
) $(LDFLAGS
) -o snmp snmp.o libbackend.a
$(LIBS
)
243 socket
: socket.o ..
/cups
/$(LIBCUPS
) libbackend.a
245 $(CC
) $(LDFLAGS
) -o socket socket.o libbackend.a
$(LIBS
)
252 usb
: usb.o ..
/cups
/$(LIBCUPS
) libbackend.a
254 $(CC
) $(LDFLAGS
) -o usb usb.o libbackend.a
$(BACKLIBS
) $(LIBS
)
255 usb.o
: usb.c usb-darwin.c usb-unix.c
266 # End of "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $".