]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/Makefile
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / filter / Makefile
index e7440eefe5a995d0b3239ad75f208646ca3c55e3..9b1680995cb103e516f99765c97f0c71186aa414 100644 (file)
@@ -1,18 +1,10 @@
 #
-# "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $"
+# Filter makefile for CUPS.
 #
-#   Filter makefile for CUPS.
+# Copyright 2007-2017 by Apple Inc.
+# Copyright 1997-2006 by Easy Software Products.
 #
-#   Copyright 2007-2011 by Apple Inc.
-#   Copyright 1997-2006 by Easy Software Products.
-#
-#   These coded instructions, statements, and computer programs are the
-#   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.
+# Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
 #
 
 include ../Makedefs
@@ -28,23 +20,20 @@ FILTERS     =       \
                rastertopwg
 LIBTARGETS =   \
                $(LIBCUPSIMAGE) \
-               libcupsimage.a \
-               $(LIB32CUPSIMAGE) \
-               $(LIB64CUPSIMAGE)
+               libcupsimage.a
 UNITTARGETS =  \
                rasterbench \
+               testclient \
                testraster
 TARGETS        =       \
                $(LIBTARGETS) \
                $(FILTERS)
 
 IMAGEOBJS =    error.o interpret.o raster.o
-IMAGE32OBJS =  $(IMAGEOBJS:.o=.32.o)
-IMAGE64OBJS =  $(IMAGEOBJS:.o=.64.o)
 OBJS   =       $(IMAGEOBJS) \
                commandtops.o gziptoany.o common.o pstops.o \
                rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
-               rastertopwg.o testraster.o
+               rastertopwg.o testclient.o testraster.o
 
 
 #
@@ -75,7 +64,6 @@ unittests:    $(UNITTARGETS)
 clean:
        $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
        $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
-       $(RM) -r 32bit 64bit
 
 
 #
@@ -83,13 +71,7 @@ clean:
 #
 
 depend:
-       touch Dependencies.tmp
-       makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
-       $(RM) Dependencies
-       cp Dependencies.tmp Dependencies
-       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
-       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
-       $(RM) Dependencies.tmp
+       $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
 
 
 #
@@ -121,6 +103,7 @@ install-exec:
                $(INSTALL_DIR) $(SYMROOT); \
                for file in $(FILTERS); do \
                        cp $$file $(SYMROOT); \
+                       dsymutil $(SYMROOT)/$$file; \
                done \
        fi
 
@@ -136,7 +119,7 @@ install-headers:
 # Install libraries...
 #
 
-install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
+install-libs: $(INSTALLSTATIC)
        $(INSTALL_DIR) -m 755 $(LIBDIR)
        $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
        -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
@@ -150,6 +133,7 @@ install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
        if test "x$(SYMROOT)" != "x"; then \
                $(INSTALL_DIR) $(SYMROOT); \
                cp $(LIBCUPSIMAGE) $(SYMROOT); \
+               dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \
        fi
 
 installstatic:
@@ -158,22 +142,12 @@ installstatic:
        $(RANLIB) $(LIBDIR)/libcupsimage.a
        $(CHMOD) 555 $(LIBDIR)/libcupsimage.a
 
-install32bit:
-       $(INSTALL_DIR) -m 755 $(LIB32DIR)
-       $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2
-       $(LN) libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so
-
-install64bit:
-       $(INSTALL_DIR) -m 755 $(LIB64DIR)
-       $(INSTALL_LIB) 64bit/libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so.2
-       $(LN) libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so
-
 
 #
 # Uninstall all targets...
 #
 
-uninstall: $(UNINSTALL32) $(UNINSTALL64)
+uninstall:
        for file in $(FILTERS); do \
                $(RM) $(SERVERBIN)/filter/$$file; \
        done
@@ -190,16 +164,6 @@ uninstall: $(UNINSTALL32) $(UNINSTALL64)
        $(RM) $(LIBDIR)/libcupsimage.so.2
        -$(RMDIR) $(LIBDIR)
 
-uninstall32bit:
-       $(RM) $(LIB32DIR)/libcupsimage.so
-       $(RM) $(LIB32DIR)/libcupsimage.so.2
-       -$(RMDIR) $(LIB32DIR)
-
-uninstall64bit:
-       $(RM) $(LIB64DIR)/libcupsimage.so
-       $(RM) $(LIB64DIR)/libcupsimage.so.2
-       -$(RMDIR) $(LIB64DIR)
-
 
 #
 # Automatic API help files...
@@ -240,38 +204,6 @@ apihelp:
                --intro spec-ppd.shtml \
                >../doc/help/spec-ppd.html
 
