#
-# "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $"
+# Filter makefile for CUPS.
#
-# Filter makefile for the Common UNIX Printing System (CUPS).
+# Copyright © 2007-2018 by Apple Inc.
+# Copyright © 1997-2006 by Easy Software Products.
#
-# Copyright 1997-2005 by Easy Software Products.
-#
-# 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
-#
-# 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
-FILTERS = gziptoany hpgltops texttops pstops imagetops imagetoraster \
- rastertolabel rastertoepson rastertohp
-TARGETS = $(FILTERS) testraster
-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 interpret.o raster.o
-FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o
-OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
- imagetops.o imagetoraster.o common.o pstops.o raster.o \
- rastertolabel.o rastertoepson.o rastertohp.o \
- texttops.o textcommon.o testraster.o gziptoany.o
+TARGETS = \
+ commandtops \
+ gziptoany \
+ pstops \
+ rastertoepson \
+ rastertohp \
+ rastertolabel \
+ rastertopwg
+
+OBJS = commandtops.o gziptoany.o common.o pstops.o \
+ rastertoepson.o rastertohp.o rastertolabel.o \
+ rastertopwg.o
#
# Make all targets...
#
-all: $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a
+all: $(TARGETS)
#
-# Clean all object files...
+# Make library targets...
#
-clean:
- $(RM) $(OBJS) $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a
- $(RM) `basename $(LIBCUPSIMAGE) .2` libcupsimage.dylib
+libs:
#
-# Update dependencies (without system header dependencies...)
+# Make unit tests...
#
-depend:
- makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
+unittests:
#
-# Install all targets...
-#
-
-install: all installhdrs $(INSTALLSTATIC)
- $(INSTALL_DIR) $(SERVERBIN)/filter
- for file in $(FILTERS); do \
- $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
- done
- $(RM) $(SERVERBIN)/filter/rastertodymo
- $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
- $(INSTALL_DIR) -m 755 $(LIBDIR)
- $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
- -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
- $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
- $(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
-
-installstatic:
- $(INSTALL_DIR) -m 755 $(LIBDIR)
- -if test $(LIBCUPSIMAGE) != "libcupsimage.a"; then \
- $(INSTALL_LIB) libcupsimage.a $(LIBDIR); \
- $(RANLIB) $(LIBDIR)/libcupsimage.a; \
- fi
-
-installhdrs:
- $(INSTALL_DIR) $(INCLUDEDIR)/cups
- $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
- $(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups
-
-
-#
-# formtops
+# Clean all object files...
#
-formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS)
- echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
+clean:
+ $(RM) $(OBJS) $(TARGETS)
#
-# gziptoany
+# Update dependencies (without system header dependencies...)
#
-gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
- echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
+depend:
+ $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
#
-# hpgltops
+# Install all targets...
#
-hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS)
- echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm
+install: all install-data install-headers install-libs install-exec
#
-# libcupsimage.so.2, libcupsimage.sl.2
+# Install data files...
#
-libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
- echo Linking $@...
- $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) -lm
- $(RM) `basename $@ .2`
- $(LN) $@ `basename $@ .2`
+install-data:
#
-# libcupsimage.2.dylib
+# Install programs...
#
-libcupsimage.2.dylib: $(IMAGEOBJS)
- echo Linking $@...
- $(DSO) $(DSOFLAGS) -o $@ \
- -install_name $(libdir)/$@ \
- -current_version 2.2.0 \
- -compatibility_version 2.0.0 \
- $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
- $(RM) libcupsimage.dylib
- $(LN) $@ libcupsimage.dylib
+install-exec:
+ $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
+ for file in $(TARGETS); do \
+ $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
+ done
+ if test "x$(SYMROOT)" != "x"; then \
+ $(INSTALL_DIR) $(SYMROOT); \
+ for file in $(TARGETS); do \
+ cp $$file $(SYMROOT); \
+ dsymutil $(SYMROOT)/$$file; \
+ done \
+ fi
#
-# libcupsimage_s.a
+# Install headers...
#
-libcupsimage_s.a: $(IMAGEOBJS)
- echo Linking $@...
- $(DSO) $(DSOFLAGS) -Wl,-berok -o libcupsimage_s.o $(IMAGEOBJS) \
- $(DSOLIBS) -lm
- $(RM) $@
- $(AR) $(ARFLAGS) $@ libcupsimage_s.o
+install-headers:
#
-# libcupsimage.la
+# Install libraries...
#
-libcupsimage.la: $(IMAGEOBJS)
- echo Linking $@...
- $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
- -rpath $(LIBDIR) -version-info 2:2
+install-libs:
#
-# libcupsimage.a
+# Uninstall all targets...
#
-libcupsimage.a: $(IMAGEOBJS)
- echo Archiving $@...
- $(RM) $@
- $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
- $(RANLIB) $@
+uninstall:
+ for file in $(TARGETS); do \
+ $(RM) $(SERVERBIN)/filter/$$file; \
+ done
+ -$(RMDIR) $(SERVERBIN)/filter
+ -$(RMDIR) $(SERVERBIN)
#
-# testimage
+# Automatic API help files...
#
-testimage: testimage.o libcupsimage.a ../Makedefs
- echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
- $(IMGLIBS) $(DSOLIBS) $(LIBS)
+apihelp:
+ echo Generating CUPS API help files...
+ 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
+ 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
#
-# imagetops
+# commandtops
#
-imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \
- ../cups/$(LIBCUPS)
+commandtops: commandtops.o ../cups/$(LIBCUPS)
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
- $(IMGLIBS) $(LIBS)
+ $(LD_CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
#
-# imagetoraster
+# gziptoany
#
-imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
- ../cups/$(LIBCUPS)
+gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
- $(IMGLIBS) $(LIBS)
+ $(LD_CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
#
pstops: pstops.o common.o ../cups/$(LIBCUPS)
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
-
-
-#
-# rastertolabel
-#
-
-rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
- echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+ $(LD_CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
#
# rastertoepson
#
-rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
+rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSIMAGE)
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+ $(LD_CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
#
# rastertohp
#
-rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
+rastertohp: rastertohp.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSIMAGE)
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+ $(LD_CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
#
-# testraster
+# rastertolabel
#
-testraster: testraster.o raster.o
+rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSIMAGE)
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ testraster.o raster.o
+ $(LD_CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
#
-# texttops
+# rastertopwg
#
-texttops: texttops.o textcommon.o common.o \
- ../cups/$(LIBCUPS)
+rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSIMAGE)
echo Linking $@...
- $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
+ $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
+
+rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC) ../cups/libcupsimage.a
+ echo Linking $@...
+ $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o ../cups/libcupsimage.a \
+ ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
+ $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
#
# Dependencies...
#
-
-include Dependencies
-
-#
-# End of "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $".
-#
+include Dependencies