]> git.ipfire.org Git - thirdparty/cups.git/blob - test/Makefile
Add code signing for macOS Mojave.
[thirdparty/cups.git] / test / Makefile
1 #
2 # IPP test makefile for CUPS.
3 #
4 # Copyright 2007-2017 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 ippfind.o \
51 ippserver.o \
52 ipptool.o
53 TARGETS = \
54 $(IPPFIND_BIN) \
55 ippserver \
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) ippfind-static ippserver ippserver-shared 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) ipptool $(BINDIR)
128 if test -x ippfind; then \
129 $(INSTALL_BIN) ippfind $(BINDIR); \
130 fi
131 if test "x$(SYMROOT)" != "x"; then \
132 $(INSTALL_DIR) $(SYMROOT); \
133 cp ippfind $(SYMROOT); \
134 dsymutil $(SYMROOT)/ippfind; \
135 cp ipptool $(SYMROOT); \
136 dsymutil $(SYMROOT)/ipptool; \
137 fi
138
139
140 #
141 # Install headers...
142 #
143
144 install-headers:
145
146
147 #
148 # Install libraries...
149 #
150
151 install-libs:
152
153
154 #
155 # Unnstall all targets...
156 #
157
158 uninstall:
159 echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
160 for file in $(DATAFILES); do \
161 $(RM) $(DATADIR)/ipptool/$$file; \
162 done
163 for file in $(TESTFILES); do \
164 $(RM) $(DATADIR)/ipptool/$$file; \
165 done
166 -$(RMDIR) $(DATADIR)/ipptool
167
168
169 #
170 # Local programs (not built when cross-compiling...)
171 #
172
173 local: ippserver ippserver-shared ipptool-static
174
175
176 #
177 # ippfind
178 #
179
180 ippfind: ippfind.o ../cups/$(LIBCUPS)
181 echo Linking $@...
182 $(LD_CC) $(LDFLAGS) -o $@ ippfind.o $(LIBS)
183 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
184
185 ippfind-static: ippfind.o ../cups/$(LIBCUPSSTATIC)
186 echo Linking $@
187 $(LD_CC) $(LDFLAGS) -o $@ ippfind.o ../cups/$(LIBCUPSSTATIC) \
188 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
189 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
190
191
192 #
193 # ippserver
194 #
195
196 ippserver: ippserver.o ../cups/$(LIBCUPSSTATIC)
197 echo Linking $@...
198 $(LD_CC) $(LDFLAGS) -o $@ ippserver.o ../cups/$(LIBCUPSSTATIC) \
199 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
200 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
201
202
203 #
204 # ippserver-shared
205 #
206
207 ippserver-shared: ippserver.o ../cups/$(LIBCUPS)
208 echo Linking $@...
209 $(LD_CC) $(LDFLAGS) -o $@ ippserver.o $(LIBS)
210 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
211
212
213 #
214 # ipptool
215 #
216
217 ipptool: ipptool.o ../cups/$(LIBCUPS)
218 echo Linking $@...
219 $(LD_CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
220 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
221
222
223 #
224 # ipptool-static
225 #
226
227 ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC)
228 echo Linking $@...
229 $(LD_CC) $(LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \
230 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
231 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
232
233
234 #
235 # Dependencies...
236 #
237
238 include Dependencies