#
-# "$Id: Makefile 5131 2006-02-18 05:31:36Z mike $"
+# "$Id: Makefile 7924 2008-09-10 17:36:13Z mike $"
#
-# Backend makefile for the Common UNIX Printing System (CUPS).
+# Backend makefile for CUPS.
#
-# Copyright 1997-2006 by Easy Software Products, all rights reserved.
+# Copyright 2007-2011 by Apple Inc.
+# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
-# property of Easy Software Products and are protected by Federal
-# copyright law. Distribution and use rights are outlined in the file
-# "LICENSE.txt" which should have been included with this file. If this
-# file is missing or damaged please contact Easy Software Products
-# at:
-#
-# Attn: CUPS Licensing Information
-# Easy Software Products
-# 44141 Airport View Drive, Suite 204
-# Hollywood, Maryland 20636 USA
-#
-# Voice: (301) 373-9600
-# EMail: cups-info@cups.org
-# WWW: http://www.cups.org
+# property of Apple Inc. and are protected by Federal copyright
+# law. Distribution and use rights are outlined in the file "LICENSE.txt"
+# which should have been included with this file. If this file is
+# file is missing or damaged, see the license at "http://www.cups.org/".
#
# This file is subject to the Apple OS-Developed Software exception.
#
include ../Makedefs
-RBACKENDS = ipp lpd
-UBACKENDS = parallel scsi serial socket usb
-TARGETS = betest test1284 $(RBACKENDS) $(UBACKENDS)
-OBJS = betest.o ipp.o lpd.o parallel.o scsi.o \
- serial.o socket.o test1284.o usb.o
+#
+# Object files...
+#
+
+RBACKENDS = ipp lpd $(DNSSD_BACKEND)
+UBACKENDS = $(LEGACY_BACKENDS) serial snmp socket usb
+UNITTESTS = test1284 testbackend testsupplies
+TARGETS = libbackend.a $(RBACKENDS) $(UBACKENDS)
+LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o
+OBJS = ipp.o lpd.o dnssd.o parallel.o serial.o snmp.o \
+ socket.o test1284.o testbackend.o testsupplies.o usb.o
#
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs:
+
+
+#
+# Make unit tests...
+#
+
+unittests: $(UNITTESTS)
+
+
#
# Clean all object files...
#
clean:
- $(RM) $(OBJS) $(TARGETS) http
+ $(RM) $(OBJS) $(TARGETS) $(UNITTESTS) $(LIBOBJS) http mdns
#
# Install all targets...
#
-install: all
+install: all install-data install-headers install-libs install-exec
+
+
+#
+# Install data files...
+#
+
+install-data:
+
+
+#
+# Install programs...
+#
+
+install-exec: $(INSTALLXPC)
+ echo Installing backends in $(SERVERBIN)/backend
$(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
for file in $(RBACKENDS); do \
- $(LIBTOOL) $(INSTALL) -m 700 $$file $(SERVERBIN)/backend; \
+ $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
done
for file in $(UBACKENDS); do \
$(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
done
- $(RM) $(SERVERBIN)/backend/http
- $(LN) ipp $(SERVERBIN)/backend/http
+ for file in $(IPPALIASES); do \
+ $(RM) $(SERVERBIN)/backend/$$file; \
+ $(LN) ipp $(SERVERBIN)/backend/$$file; \
+ done
+ if test "x$(DNSSD_BACKEND)" != x; then \
+ $(RM) $(SERVERBIN)/backend/mdns; \
+ $(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
+ fi
+ if test "x$(SYMROOT)" != "x"; then \
+ $(INSTALL_DIR) $(SYMROOT); \
+ for file in $(TARGETS); do \
+ cp $$file $(SYMROOT); \
+ done \
+ fi
+
+install-xpc: ipp
+ echo Installing XPC backends in $(SERVERBIN)/apple
+ $(INSTALL_DIR) -m 755 $(SERVERBIN)/apple
+ $(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple
+ for file in $(IPPALIASES); do \
+ $(RM) $(SERVERBIN)/apple/$$file; \
+ $(LN) ipp $(SERVERBIN)/apple/$$file; \
+ done
#
-# betest
+# Install headers...
#
-betest: betest.o ../cups/$(LIBCUPS)
- echo Linking $@...
- $(CC) $(LDFLAGS) -o betest betest.o $(LIBS)
+install-headers:
+
+
+#
+# Install libraries...
+#
+
+install-libs:
+
+
+#
+# Uninstall all targets...
+#
+
+uninstall:
+ $(RM) $(SERVERBIN)/apple/ipp
+ for file in $(IPPALIASES); do \
+ $(RM) $(SERVERBIN)/apple/$$file; \
+ done
+ -$(RMDIR) $(SERVERBIN)/apple
+ for file in $(RBACKENDS) $(UBACKENDS); do \
+ $(RM) $(SERVERBIN)/backend/$$file; \
+ done
+ for file in $(IPPALIASES); do \
+ $(RM) $(SERVERBIN)/backend/$$file; \
+ done
+ -$(RMDIR) $(SERVERBIN)/backend
+ -$(RMDIR) $(SERVERBIN)
#
# test1284
#
-test1284: test1284.o ../cups/libcups.a
+test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
+ echo Linking $@...
+ $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \
+ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+
+
+#
+# testbackend
+#
+
+testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
- $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
- $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+ $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \
+ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
#
-# ieee1394
+# testsupplies
#
-ieee1394: ieee1394.o ieee1394-linux.o
+testsupplies: testsupplies.o libbackend.a ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
- $(CC) $(LDFLAGS) -o ieee1394 ieee1394.o ieee1394-linux.o -lraw1394 $(LIBS)
+ $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
+ ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ $(COMMONLIBS) $(LIBZ)
+
+
+#
+# libbackend.a
+#
-ieee1394.o: ieee1394.h
-ieee1394-linux.o: ieee1394.h
+libbackend.a: $(LIBOBJS)
+ echo Archiving $@...
+ $(RM) $@
+ $(AR) $(ARFLAGS) $@ $(LIBOBJS)
+ $(RANLIB) $@
+
+
+#
+# dnssd
+#
+
+dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
+ echo Linking $@...
+ $(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
+ $(RM) mdns
+ $(LN) dnssd mdns
#
# ipp
#
-ipp: ipp.o ../cups/$(LIBCUPS)
+ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS)
+ $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
$(RM) http
$(LN) ipp http
# lpd
#
-lpd: lpd.o ../cups/$(LIBCUPS)
+lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o lpd lpd.o $(LIBS)
+ $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
#
# parallel
#
-parallel: parallel.o ../cups/$(LIBCUPS)
+parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o parallel parallel.o $(LIBS)
+ $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
#
-# scsi
+# serial
#
-scsi: scsi.o ../cups/$(LIBCUPS)
+serial: serial.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
-
-scsi.o: scsi.c scsi-irix.c scsi-linux.c
+ $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
#
-# serial
+# snmp
#
-serial: serial.o ../cups/$(LIBCUPS)
+snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o serial serial.o $(BACKLIBS) $(LIBS)
+ $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
#
# socket
#
-socket: socket.o ../cups/$(LIBCUPS)
+socket: socket.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o socket socket.o $(LIBS)
+ $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
#
# usb
#
-usb: usb.o ../cups/$(LIBCUPS)
+usb: usb.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o usb usb.o $(BACKLIBS) $(LIBS)
-usb.o: usb.c usb-darwin.c usb-unix.c ieee1284.c
+ $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
+ $(BACKLIBS) $(LIBS)
+usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
#
#
-# End of "$Id: Makefile 5131 2006-02-18 05:31:36Z mike $".
+# End of "$Id: Makefile 7924 2008-09-10 17:36:13Z mike $".
#