]> git.ipfire.org Git - thirdparty/cups.git/blob - test/Makefile
Fix source file header text duplication text duplication.
[thirdparty/cups.git] / test / Makefile
1 #
2 # IPP test makefile for CUPS.
3 #
4 # Copyright 2007-2016 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 ipptool-static
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) ippfind-static ippserver-shared
91
92
93 #
94 # Update dependencies (without system header dependencies...)
95 #
96
97 depend:
98 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
99
100
101 #
102 # Install all targets...
103 #
104
105 install: all install-data install-headers install-libs install-exec
106
107
108 #
109 # Install data files...
110 #
111
112 install-data:
113 echo Installing sample ipptool files in $(DATADIR)/ipptool...
114 $(INSTALL_DIR) -m 755 $(DATADIR)/ipptool
115 for file in $(DATAFILES); do \
116 $(INSTALL_COMPDATA) $$file $(DATADIR)/ipptool; \
117 done
118 for file in $(TESTFILES); do \
119 $(INSTALL_DATA) $$file $(DATADIR)/ipptool; \
120 done
121
122
123 #
124 # Install programs...
125 #
126
127 install-exec:
128 echo Installing ipptool in $(BINDIR)...
129 $(INSTALL_DIR) -m 755 $(BINDIR)
130 $(INSTALL_BIN) ipptool $(BINDIR)
131 if test -x ippfind; then \
132 $(INSTALL_BIN) ippfind $(BINDIR); \
133 fi
134 if test "x$(SYMROOT)" != "x"; then \
135 $(INSTALL_DIR) $(SYMROOT); \
136 cp ippfind $(SYMROOT); \
137 dsymutil $(SYMROOT)/ippfind; \
138 cp ipptool $(SYMROOT); \
139 dsymutil $(SYMROOT)/ipptool; \
140 fi
141
142
143 #
144 # Install headers...
145 #
146
147 install-headers:
148
149
150 #
151 # Install libraries...
152 #
153
154 install-libs:
155
156
157 #
158 # Unnstall all targets...
159 #
160
161 uninstall:
162 echo Uninstalling sample ipptool files from $(DATADIR)/ipptool...
163 for file in $(DATAFILES); do \
164 $(RM) $(DATADIR)/ipptool/$$file; \
165 done
166 for file in $(TESTFILES); do \
167 $(RM) $(DATADIR)/ipptool/$$file; \
168 done
169 -$(RMDIR) $(DATADIR)/ipptool
170
171
172 #
173 # ippfind
174 #
175
176 ippfind: ippfind.o ../cups/$(LIBCUPS) ../cups/$(LIBCUPSSTATIC)
177 echo Linking $@...
178 $(CC) $(LDFLAGS) -o $@ ippfind.o $(LIBS)
179 echo Linking $@-static...
180 $(CC) $(LDFLAGS) -o $@-static ippfind.o ../cups/$(LIBCUPSSTATIC) \
181 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
182
183
184 #
185 # ippserver
186 #
187
188 ippserver: ippserver.o ../cups/$(LIBCUPSSTATIC)
189 echo Linking $@...
190 $(CC) $(LDFLAGS) -o $@ ippserver.o ../cups/$(LIBCUPSSTATIC) \
191 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
192
193
194 #
195 # ippserver-shared
196 #
197
198 ippserver-shared: ippserver.o ../cups/$(LIBCUPS)
199 echo Linking $@...
200 $(CC) $(LDFLAGS) -o $@ ippserver.o $(LIBS)
201
202
203 #
204 # ipptool
205 #
206
207 ipptool: ipptool.o ../cups/$(LIBCUPS)
208 echo Linking $@...
209 $(CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
210
211
212 #
213 # ipptool-static
214 #
215
216 ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC)
217 echo Linking $@...
218 $(CC) $(LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \
219 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
220
221
222 #
223 # Dependencies...
224 #
225
226 include Dependencies