]> git.ipfire.org Git - thirdparty/cups.git/blob - test/Makefile
Normalize filename generation and print file creation.
[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-subscriptions.test \
40 ipp-1.1.test \
41 ipp-2.0.test \
42 ipp-2.1.test \
43 ipp-2.2.test \
44 ipp-everywhere.test \
45 print-job.test \
46 print-job-deflate.test \
47 print-job-gzip.test \
48 validate-job.test
49 OBJS = \
50 ippeveprinter.o \
51 ippfind.o \
52 ipptool.o
53 TARGETS = \
54 ippeveprinter \
55 $(IPPFIND_BIN) \
56 ipptool \
57 $(LOCALTARGET)
58
59
60 #
61 # Make all targets...
62 #
63
64 all: $(TARGETS)
65
66
67 #
68 # Make library targets...
69 #
70
71 libs:
72
73
74 #
75 # Make unit tests...
76 #
77
78 unittests:
79
80
81 #
82 # Clean all object files...
83 #
84
85 clean:
86 $(RM) $(TARGETS) $(OBJS)
87 $(RM) ippeveprinter-static ippfind-static ipptool-static
88
89
90 #
91 # Update dependencies (without system header dependencies...)
92 #
93
94 depend:
95 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
96
97
98 #
99 # Install all targets...
100 #
101
102 install: all install-data install-headers install-libs install-exec
103
104
105 #
106 # Install data files...
107 #
108
109 install-data:
110 echo Installing sample ipptool files in $(DATADIR)/ipptool...
111 $(INSTALL_DIR) -m 755 $(DATADIR)/ipptool
112 for file in $(DATAFILES); do \
113 $(INSTALL_COMPDATA) $$file $(DATADIR)/ipptool; \
114 done
115 for file in $(TESTFILES); do \
116 $(INSTALL_DATA) $$file $(DATADIR)/ipptool; \
117 done
118
119
120 #
121 # Install programs...
122 #
123
124 install-exec:
125 echo Installing ipptool in $(BINDIR)...
126 $(INSTALL_DIR) -m 755 $(BINDIR)
127 $(INSTALL_BIN) ippeveprinter $(BINDIR)
128 if test -x ippfind; then \
129 $(INSTALL_BIN) ippfind $(BINDIR); \
130 fi
131 $(INSTALL_BIN) ipptool $(BINDIR)
132 if test "x$(SYMROOT)" != "x"; then \
133 $(INSTALL_DIR) $(SYMROOT); \
134 cp ippeveprinter $(SYMROOT); \
135 dsymutil $(SYMROOT)/ippeveprinter; \
136 if test -x ippfind; then \
137 cp ippfind $(SYMROOT); \
138 dsymutil $(SYMROOT)/ippfind; \
139 fi; \
140 cp ipptool $(SYMROOT); \
141 dsymutil $(SYMROOT)/ipptool; \
142 fi
143
144
145 #
146 # Install headers...
147 #
148
149 install-headers:
150
151
152 #
153 # Install libraries...
154 #
155
156 install-libs:
157
158
159 #
160 # Unnstall all targets...
161 #
162
163 uninstall:
164 echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
165 for file in ippeveprinter ippfind ipptool; do \
166 $(RM) $(BINDIR)/$$file; \
167 done
168 -$(RMDIR) $(BINDIR)
169 for file in $(DATAFILES); do \
170 $(RM) $(DATADIR)/ipptool/$$file; \
171 done
172 for file in $(TESTFILES); do \
173 $(RM) $(DATADIR)/ipptool/$$file; \
174 done
175 -$(RMDIR) $(DATADIR)/ipptool
176
177
178 #
179 # Local programs (not built when cross-compiling...)
180 #
181
182 local: ippeveprinter-static ipptool-static
183
184
185 #
186 # ippeveprinter
187 #
188
189 ippeveprinter: ippeveprinter.o ../cups/$(LIBCUPSSTATIC)
190 echo Linking $@...
191 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(LIBS)
192 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
193
194
195 #
196 # ippeveprinter-static
197 #
198
199 ippeveprinter-static: ippeveprinter.o ../cups/$(LIBCUPS)
200 echo Linking $@...
201 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o ../cups/$(LIBCUPSSTATIC) \
202 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
203 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
204
205
206 #
207 # ippfind
208 #
209
210 ippfind: ippfind.o ../cups/$(LIBCUPS)
211 echo Linking $@...
212 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o $(LIBS)
213 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
214
215
216 #
217 # ippfind-static
218 #
219
220 ippfind-static: ippfind.o ../cups/$(LIBCUPSSTATIC)
221 echo Linking $@
222 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o ../cups/$(LIBCUPSSTATIC) \
223 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
224 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
225
226
227 #
228 # ipptool
229 #
230
231 ipptool: ipptool.o ../cups/$(LIBCUPS)
232 echo Linking $@...
233 $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o $(LIBS)
234 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
235
236
237 #
238 # ipptool-static
239 #
240
241 ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC)
242 echo Linking $@...
243 $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \
244 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
245 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
246
247
248 #
249 # Dependencies...
250 #
251
252 include Dependencies