]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/Makefile
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / filter / Makefile
index 6e288c010aa9bc60fe252a5b03db46b8d559eca5..9b1680995cb103e516f99765c97f0c71186aa414 100644 (file)
@@ -1,18 +1,10 @@
 #
-# "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $"
+# Filter makefile for CUPS.
 #
-#   Filter makefile for the Common UNIX Printing System (CUPS).
+# Copyright 2007-2017 by Apple Inc.
+# Copyright 1997-2006 by Easy Software Products.
 #
-#   Copyright 2007-2008 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
@@ -21,41 +13,27 @@ include ../Makedefs
 FILTERS        =       \
                commandtops \
                gziptoany \
-               hpgltops \
-               texttops \
                pstops \
-               $(IMGFILTERS) \
-               $(PDFTOPS) \
-               rastertolabel \
                rastertoepson \
-               rastertohp
+               rastertohp \
+               rastertolabel \
+               rastertopwg
 LIBTARGETS =   \
                $(LIBCUPSIMAGE) \
-               libcupsimage.a \
-               $(LIB32CUPSIMAGE) \
-               $(LIB64CUPSIMAGE)
+               libcupsimage.a
 UNITTARGETS =  \
                rasterbench \
-               testimage \
+               testclient \
                testraster
 TARGETS        =       \
                $(LIBTARGETS) \
                $(FILTERS)
 
-HPGLOBJS =     hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
-               hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
-IMAGEOBJS =    image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
-               image-photocd.o image-pix.o image-png.o image-pnm.o \
-               image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
-               image-zoom.o image.o error.o interpret.o raster.o
-IMAGE32OBJS =  $(IMAGEOBJS:.o=.32.o)
-IMAGE64OBJS =  $(IMAGEOBJS:.o=.64.o)
-FORMOBJS =     form-attr.o form-main.o form-ps.o form-text.o form-tree.o
-OBJS   =       $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
-               commandtops.o gziptoany.o imagetops.o imagetoraster.o common.o \
-               pdftops.o pstops.o \
+IMAGEOBJS =    error.o interpret.o raster.o
+OBJS   =       $(IMAGEOBJS) \
+               commandtops.o gziptoany.o common.o pstops.o \
                rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
-               testimage.o testraster.o textcommon.o texttops.o
+               rastertopwg.o testclient.o testraster.o
 
 
 #
@@ -86,7 +64,6 @@ unittests:    $(UNITTARGETS)
 clean:
        $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
        $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
-       $(RM) -r 32bit 64bit
 
 
 #
@@ -94,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
 
 
 #
@@ -130,8 +101,9 @@ install-exec:
        $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
        if test "x$(SYMROOT)" != "x"; then \
                $(INSTALL_DIR) $(SYMROOT); \
-               for file in $(TARGETS); do \
+               for file in $(FILTERS); do \
                        cp $$file $(SYMROOT); \
+                       dsymutil $(SYMROOT)/$$file; \
                done \
        fi
 
@@ -141,15 +113,13 @@ install-exec:
 #
 
 install-headers:
-       $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
-       $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
 
 
 #
 # 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 \
@@ -160,28 +130,24 @@ install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
                $(RM) $(LIBDIR)/libcupsimage.dylib; \
                $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
        fi
+       if test "x$(SYMROOT)" != "x"; then \
+               $(INSTALL_DIR) $(SYMROOT); \
+               cp $(LIBCUPSIMAGE) $(SYMROOT); \
+               dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \
+       fi
 
 installstatic:
        $(INSTALL_DIR) -m 755 $(LIBDIR)
-       $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
-       $(RANLIB) $(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
+       $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR)
+       $(RANLIB) $(LIBDIR)/libcupsimage.a
+       $(CHMOD) 555 $(LIBDIR)/libcupsimage.a
 
 
 #
 # Uninstall all targets...
 #
 
-uninstall: $(UNINSTALL32) $(UNINSTALL64)
+uninstall:
        for file in $(FILTERS); do \
                $(RM) $(SERVERBIN)/filter/$$file; \
        done
@@ -197,18 +163,6 @@ uninstall: $(UNINSTALL32) $(UNINSTALL64)
        $(RM) $(LIBDIR)/libcupsimage.so
        $(RM) $(LIBDIR)/libcupsimage.so.2
        -$(RMDIR) $(LIBDIR)
-       $(RM) $(INCLUDEDIR)/cups/image.h
-       -$(RMDIR) $(INCLUDEDIR)/cups
-
-uninstall32bit:
-       $(RM) $(LIB32DIR)/libcupsimage.so
-       $(RM) $(LIB32DIR)/libcupsimage.so.2
-       -$(RMDIR) $(LIB32DIR)
-
-uninstall64bit:
-       $(RM) $(LIB64DIR)/libcupsimage.so
-       $(RM) $(LIB64DIR)/libcupsimage.so.2
-       -$(RMDIR) $(LIB64DIR)
 
 
 #
@@ -220,16 +174,35 @@ apihelp:
        mxmldoc --section "Programming" --title "Raster API" \
                --css ../doc/cups-printable.css \
                --header api-raster.header --intro api-raster.shtml \
+               api-raster.xml \
                ../cups/raster.h interpret.c raster.c \
                >../doc/help/api-raster.html
