1#
2# "$Id: Makefile 11158 2013-07-17 18:31:56Z msweet $"
3#
4#   IPP test makefile for CUPS.
5#
6#   Copyright 2007-2013 by Apple Inc.
7#   Copyright 1997-2006 by Easy Software Products, all rights reserved.
8#
9#   These coded instructions, statements, and computer programs are the
10#   property of Apple Inc. and are protected by Federal copyright
11#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
12#   which should have been included with this file.  If this file is
13#   file is missing or damaged, see the license at "http://www.cups.org/".
14#
15
16include ../Makedefs
17
18
19#
20# Sample test files.
21#
22
23DATAFILES	=	\
24			color.jpg \
25			document-a4.pdf \
26			document-a4.ps \
27			document-letter.pdf \
28			document-letter.ps \
29			gray.jpg \
30			onepage-a4.pdf \
31			onepage-a4.ps \
32			onepage-letter.pdf \
33			onepage-letter.ps \
34			testfile.jpg \
35			testfile.pcl \
36			testfile.pdf \
37			testfile.ps \
38			testfile.txt
39TESTFILES	=	\
40			create-printer-subscription.test \
41			get-completed-jobs.test \
42			get-jobs.test \
43			get-notifications.test \
44			get-printer-attributes.test \
45			get-subscriptions.test \
46			ipp-1.1.test \
47			ipp-2.0.test \
48			ipp-2.1.test \
49			ipp-2.2.test \
50			ipp-everywhere.test \
51			print-job.test \
52			print-job-deflate.test \
53			print-job-gzip.test \
54			validate-job.test
55OBJS		=	\
56			ippfind.o \
57			ippserver.o \
58			ipptool.o \
59			xmltotest.o
60TARGETS		=	\
61			$(IPPFIND_BIN) \
62			ippserver \
63			ipptool \
64			ipptool-static
65
66
67#
68# Make all targets...
69#
70
71all:		$(TARGETS)
72
73
74#
75# Make library targets...
76#
77
78libs:
79
80
81#
82# Make unit tests...
83#
84
85unittests:
86
87
88#
89# Clean all object files...
90#
91
92clean:
93	$(RM) $(TARGETS) $(OBJS)
94
95
96#
97# Update dependencies (without system header dependencies...)
98#
99
100depend:
101	$(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
102
103
104#
105# Install all targets...
106#
107
108install:	all install-data install-headers install-libs install-exec
109
110
111#
112# Install data files...
113#
114
115install-data:
116	echo Installing sample ipptool files in $(DATADIR)/ipptool...
117	$(INSTALL_DIR) -m 755 $(DATADIR)/ipptool
118	for file in $(DATAFILES); do \
119		$(INSTALL_COMPDATA) $$file $(DATADIR)/ipptool; \
120	done
121	for file in $(TESTFILES); do \
122		$(INSTALL_DATA) $$file $(DATADIR)/ipptool; \
123	done
124
125
126#
127# Install programs...
128#
129
130install-exec:
131	echo Installing ipptool in $(BINDIR)...
132	$(INSTALL_DIR) -m 755 $(BINDIR)
133	$(INSTALL_BIN) ipptool $(BINDIR)
134	if test -x ippfind; then \
135		$(INSTALL_BIN) ippfind $(BINDIR); \
136	fi
137	if test "x$(SYMROOT)" != "x"; then \
138		$(INSTALL_DIR) $(SYMROOT); \
139		cp ippfind $(SYMROOT); \
140		dsymutil $(SYMROOT)/ippfind; \
141		cp ipptool $(SYMROOT); \
142		dsymutil $(SYMROOT)/ipptool; \
143	fi
144
145
146#
147# Install headers...
148#
149
150install-headers:
151
152
153#
154# Install libraries...
155#
156
157install-libs:
158
159
160#
161# Unnstall all targets...
162#
163
164uninstall:
165	echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
166	for file in $(DATAFILES); do \
167		$(RM) $(DATADIR)/ipptool/$$file; \
168	done
169	for file in $(TESTFILES); do \
170		$(RM) $(DATADIR)/ipptool/$$file; \
171	done
172	-$(RMDIR) $(DATADIR)/ipptool
173
174
175#
176# ippfind
177#
178
179ippfind:	ippfind.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSSTATIC)
180	echo Linking $@...
181	$(CC) $(LDFLAGS) -o $@ ippfind.o $(LIBS)
182	echo Linking $@-static...
183	$(CC) $(LDFLAGS) -o $@-static ippfind.o  ../cups/$(LIBCUPSSTATIC) \
184		$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
185
186
187#
188# ippserver
189#
190
191ippserver:	ippserver.o ../cups/$(LIBCUPSSTATIC)
192	echo Linking $@...
193	$(CC) $(LDFLAGS) -o $@ ippserver.o  ../cups/$(LIBCUPSSTATIC) \
194		$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
195
196
197#
198# ippserver-shared
199#
200
201ippserver-shared:	ippserver.o ../cups/$(LIBCUPS)
202	echo Linking $@...
203	$(CC) $(LDFLAGS) -o $@ ippserver.o $(LIBS)
204
205
206#
207# ipptool
208#
209
210ipptool:	ipptool.o ../cups/$(LIBCUPS)
211	echo Linking $@...
212	$(CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
213
214
215#
216# ipptool-static
217#
218
219ipptool-static:	ipptool.o ../cups/$(LIBCUPSSTATIC)
220	echo Linking $@...
221	$(CC) $(LDFLAGS) -o $@ ipptool.o  ../cups/$(LIBCUPSSTATIC) \
222		$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
223
224
225#
226# xmltotest
227#
228
229xmltotest: xmltotest.o ../cups/$(LIBUPSSTATIC)
230	echo Linking $@...
231	$(CC) $(LDFLAGS) -o $@ xmltotest.o  ../cups/$(LIBCUPSSTATIC) \
232		$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) \
233		$(LIBMXML)
234
235
236#
237# Dependencies...
238#
239
240include Dependencies
241
242
243#
244# End of "$Id: Makefile 11158 2013-07-17 18:31:56Z msweet $".
245#
246