summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile84
1 files changed, 74 insertions, 10 deletions
diff --git a/test/Makefile b/test/Makefile
index b218f1c7..8f25af6a 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,9 +1,9 @@
#
-# "$Id: Makefile 8224 2009-01-09 21:28:38Z mike $"
+# "$Id: Makefile 9517 2011-02-10 23:19:21Z mike $"
#
-# IPP test makefile for the Common UNIX Printing System (CUPS).
+# IPP test makefile for CUPS.
#
-# Copyright 2007-2009 by Apple Inc.
+# Copyright 2007-2010 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -17,10 +17,34 @@ include ../Makedefs
#
+# Sample test files.
+#
+
+TESTFILES = \
+ create-printer-subscription.test \
+ get-completed-jobs.test \
+ get-jobs.test \
+ ipp-1.1.test \
+ ipp-2.0.test \
+ ipp-2.1.test \
+ testfile.jpg \
+ testfile.pdf \
+ testfile.ps \
+ testfile.txt
+OBJS = \
+ ippserver.o \
+ ipptool.o
+TARGETS = \
+ ippserver \
+ ipptool \
+ ipptool-static
+
+
+#
# Make all targets...
#
-all: ipptest
+all: $(TARGETS)
#
@@ -42,7 +66,7 @@ unittests:
#
clean:
- $(RM) ipptest ipptest.o
+ $(RM) $(TARGETS) $(OBJS)
#
@@ -50,7 +74,7 @@ clean:
#
depend:
- makedepend -Y -I.. -fDependencies ipptest.c >/dev/null 2>&1
+ makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
#
@@ -65,6 +89,11 @@ install: all install-data install-headers install-libs install-exec
#
install-data:
+ echo Installing sample ipptool files in $(DATADIR)/ipptool...
+ $(INSTALL_DIR) -m 755 $(DATADIR)/ipptool
+ for file in $(TESTFILES); do \
+ $(INSTALL_DATA) $$file $(DATADIR)/ipptool; \
+ done
#
@@ -72,6 +101,13 @@ install-data:
#
install-exec:
+ echo Installing ipptool in $(BINDIR)...
+ $(INSTALL_DIR) -m 755 $(BINDIR)
+ $(INSTALL_BIN) ipptool $(BINDIR)
+ if test "x$(SYMROOT)" != "x"; then \
+ $(INSTALL_DIR) $(SYMROOT); \
+ cp ipptool $(SYMROOT); \
+ fi
#
@@ -96,12 +132,40 @@ uninstall:
#
-# ipptest
+# ippserver
+#
+
+ippserver: ippserver.o ../cups/$(LIBCUPSSTATIC)
+ echo Linking $@...
+ $(CC) $(LDFLAGS) -o $@ ippserver.o ../cups/$(LIBCUPSSTATIC) \
+ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+
+
+#
+# ippserver-shared
+#
+
+ippserver-shared: ippserver.o ../cups/$(LIBCUPS)
+ echo Linking $@...
+ $(CC) $(LDFLAGS) -o $@ ippserver.o $(LIBS)
+
+
+#
+# ipptool
+#
+
+ipptool: ipptool.o ../cups/$(LIBCUPS)
+ echo Linking $@...
+ $(CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
+
+
+#
+# ipptool-static
#
-ipptest: ipptest.o ../cups/libcups.a
+ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
- $(CC) $(LDFLAGS) -o ipptest ipptest.o ../cups/libcups.a \
+ $(CC) $(LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
@@ -113,5 +177,5 @@ include Dependencies
#
-# End of "$Id: Makefile 8224 2009-01-09 21:28:38Z mike $".
+# End of "$Id: Makefile 9517 2011-02-10 23:19:21Z mike $".
#