]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/Makefile
Merge changes from CUPS 1.4svn-r8606.
[thirdparty/cups.git] / filter / Makefile
index 5f6a4aca52793b783b4e320c5c36c11f09b93d06..2bb7a7f5277af1efda57ec4d0b23efe3d2673995 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $"
+# "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $"
 #
 #   Filter makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 2007-2008 by Apple Inc.
+#   Copyright 2007-2009 by Apple Inc.
 #   Copyright 1997-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 include ../Makedefs
 
 
-FILTERS        =       gziptoany hpgltops texttops pstops $(IMGFILTERS) \
-               $(PDFTOPS) rastertolabel rastertoepson rastertohp
-TARGETS        =       $(FILTERS) \
+FILTERS        =       \
+               $(BANNERTOPS) \
+               commandtops \
+               gziptoany \
+               hpgltops \
+               $(TEXTTOPS) \
+               pstops \
+               $(IMGFILTERS) \
+               $(PDFTOPS) \
+               rastertolabel \
+               rastertoepson \
+               rastertohp
+LIBTARGETS =   \
                $(LIBCUPSIMAGE) \
                libcupsimage.a \
                $(LIB32CUPSIMAGE) \
-               $(LIB64CUPSIMAGE) \
+               $(LIB64CUPSIMAGE)
+UNITTARGETS =  \
                rasterbench \
                testimage \
                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
@@ -39,8 +53,8 @@ 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) \
-               gziptoany.o imagetops.o imagetoraster.o common.o \
-               pdftops.o pstops.o \
+               bannertops.o commandtops.o gziptoany.o imagetops.o \
+               imagetoraster.o common.o pdftops.o pstext.o pstops.o \
                rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
                testimage.o testraster.o textcommon.o texttops.o
 
@@ -52,12 +66,26 @@ OBJS        =       $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
 all:   $(TARGETS)
 
 
+#
+# Make library targets...
+#
+
+libs:          $(LIBTARGETS)
+
+
+#
+# Make unit tests...
+#
+
+unittests:     $(UNITTARGETS)
+
+
 #
 # Clean all object files...
 #
 
 clean:
-       $(RM) $(OBJS) $(TARGETS)
+       $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
        $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
        $(RM) -r 32bit 64bit
 
@@ -71,8 +99,8 @@ depend:
        makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
        $(RM) Dependencies
        cp Dependencies.tmp Dependencies
-       sed -r -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
-       sed -r -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' 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
 
 
@@ -80,13 +108,49 @@ depend:
 # Install all targets...
 #
 
-install:       all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
+install:       all install-data install-headers install-libs install-exec
+
+
+#
+# Install data files...
+#
+
+install-data:
+
+
+#
+# Install programs...
+#
+
+install-exec:
        $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
        for file in $(FILTERS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
        done
        $(RM) $(SERVERBIN)/filter/rastertodymo
        $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
+       if test "x$(SYMROOT)" != "x"; then \
+               $(INSTALL_DIR) $(SYMROOT); \
+               for file in $(TARGETS); do \
+                       cp $$file $(SYMROOT); \
+               done \
+       fi
+
+
+#
+# Install headers...
+#
+
+install-headers:
+       $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
+       $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
+
+
+#
+# Install libraries...
+#
+
+install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
        $(INSTALL_DIR) -m 755 $(LIBDIR)
        $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
        -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
@@ -94,27 +158,15 @@ install:   all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
                $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
        fi
        -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
-               $(STRIP) -x $(LIBDIR)/$(LIBCUPSIMAGE); \
                $(RM) $(LIBDIR)/libcupsimage.dylib; \
                $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
        fi
-       if test "x$(SYMROOT)" != "x"; then \
-               $(INSTALL_DIR) $(SYMROOT); \
-               for file in $(TARGETS); do \
-                       cp $$file $(SYMROOT); \
-               done \
-       fi
 
 installstatic:
        $(INSTALL_DIR) -m 755 $(LIBDIR)
        $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
        $(RANLIB) $(LIBDIR)/libcupsimage.a;
 
-installhdrs:
-       $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
-       $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
-       $(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups
-
 install32bit:
        $(INSTALL_DIR) -m 755 $(LIB32DIR)
        $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2
@@ -147,7 +199,6 @@ uninstall: $(UNINSTALL32) $(UNINSTALL64)
        $(RM) $(LIBDIR)/libcupsimage.so.2
        -$(RMDIR) $(LIBDIR)
        $(RM) $(INCLUDEDIR)/cups/image.h
-       $(RM) $(INCLUDEDIR)/cups/raster.h
        -$(RMDIR) $(INCLUDEDIR)/cups
 
 uninstall32bit:
@@ -170,7 +221,29 @@ apihelp:
        mxmldoc --section "Programming" --title "Raster API" \
                --css ../doc/cups-printable.css \
                --header api-raster.header --intro api-raster.shtml \
-               raster.h interpret.c raster.c >../doc/help/api-raster.html
+               api-raster.xml \
+               ../cups/raster.h interpret.c raster.c \
+               >../doc/help/api-raster.html
+       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 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
 
 framedhelp:
        echo Generating CUPS API help files...
@@ -178,7 +251,44 @@ framedhelp:
                --framed ../cups/api-raster \
                --css ../doc/cups-printable.css \
                --header api-raster.header --intro api-raster.shtml \
-               raster.h interpret.c raster.c
+               ../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
+
+
+#
+# bannertops
+#
+
+bannertops:    bannertops.o pstext.o common.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o $@ bannertops.o pstext.o common.o $(LINKCUPSIMAGE) \
+               $(IMGLIBS) $(LIBS)
+
+
+#
+# commandtops
+#
+
+commandtops:   commandtops.o ../cups/$(LIBCUPS)
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
 
 
 #
@@ -375,8 +485,11 @@ rastertohp:        rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
 
 testraster:    testraster.o ../cups/libcups.a libcupsimage.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \
-               $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) $(SSLLIBS) $(LIBGSSAPI)
+       $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
+               ../cups/libcups.a $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
+               $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
+       echo Running raster API tests...
+       ./testraster
 
 
 #
@@ -406,5 +519,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".
+# End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".
 #