-
-framedhelp:
-       echo Generating CUPS API help files...
-       mxmldoc --section "Programming" --title "Raster API" \
-               --framed ../cups/api-raster \
+       mxmldoc --tokens help/api-raster.html api-raster.xml >../doc/help/api-raster.tokens
+       $(RM) api-raster.xml
+       mxmldoc --section "Programming" \
+               --title "Developing PostScript Printer Drivers" \
                --css ../doc/cups-printable.css \
-               --header api-raster.header --intro api-raster.shtml \
-               ../cups/raster.h interpret.c raster.c
+               --header postscript-driver.header \
+               --intro postscript-driver.shtml \
+               >../doc/help/postscript-driver.html
+       mxmldoc --section "Programming" \
+               --title "Introduction to the PPD Compiler" \
+               --css ../doc/cups-printable.css \
+               --header ppd-compiler.header \
+               --intro ppd-compiler.shtml \
+               >../doc/help/ppd-compiler.html
+       mxmldoc --section "Programming" \
+               --title "Developing Raster Printer Drivers" \
+               --css ../doc/cups-printable.css \
+               --header raster-driver.header \
+               --intro raster-driver.shtml \
+               >../doc/help/raster-driver.html
+       mxmldoc --section "Specifications" \
+               --title "CUPS PPD Extensions" \
+               --css ../doc/cups-printable.css \
+               --header spec-ppd.header \
+               --intro spec-ppd.shtml \
+               >../doc/help/spec-ppd.html
 
 
 #
@@ -238,16 +211,7 @@ framedhelp:
 
 commandtops:   commandtops.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
-
-
-#
-# formtops
-#
-
-formtops:      $(FORMOBJS) common.o ../cups/$(LIBCUPS)
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
+       $(LD_CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
 
 
 #
@@ -256,16 +220,7 @@ formtops:  $(FORMOBJS) common.o ../cups/$(LIBCUPS)
 
 gziptoany:     gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
-
-
-#
-# hpgltops
-#
-
-hpgltops:      $(HPGLOBJS) common.o ../cups/$(LIBCUPS)
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm
+       $(LD_CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
 
 
 #
@@ -275,33 +230,11 @@ hpgltops: $(HPGLOBJS) common.o ../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
 #
@@ -312,8 +245,7 @@ libcupsimage.2.dylib:       $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
                -install_name $(libdir)/$@ \
                -current_version 2.3.0 \
                -compatibility_version 2.0.0 \
-               -sectorder __TEXT __text $(LIBCUPSIMAGEORDER) \
-               $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
+               $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS)
        $(RM) libcupsimage.dylib
        $(LN) $@ libcupsimage.dylib
 
@@ -325,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
 
@@ -353,53 +285,30 @@ libcupsimage.a:   $(IMAGEOBJS)
 
 
 #
-# testimage
-#
-
-testimage:     testimage.o libcupsimage.a ../Makedefs
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
-               $(IMGLIBS) $(DSOLIBS) $(LIBS)
-
-
-#
-# imagetops
-#
-
-imagetops:     imagetops.o common.o $(LIBCUPSIMAGE) \
-               ../cups/$(LIBCUPS)
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
-               $(IMGLIBS) $(LIBS)
-
-
-#
-# imagetoraster
+# pstops
 #
 
-imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
-               ../cups/$(LIBCUPS)
+pstops:        pstops.o common.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
-               $(IMGLIBS) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
 
 
 #
-# pstops
+# rastertoepson
 #
 
-pstops:        pstops.o common.o ../cups/$(LIBCUPS)
+rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
+       $(LD_CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
 
 
 #
-# pdftops
+# rastertohp
 #
 
-pdftops:       pdftops.o common.o ../cups/$(LIBCUPS)
+rastertohp:    rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ pdftops.o common.o $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
 
 
 #
@@ -408,36 +317,44 @@ pdftops:  pdftops.o common.o ../cups/$(LIBCUPS)
 
 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)
 
 
 #
-# rastertoepson
+# rastertopwg
 #
 
-rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
+rastertopwg:   rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
+       echo Linking $@...
+       $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+
+rastertopwg-static:    rastertopwg.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o libcupsimage.a \
+               ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
+               $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
 
 
 #
-# rastertohp
+# testclient (dependency on static libraries is intentional)
 #
 
-rastertohp:    rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
+testclient:    testclient.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ testclient.o \
+               libcupsimage.a ../cups/$(LIBCUPSSTATIC) \
+               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
 # testraster
 #
 
-testraster:    testraster.o ../cups/libcups.a libcupsimage.a
+testraster:    testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
        echo Linking $@...
-       $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
-               ../cups/libcups.a $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
-               $(SSLLIBS) $(LIBGSSAPI)
+       $(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
+               ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
+               $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
        echo Running raster API tests...
        ./testraster
 
@@ -448,26 +365,11 @@ testraster:       testraster.o ../cups/libcups.a libcupsimage.a
 
 rasterbench:   rasterbench.o libcupsimage.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
-
-
-#
-# texttops
-#
-
-texttops:      texttops.o textcommon.o common.o \
-               ../cups/$(LIBCUPS)
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
+       $(LD_CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
 
 
 #
 # Dependencies...
 #
-  
-include Dependencies
 
-
-#
-# End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".
-#
+include Dependencies