]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - test/Makefile
Fix Avahi/Linux build error (Issue #5566)
[thirdparty/cups.git] / test / Makefile
index aef5c1b32a3333df09241902b259871ec346f15a..d2e047cb523ca431424df84d05203faa4936e3cc 100644 (file)
@@ -1,16 +1,10 @@
 #
-# "$Id$"
+# IPP test makefile for CUPS.
 #
-#   IPP test makefile for CUPS.
+# Copyright 2007-2019 by Apple Inc.
+# Copyright 1997-2006 by Easy Software Products, all rights reserved.
 #
-#   Copyright 2007-2014 by Apple Inc.
-#   Copyright 1997-2006 by Easy Software Products, all rights reserved.
-#
-#   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/".
+# Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
 #
 
 include ../Makedefs
@@ -42,6 +36,7 @@ TESTFILES     =       \
                        get-jobs.test \
                        get-notifications.test \
                        get-printer-attributes.test \
+                       get-printer-attributes-suite.test \
                        get-subscriptions.test \
                        ipp-1.1.test \
                        ipp-2.0.test \
@@ -53,17 +48,17 @@ TESTFILES   =       \
                        print-job-gzip.test \
                        validate-job.test
 OBJS           =       \
+                       ippevepcl.o \
+                       ippeveprinter.o \
+                       ippeveps.o \
                        ippfind.o \
-                       ippinfra.o \
-                       ippproxy.o \
-                       ippserver.o \
-                       ipptool.o \
-                       xmltotest.o
+                       ipptool.o
 TARGETS                =       \
+                       $(IPPEVECOMMANDS) \
+                       ippeveprinter \
                        $(IPPFIND_BIN) \
-                       ippserver \
                        ipptool \
-                       ipptool-static
+                       $(LOCALTARGET)
 
 
 #
@@ -92,7 +87,8 @@ unittests:
 #
 
 clean:
-       $(RM) $(TARGETS) $(OBJS) ippfind-static ippinfra ippinfra-shared ippproxy ippproxy-shared ippserver-shared
+       $(RM) $(TARGETS) $(OBJS)
+       $(RM) ippeveprinter-static ippfind-static ipptool-static
 
 
 #
@@ -132,14 +128,23 @@ install-data:
 install-exec:
        echo Installing ipptool in $(BINDIR)...
        $(INSTALL_DIR) -m 755 $(BINDIR)
-       $(INSTALL_BIN) ipptool $(BINDIR)
+       $(INSTALL_BIN) ippeveprinter $(BINDIR)
        if test -x ippfind; then \
                $(INSTALL_BIN) ippfind $(BINDIR); \
        fi
+       $(INSTALL_BIN) ipptool $(BINDIR)
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/ippeveprinter
+       for file in $(IPPEVECOMMANDS); do \
+               $(INSTALL_BIN) $$file $(SERVERBIN)/ippeveprinter; \
+       done
        if test "x$(SYMROOT)" != "x"; then \
                $(INSTALL_DIR) $(SYMROOT); \
-               cp ippfind $(SYMROOT); \
-               dsymutil $(SYMROOT)/ippfind; \
+               cp ippeveprinter $(SYMROOT); \
+               dsymutil $(SYMROOT)/ippeveprinter; \
+               if test -x ippfind; then \
+                       cp ippfind $(SYMROOT); \
+                       dsymutil $(SYMROOT)/ippfind; \
+               fi; \
                cp ipptool $(SYMROOT); \
                dsymutil $(SYMROOT)/ipptool; \
        fi
@@ -165,6 +170,14 @@ install-libs:
 
 uninstall:
        echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
+       for file in ippeveprinter ippfind ipptool; do \
+               $(RM) $(BINDIR)/$$file; \
+       done
+       -$(RMDIR) $(BINDIR)
+       for file in $(IPPEVECOMMANDS); do \
+               $(RM) $(SERVERBIN)/ippeveprinter/$$file; \
+       done
+       -$(RMDIR) $(SERVERBIN)/ippeveprinter
        for file in $(DATAFILES); do \
                $(RM) $(DATADIR)/ipptool/$$file; \
        done
@@ -175,72 +188,72 @@ uninstall:
 
 
 #
-# ippfind
+# Local programs (not built when cross-compiling...)
 #
 
-ippfind:       ippfind.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSSTATIC)
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ippfind.o $(LIBS)
-       echo Linking $@-static...
-       $(CC) $(LDFLAGS) -o $@-static ippfind.o  ../cups/$(LIBCUPSSTATIC) \
-               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+local: ippeveprinter-static ipptool-static
 
 
 #