-framedhelp:
-       echo Generating CUPS API help files...
-       mxmldoc --section "Programming" --title "Raster API" \
-               --framed ../cups/api-raster \
-               --css ../doc/cups-printable.css \
-               --header api-raster.header --intro api-raster.shtml \
-               ../cups/raster.h interpret.c raster.c
-       mxmldoc --section "Programming" \
-               --title "Developing PostScript Printer Drivers" \
-               --framed ../cups/postscript-driver \
-               --css ../doc/cups-printable.css \
-               --header postscript-driver.header \
-               --intro postscript-driver.shtml
-       mxmldoc --section "Programming" \
-               --title "Introduction to the PPD Compiler" \
-               --framed ../cups/ppd-compiler \
-               --css ../doc/cups-printable.css \
-               --header ppd-compiler.header \
-               --intro ppd-compiler.shtml
-       mxmldoc --section "Programming" \
-               --title "Developing Raster Printer Drivers" \
-               --framed ../cups/raster-driver \
-               --css ../doc/cups-printable.css \
-               --header raster-driver.header \
-               --intro raster-driver.shtml
-       mxmldoc --section "Specifications" \
-               --title "CUPS PPD Extensions" \
-               --framed ../cups/spec-ppd \
-               --css ../doc/cups-printable.css \
-               --header spec-ppd.header \
-               --intro spec-ppd.shtml \
-
 
 #
 # commandtops
@@ -279,7 +211,7 @@ framedhelp:
 
 commandtops:   commandtops.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
 
 
 #
@@ -288,7 +220,7 @@ commandtops:        commandtops.o ../cups/$(LIBCUPS)
 
 gziptoany:     gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
 
 
 #
@@ -298,33 +230,11 @@ gziptoany:        gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
 libcupsimage.so.2 libcupsimage.sl.2:   $(IMAGEOBJS)
        echo Linking $@...
        $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
-               -L../cups $(LINKCUPS) -lm
+               -L../cups $(LINKCUPS)
        $(RM) `basename $@ .2`
        $(LN) $@ `basename $@ .2`
 
 
-#
-# 32bit/libcupsimage.so.2
-#
-
-32bit/libcupsimage.so.2:       $(IMAGE32OBJS)
-       echo Linking 32-bit $@...
-       -mkdir 32bit
-       $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \
-               -L../cups/32bit $(LINKCUPS) -lm
-
-
-#
-# 64bit/libcupsimage.so.2
-#
-
-64bit/libcupsimage.so.2:       $(IMAGE64OBJS)
-       echo Linking 64-bit $@...
-       -mkdir 64bit
-       $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \
-               -L../cups/64bit $(LINKCUPS) -lm
-
-
 #
 # libcupsimage.2.dylib
 #
@@ -335,7 +245,7 @@ libcupsimage.2.dylib:       $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
                -install_name $(libdir)/$@ \
                -current_version 2.3.0 \
                -compatibility_version 2.0.0 \
-               $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
+               $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS)
        $(RM) libcupsimage.dylib
        $(LN) $@ libcupsimage.dylib
 
@@ -347,7 +257,7 @@ libcupsimage.2.dylib:       $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
 libcupsimage_s.a:      $(IMAGEOBJS) libcupsimage_s.exp
        echo Linking $@...
        $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
-               -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm
+               -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS)
        $(RM) $@
        $(AR) $(ARFLAGS) $@ libcupsimage_s.o
 
@@ -380,7 +290,7 @@ libcupsimage.a:     $(IMAGEOBJS)
 
 pstops:        pstops.o common.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
+       $(LD_CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
 
 
 #
@@ -389,7 +299,7 @@ pstops:     pstops.o common.o ../cups/$(LIBCUPS)
 
 rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
 
 
 #
@@ -398,7 +308,7 @@ rastertoepson:      rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
 
 rastertohp:    rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
 
 
 #
@@ -407,7 +317,7 @@ rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
 
 rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
 
 
 #
@@ -416,7 +326,24 @@ rastertolabel:     rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
 
 rastertopwg:   rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+
+rastertopwg-static:    rastertopwg.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
+       echo Linking $@...
+       $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o libcupsimage.a \
+               ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
+               $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
+
+
+#
+# testclient (dependency on static libraries is intentional)
+#
+
+testclient:    testclient.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
+       echo Linking $@...
+       $(LD_CC) $(LDFLAGS) -o $@ testclient.o \
+               libcupsimage.a ../cups/$(LIBCUPSSTATIC) \
+               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -425,7 +352,7 @@ rastertopwg:        rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
 
 testraster:    testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
        echo Linking $@...
-       $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
+       $(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
                ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
                $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
        echo Running raster API tests...
@@ -438,7 +365,7 @@ testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
 
 rasterbench:   rasterbench.o libcupsimage.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
 
 
 #
@@ -446,8 +373,3 @@ rasterbench:        rasterbench.o libcupsimage.a
 #
 
 include Dependencies
-
-
-#
-# End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".
-#