]> git.ipfire.org Git - thirdparty/cups.git/blob - test/Makefile
Make sure clean and distclean remove all generated files.
[thirdparty/cups.git] / test / Makefile
1 #
2 # "$Id$"
3 #
4 # IPP test makefile for CUPS.
5 #
6 # Copyright 2007-2014 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
16 include ../Makedefs
17
18
19 #
20 # Sample test files.
21 #
22
23 DATAFILES = \
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
39 TESTFILES = \
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
55 OBJS = \
56 ippfind.o \
57 ippinfra.o \
58 ippproxy.o \
59 ippserver.o \
60 ipptool.o \
61 xmltotest.o
62 TARGETS = \
63 $(IPPFIND_BIN) \
64 ippserver \
65 ipptool \
66 ipptool-static
67
68
69 #
70 # Make all targets...
71 #
72
73 all: $(TARGETS)
74
75
76 #
77 # Make library targets...
78 #
79
80 libs:
81
82
83 #
84 # Make unit tests...
85 #
86
87 unittests:
88
89
90 #
91 # Clean all object files...
92 #
93
94 clean:
95 $(RM) $(TARGETS) $(OBJS) ippfind-static ippinfra ippinfra-shared ippproxy ippproxy-shared ippserver-shared
96
97
98 #
99 # Update dependencies (without system header dependencies...)
100 #
101
102 depend:
103 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
104
105
106 #
107 # Install all targets...
108 #
109
110 install: all install-data install-headers install-libs install-exec
111
112
113 #
114 # Install data files...
115 #
116
117 install-data:
118 echo Installing sample ipptool files in $(DATADIR)/ipptool...
119 $(INSTALL_DIR) -m 755 $(DATADIR)/ipptool
120 for file in $(DATAFILES); do \
121 $(INSTALL_COMPDATA) $$file $(DATADIR)/ipptool; \
122 done
123 for file in $(TESTFILES); do \
124 $(INSTALL_DATA) $$file $(DATADIR)/ipptool; \
125 done
126
127
128 #
129 # Install programs...
130 #
131
132 install-exec:
133 echo Installing ipptool in $(BINDIR)...
134 $(INSTALL_DIR) -m 755 $(BINDIR)
135 $(INSTALL_BIN) ipptool $(BINDIR)
136 if test -x ippfind; then \
137 $(INSTALL_BIN) ippfind $(BINDIR); \
138 fi
139 if test "x$(SYMROOT)" != "x"; then \
140 $(INSTALL_DIR) $(SYMROOT); \
141 cp ippfind $(SYMROOT); \
142 dsymutil $(SYMROOT)/ippfind; \
143 cp ipptool $(SYMROOT); \
144 dsymutil $(SYMROOT)/ipptool; \
145 fi
146
147
148 #
149 # Install headers...
150 #
151
152 install-headers:
153
154
155 #
156 # Install libraries...
157 #
158
159 install-libs:
160
161
162 #
163 # Unnstall all targets...
164 #
165
166 uninstall:
167 echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
168 for file in $(DATAFILES); do \
169 $(RM) $(DATADIR)/ipptool/$$file; \
170 done
171 for file in $(TESTFILES); do \
172 $(RM) $(DATADIR)/ipptool/$$file; \
173 done
174 -$(RMDIR) $(DATADIR)/ipptool
175
176
177 #
178 # ippfind
179 #
180
181 ippfind: ippfind.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSSTATIC)
182 echo Linking $@...
183 $(CC) $(LDFLAGS) -o $@ ippfind.o $(LIBS)
184 echo Linking $@-static...
185 $(CC) $(LDFLAGS) -o $@-static ippfind.o ../cups/$(LIBCUPSSTATIC) \
186 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
187
188
189 #
190 # ippinfra
191 #
192
193 ippinfra: ippinfra.o ../cups/$(LIBCUPSSTATIC)
194 echo Linking $@...
195 $(CC) $(LDFLAGS) -o $@ ippinfra.o ../cups/$(LIBCUPSSTATIC) \
196 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
197
198
199 #
200 # ippinfra-shared
201 #
202
203 ippinfra-shared: ippinfra.o ../cups/$(LIBCUPS)
204 echo Linking $@...
205 $(CC) $(LDFLAGS) -o $@ ippinfra.o $(LIBS)
206
207
208 #
209 # ippproxy
210 #
211
212 ippproxy: ippproxy.o ../cups/$(LIBCUPSSTATIC)
213 echo Linking $@...
214 $(CC) $(LDFLAGS) -o $@ ippproxy.o ../cups/$(LIBCUPSSTATIC) \
215 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
216
217
218 #
219 # ippproxy-shared
220 #
221
222 ippproxy-shared: ippproxy.o ../cups/$(LIBCUPS)
223 echo Linking $@...
224 $(CC) $(LDFLAGS) -o $@ ippproxy.o $(LIBS)
225
226
227 #
228 # ippserver
229 #
230
231 ippserver: ippserver.o ../cups/$(LIBCUPSSTATIC)
232 echo Linking $@...
233 $(CC) $(LDFLAGS) -o $@ ippserver.o ../cups/$(LIBCUPSSTATIC) \
234 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
235
236
237 #
238 # ippserver-shared
239 #
240
241 ippserver-shared: ippserver.o ../cups/$(LIBCUPS)
242 echo Linking $@...
243 $(CC) $(LDFLAGS) -o $@ ippserver.o $(LIBS)
244
245
246 #
247 # ipptool
248 #
249
250 ipptool: ipptool.o ../cups/$(LIBCUPS)
251 echo Linking $@...
252 $(CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
253
254
255 #
256 # ipptool-static
257 #
258
259 ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC)
260 echo Linking $@...
261 $(CC) $(LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \
262 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
263
264
265 #
266 # xmltotest
267 #
268
269 xmltotest: xmltotest.o ../cups/$(LIBUPSSTATIC)
270 echo Linking $@...
271 $(CC) $(LDFLAGS) -o $@ xmltotest.o ../cups/$(LIBCUPSSTATIC) \
272 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) \
273 $(LIBMXML)
274
275
276 #
277 # Dependencies...
278 #
279
280 include Dependencies
281
282
283 #
284 # End of "$Id$".
285 #