-# ippinfra
+# ippeveprinter
 #
 
-ippinfra:      ippinfra.o ../cups/$(LIBCUPSSTATIC)
+ippeveprinter: ippeveprinter.o ../cups/$(LIBCUPSSTATIC)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ippinfra.o  ../cups/$(LIBCUPSSTATIC) \
-               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(LIBS)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
-# ippinfra-shared
+# ippeveprinter-static
 #
 
-ippinfra-shared:       ippinfra.o ../cups/$(LIBCUPS)
+ippeveprinter-static:  ippeveprinter.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ippinfra.o $(LIBS)
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o  ../cups/$(LIBCUPSSTATIC) \
+               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
-# ippproxy
+# ippevepcl
 #
 
-ippproxy:      ippproxy.o ../cups/$(LIBCUPSSTATIC)
+ippevepcl:     ippevepcl.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ippproxy.o  ../cups/$(LIBCUPSSTATIC) \
-               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ippevepcl.o $(LIBS)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
-# ippproxy-shared
+# ippeveps
 #
 
-ippproxy-shared:       ippproxy.o ../cups/$(LIBCUPS)
+ippeveps:      ippeveps.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ippproxy.o $(LIBS)
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveps.o $(LIBS)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
-# ippserver
+# ippfind
 #
 
-ippserver:     ippserver.o ../cups/$(LIBCUPSSTATIC)
+ippfind:       ippfind.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ippserver.o  ../cups/$(LIBCUPSSTATIC) \
-               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o $(LIBS)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
-# ippserver-shared
+# ippfind-static
 #
 
-ippserver-shared:      ippserver.o ../cups/$(LIBCUPS)
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ippserver.o $(LIBS)
+ippfind-static:        ippfind.o ../cups/$(LIBCUPSSTATIC)
+       echo Linking $@
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o  ../cups/$(LIBCUPSSTATIC) \
+               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
@@ -249,7 +262,8 @@ ippserver-shared:   ippserver.o ../cups/$(LIBCUPS)
 
 ipptool:       ipptool.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o $(LIBS)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
@@ -258,19 +272,21 @@ ipptool:  ipptool.o ../cups/$(LIBCUPS)
 
 ipptool-static:        ipptool.o ../cups/$(LIBCUPSSTATIC)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ipptool.o  ../cups/$(LIBCUPSSTATIC) \
+       $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o  ../cups/$(LIBCUPSSTATIC) \
                $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 
 
 #
-# xmltotest
+# printer-png.h
 #
 
-xmltotest: xmltotest.o ../cups/$(LIBUPSSTATIC)
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ xmltotest.o  ../cups/$(LIBCUPSSTATIC) \
-               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) \
-               $(LIBMXML)
+printer-png.h: printer.png
+       echo "Generating printer-png.h from printer.png..."
+       echo "static const unsigned char printer_png[] =" >printer-png.h
+       echo "{" >>printer-png.h
+       od -t x1 printer.png | cut -b12- | awk '{printf("  "); for (i = 1; i <= NF; i ++) printf("0x%s,", $$i); print "";}' >>printer-png.h
+       echo "};" >>printer-png.h
 
 
 #
@@ -278,8 +294,3 @@ xmltotest: xmltotest.o ../cups/$(LIBUPSSTATIC)
 #
 
 include Dependencies
-
-
-#
-# End of "$Id$".
-#