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