]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/Makefile
Merge changes from CUPS 1.3.1.
[thirdparty/cups.git] / backend / Makefile
index 62b44d37e3d0df2a07161e2c1cbcbd2e7558e1d9..e02c2753877429b7b2c05121ca65416bcc4355b4 100644 (file)
@@ -1,25 +1,16 @@
 #
-# "$Id$"
+# "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $"
 #
 #   Backend makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+#   Copyright 2007 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.
 #
@@ -27,8 +18,9 @@
 include ../Makedefs
 
 RBACKENDS =    ipp lpd
-UBACKENDS =    $(PAP) parallel scsi serial snmp socket usb
-TARGETS        =       betest test1284 $(RBACKENDS) $(UBACKENDS)
+UBACKENDS =    $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
+TARGETS        =       betest test1284 libbackend.a $(RBACKENDS) $(UBACKENDS)
+LIBOBJS        =       ieee1284.o runloop.o
 OBJS   =       betest.o ipp.o lpd.o pap.o parallel.o scsi.o \
                serial.o snmp.o socket.o test1284.o usb.o
 
@@ -45,7 +37,7 @@ all:  $(TARGETS)
 #
 
 clean:
-       $(RM) $(OBJS) $(TARGETS) http
+       $(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http
 
 
 #
@@ -70,6 +62,12 @@ install:     all
        done
        $(RM) $(SERVERBIN)/backend/http
        $(LN) ipp $(SERVERBIN)/backend/http
+       if test "x$(SYMROOT)" != "x"; then \
+               $(INSTALL_DIR) $(SYMROOT); \
+               for file in $(TARGETS); do \
+                       cp $$file $(SYMROOT); \
+               done \
+       fi
 
 
 #
@@ -104,6 +102,17 @@ test1284:  test1284.o ../cups/libcups.a
                $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
+#
+# libbackend.a
+#
+
+libbackend.a:  $(LIBOBJS)
+       echo Archiving $@...
+       $(RM) $@
+       $(AR) $(ARFLAGS) $@ $(LIBOBJS)
+       $(RANLIB) $@
+
+
 #
 # ieee1394
 #
@@ -149,9 +158,9 @@ pap:        pap.o ../cups/$(LIBCUPS)
 # 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)
 
 
 #
@@ -169,37 +178,37 @@ scsi.o:   scsi.c scsi-irix.c scsi-linux.c
 # serial
 #
 
-serial:        serial.o ../cups/$(LIBCUPS)
+serial:        serial.o ../cups/$(LIBCUPS) libbackend.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o serial serial.o $(BACKLIBS) $(LIBS)
+       $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
 
 
 #
 # snmp
 #
 
-snmp:  snmp.o ../cups/$(LIBCUPS)
+snmp:  snmp.o ../cups/$(LIBCUPS) libbackend.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o snmp snmp.o $(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 $(BACKLIBS) $(LIBS)
+usb.o: usb.c usb-darwin.c usb-unix.c
 
 
 #
@@ -210,5 +219,5 @@ include Dependencies
 
 
 #
-# End of "$Id$".
+# End of "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $".
 #