]> git.ipfire.org Git - thirdparty/cups.git/blob - test/Makefile
Make sure clean is clean.
[thirdparty/cups.git] / test / Makefile
1 #
2 # IPP test makefile for CUPS.
3 #
4 # Copyright 2007-2018 by Apple Inc.
5 # Copyright 1997-2006 by Easy Software Products, all rights reserved.
6 #
7 # These coded instructions, statements, and computer programs are the
8 # property of Apple Inc. and are protected by Federal copyright
9 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 # which should have been included with this file. If this file is
11 # missing or damaged, see the license at "http://www.cups.org/".
12 #
13
14 include ../Makedefs
15
16
17 #
18 # Sample test files.
19 #
20
21 DATAFILES = \
22 color.jpg \
23 document-a4.pdf \
24 document-a4.ps \
25 document-letter.pdf \
26 document-letter.ps \
27 gray.jpg \
28 onepage-a4.pdf \
29 onepage-a4.ps \
30 onepage-letter.pdf \
31 onepage-letter.ps \
32 testfile.jpg \
33 testfile.pcl \
34 testfile.pdf \
35 testfile.ps \
36 testfile.txt
37 TESTFILES = \
38 create-printer-subscription.test \
39 get-completed-jobs.test \
40 get-jobs.test \
41 get-notifications.test \
42 get-printer-attributes.test \
43 get-subscriptions.test \
44 ipp-1.1.test \
45 ipp-2.0.test \
46 ipp-2.1.test \
47 ipp-2.2.test \
48 ipp-everywhere.test \
49 print-job.test \
50 print-job-deflate.test \
51 print-job-gzip.test \
52 validate-job.test
53 OBJS = \
54 ippfind.o \
55 ippserver.o \
56 ipptool.o
57 TARGETS = \
58 $(IPPFIND_BIN) \
59 ippserver \
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) ippfind-static ippserver ippserver-shared 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) ipptool $(BINDIR)
132 if test -x ippfind; then \
133 $(INSTALL_BIN) ippfind $(BINDIR); \
134 fi
135 if test "x$(SYMROOT)" != "x"; then \
136 $(INSTALL_DIR) $(SYMROOT); \
137 cp ippfind $(SYMROOT); \
138 dsymutil $(SYMROOT)/ippfind; \
139 cp ipptool $(SYMROOT); \
140 dsymutil $(SYMROOT)/ipptool; \
141 fi
142
143
144 #
145 # Install headers...
146 #
147
148 install-headers:
149
150
151 #
152 # Install libraries...
153 #
154
155 install-libs:
156
157
158 #
159 # Unnstall all targets...
160 #
161
162 uninstall:
163 echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
164 for file in $(DATAFILES); do \
165 $(RM) $(DATADIR)/ipptool/$$file; \
166 done
167 for file in $(TESTFILES); do \
168 $(RM) $(DATADIR)/ipptool/$$file; \
169 done
170 -$(RMDIR) $(DATADIR)/ipptool
171
172
173 #
174 # Local programs (not built when cross-compiling...)
175 #
176
177 local: ippserver ippserver-shared ipptool-static
178
179
180 #
181 # ippfind
182 #
183
184 ippfind: ippfind.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSSTATIC)
185 echo Linking $@...
186 $(LD_CC) $(LDFLAGS) -o $@ ippfind.o $(LIBS)
187 echo Linking $@-static...
188 $(LD_CC) $(LDFLAGS) -o $@-static ippfind.o ../cups/$(LIBCUPSSTATIC) \
189 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
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
201
202 #
203 # ippserver-shared
204 #
205
206 ippserver-shared: ippserver.o ../cups/$(LIBCUPS)
207 echo Linking $@...
208 $(LD_CC) $(LDFLAGS) -o $@ ippserver.o $(LIBS)
209
210
211 #
212 # ipptool
213 #
214
215 ipptool: ipptool.o ../cups/$(LIBCUPS)
216 echo Linking $@...
217 $(LD_CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
218
219
220 #
221 # ipptool-static
222 #
223
224 ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC)
225 echo Linking $@...
226 $(LD_CC) $(LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \
227 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
228
229
230 #
231 # Dependencies...
232 #
233
234 include Dependencies