]> git.ipfire.org Git - thirdparty/cups.git/blob - test/Makefile
Cleanup
[thirdparty/cups.git] / test / Makefile
1 #
2 # IPP test makefile for CUPS.
3 #
4 # Copyright 2007-2019 by Apple Inc.
5 # Copyright 1997-2006 by Easy Software Products, all rights reserved.
6 #
7 # Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 #
9
10 include ../Makedefs
11
12
13 #
14 # Sample test files.
15 #
16
17 DATAFILES = \
18 color.jpg \
19 document-a4.pdf \
20 document-a4.ps \
21 document-letter.pdf \
22 document-letter.ps \
23 gray.jpg \
24 onepage-a4.pdf \
25 onepage-a4.ps \
26 onepage-letter.pdf \
27 onepage-letter.ps \
28 testfile.jpg \
29 testfile.pcl \
30 testfile.pdf \
31 testfile.ps \
32 testfile.txt
33 TESTFILES = \
34 create-printer-subscription.test \
35 get-completed-jobs.test \
36 get-jobs.test \
37 get-notifications.test \
38 get-printer-attributes.test \
39 get-printer-attributes-suite.test \
40 get-subscriptions.test \
41 ipp-1.1.test \
42 ipp-2.0.test \
43 ipp-2.1.test \
44 ipp-2.2.test \
45 ipp-everywhere.test \
46 print-job.test \
47 print-job-deflate.test \
48 print-job-gzip.test \
49 validate-job.test
50 OBJS = \
51 ippevepcl.o \
52 ippeveprinter.o \
53 ippeveps.o \
54 ippfind.o \
55 ipptool.o
56 TARGETS = \
57 $(IPPEVECOMMANDS) \
58 ippeveprinter \
59 $(IPPFIND_BIN) \
60 ipptool \
61 $(LOCALTARGET)
62
63
64 #
65 # Make all targets...
66 #
67
68 all: $(TARGETS)
69
70
71 #
72 # Make library targets...
73 #
74
75 libs:
76
77
78 #
79 # Make unit tests...
80 #
81
82 unittests:
83
84
85 #
86 # Clean all object files...
87 #
88
89 clean:
90 $(RM) $(TARGETS) $(OBJS)
91 $(RM) ippeveprinter-static ippfind-static ipptool-static
92
93
94 #
95 # Update dependencies (without system header dependencies...)
96 #
97
98 depend:
99 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
100
101
102 #
103 # Install all targets...
104 #
105
106 install: all install-data install-headers install-libs install-exec
107
108
109 #
110 # Install data files...
111 #
112
113 install-data:
114 echo Installing sample ipptool files in $(DATADIR)/ipptool...
115 $(INSTALL_DIR) -m 755 $(DATADIR)/ipptool
116 for file in $(DATAFILES); do \
117 $(INSTALL_COMPDATA) $$file $(DATADIR)/ipptool; \
118 done
119 for file in $(TESTFILES); do \
120 $(INSTALL_DATA) $$file $(DATADIR)/ipptool; \
121 done
122
123
124 #
125 # Install programs...
126 #
127
128 install-exec:
129 echo Installing ipptool in $(BINDIR)...
130 $(INSTALL_DIR) -m 755 $(BINDIR)
131 $(INSTALL_BIN) ippeveprinter $(BINDIR)
132 if test -x ippfind; then \
133 $(INSTALL_BIN) ippfind $(BINDIR); \
134 fi
135 $(INSTALL_BIN) ipptool $(BINDIR)
136 $(INSTALL_DIR) -m 755 $(SERVERBIN)/ippeveprinter
137 for file in $(IPPEVECOMMANDS); do \
138 $(INSTALL_BIN) $$file $(SERVERBIN)/ippeveprinter; \
139 done
140 if test "x$(SYMROOT)" != "x"; then \
141 $(INSTALL_DIR) $(SYMROOT); \
142 cp ippeveprinter $(SYMROOT); \
143 dsymutil $(SYMROOT)/ippeveprinter; \
144 if test -x ippfind; then \
145 cp ippfind $(SYMROOT); \
146 dsymutil $(SYMROOT)/ippfind; \
147 fi; \
148 cp ipptool $(SYMROOT); \
149 dsymutil $(SYMROOT)/ipptool; \
150 fi
151
152
153 #
154 # Install headers...
155 #
156
157 install-headers:
158
159
160 #
161 # Install libraries...
162 #
163
164 install-libs:
165
166
167 #
168 # Unnstall all targets...
169 #
170
171 uninstall:
172 echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
173 for file in ippeveprinter ippfind ipptool; do \
174 $(RM) $(BINDIR)/$$file; \
175 done
176 -$(RMDIR) $(BINDIR)
177 for file in $(IPPEVECOMMANDS); do \
178 $(RM) $(SERVERBIN)/ippeveprinter/$$file; \
179 done
180 -$(RMDIR) $(SERVERBIN)/ippeveprinter
181 for file in $(DATAFILES); do \
182 $(RM) $(DATADIR)/ipptool/$$file; \
183 done
184 for file in $(TESTFILES); do \
185 $(RM) $(DATADIR)/ipptool/$$file; \
186 done
187 -$(RMDIR) $(DATADIR)/ipptool
188
189
190 #
191 # Local programs (not built when cross-compiling...)
192 #
193
194 local: ippeveprinter-static ipptool-static
195
196
197 #
198 # ippeveprinter
199 #
200
201 ippeveprinter: ippeveprinter.o ../cups/$(LIBCUPSSTATIC)
202 echo Linking $@...
203 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(LIBS)
204 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
205
206
207 #
208 # ippeveprinter-static
209 #
210
211 ippeveprinter-static: ippeveprinter.o ../cups/$(LIBCUPS)
212 echo Linking $@...
213 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o ../cups/$(LIBCUPSSTATIC) \
214 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
215 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
216
217
218 #
219 # ippevepcl
220 #
221
222 ippevepcl: ippevepcl.o ../cups/$(LIBCUPS)
223 echo Linking $@...
224 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippevepcl.o $(LIBS)
225 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
226
227
228 #
229 # ippeveps
230 #
231
232 ippeveps: ippeveps.o ../cups/$(LIBCUPS)
233 echo Linking $@...
234 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveps.o $(LIBS)
235 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
236
237
238 #
239 # ippfind
240 #
241
242 ippfind: ippfind.o ../cups/$(LIBCUPS)
243 echo Linking $@...
244 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o $(LIBS)
245 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
246
247
248 #
249 # ippfind-static
250 #
251
252 ippfind-static: ippfind.o ../cups/$(LIBCUPSSTATIC)
253 echo Linking $@
254 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o ../cups/$(LIBCUPSSTATIC) \
255 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
256 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
257
258
259 #
260 # ipptool
261 #
262
263 ipptool: ipptool.o ../cups/$(LIBCUPS)
264 echo Linking $@...
265 $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o $(LIBS)
266 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
267
268
269 #
270 # ipptool-static
271 #
272
273 ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC)
274 echo Linking $@...
275 $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \
276 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
277 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
278
279
280 #
281 # printer-png.h
282 #
283
284 printer-png.h: printer.png
285 echo "Generating printer-png.h from printer.png..."
286 echo "static const unsigned char printer_png[] =" >printer-png.h
287 echo "{" >>printer-png.h
288 od -t x1 printer.png | cut -b12- | awk '{printf(" "); for (i = 1; i <= NF; i ++) printf("0x%s,", $$i); print "";}' >>printer-png.h
289 echo "};" >>printer-png.h
290
291
292 #
293 # Dependencies...
294 #
295
296 include Dependencies