]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
503b54c9 | 2 | # Filter makefile for CUPS. |
ef416fc2 | 3 | # |
a621d151 | 4 | # Copyright 2007-2017 by Apple Inc. |
503b54c9 | 5 | # Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 6 | # |
e3101897 | 7 | # Licensed under Apache License v2.0. See the file "LICENSE" for more information. |
ef416fc2 | 8 | # |
9 | ||
10 | include ../Makedefs | |
11 | ||
b86bc4cf | 12 | |
c9fc04c6 MS |
13 | FILTERS = \ |
14 | commandtops \ | |
15 | gziptoany \ | |
c9fc04c6 | 16 | pstops \ |
c9fc04c6 | 17 | rastertoepson \ |
07ed0e9a MS |
18 | rastertohp \ |
19 | rastertolabel \ | |
20 | rastertopwg | |
c9fc04c6 | 21 | LIBTARGETS = \ |
e1d6a774 | 22 | $(LIBCUPSIMAGE) \ |
12f89d24 | 23 | libcupsimage.a |
5f64df29 MS |
24 | UNITTARGETS = \ |
25 | rasterbench \ | |
4b16c717 | 26 | testclient \ |
e1d6a774 | 27 | testraster |
c9fc04c6 MS |
28 | TARGETS = \ |
29 | $(LIBTARGETS) \ | |
5f64df29 | 30 | $(FILTERS) |
ef416fc2 | 31 | |
a4845881 | 32 | IMAGEOBJS = error.o interpret.o raster.o |
f8b3a85b | 33 | OBJS = $(IMAGEOBJS) \ |
a4845881 | 34 | commandtops.o gziptoany.o common.o pstops.o \ |
ed486911 | 35 | rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \ |
4b16c717 | 36 | rastertopwg.o testclient.o testraster.o |
ef416fc2 | 37 | |
38 | ||
39 | # | |
40 | # Make all targets... | |
41 | # | |
42 | ||
e1d6a774 | 43 | all: $(TARGETS) |
ef416fc2 | 44 | |
45 | ||
c9fc04c6 MS |
46 | # |
47 | # Make library targets... | |
48 | # | |
49 | ||
50 | libs: $(LIBTARGETS) | |
51 | ||
52 | ||
5f64df29 MS |
53 | # |
54 | # Make unit tests... | |
55 | # | |
56 | ||
57 | unittests: $(UNITTARGETS) | |
58 | ||
59 | ||
ef416fc2 | 60 | # |
61 | # Clean all object files... | |
62 | # | |
63 | ||
64 | clean: | |
5f64df29 | 65 | $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) |
e1d6a774 | 66 | $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib |
ef416fc2 | 67 | |
68 | ||
69 | # | |
70 | # Update dependencies (without system header dependencies...) | |
71 | # | |
72 | ||
73 | depend: | |
12f89d24 | 74 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 75 | |
76 | ||
77 | # | |
78 | # Install all targets... | |
79 | # | |
80 | ||
50fe7201 MS |
81 | install: all install-data install-headers install-libs install-exec |
82 | ||
83 | ||
84 | # | |
85 | # Install data files... | |
86 | # | |
87 | ||
88 | install-data: | |
89 | ||
90 | ||
91 | # | |
92 | # Install programs... | |
93 | # | |
94 | ||
95 | install-exec: | |
bd7854cb | 96 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter |
ef416fc2 | 97 | for file in $(FILTERS); do \ |
98 | $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \ | |
99 | done | |
100 | $(RM) $(SERVERBIN)/filter/rastertodymo | |
101 | $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo | |
50fe7201 MS |
102 | if test "x$(SYMROOT)" != "x"; then \ |
103 | $(INSTALL_DIR) $(SYMROOT); \ | |
f8b3a85b | 104 | for file in $(FILTERS); do \ |
50fe7201 | 105 | cp $$file $(SYMROOT); \ |
cb7f98ee | 106 | dsymutil $(SYMROOT)/$$file; \ |
50fe7201 MS |
107 | done \ |
108 | fi | |
109 | ||
110 | ||
111 | # | |
112 | # Install headers... | |
113 | # | |
114 | ||
115 | install-headers: | |
50fe7201 MS |
116 | |
117 | ||
118 | # | |
119 | # Install libraries... | |
120 | # | |
121 | ||
12f89d24 | 122 | install-libs: $(INSTALLSTATIC) |
923edb68 | 123 | $(INSTALL_DIR) -m 755 $(LIBDIR) |
ef416fc2 | 124 | $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR) |
125 | -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \ | |
126 | $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
127 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
128 | fi | |
129 | -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \ | |
ef416fc2 | 130 | $(RM) $(LIBDIR)/libcupsimage.dylib; \ |
131 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \ | |
132 | fi | |
f8b3a85b MS |
133 | if test "x$(SYMROOT)" != "x"; then \ |
134 | $(INSTALL_DIR) $(SYMROOT); \ | |
135 | cp $(LIBCUPSIMAGE) $(SYMROOT); \ | |
0fa6c7fa | 136 | dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \ |
f8b3a85b | 137 | fi |
923edb68 | 138 | |
139 | installstatic: | |
140 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
97c9a8d7 MS |
141 | $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR) |
142 | $(RANLIB) $(LIBDIR)/libcupsimage.a | |
b94f7488 | 143 | $(CHMOD) 555 $(LIBDIR)/libcupsimage.a |
ef416fc2 | 144 | |
ef416fc2 | 145 | |
757d2cad | 146 | # |
147 | # Uninstall all targets... | |
148 | # | |
149 | ||
12f89d24 | 150 | uninstall: |
757d2cad | 151 | for file in $(FILTERS); do \ |
152 | $(RM) $(SERVERBIN)/filter/$$file; \ | |
153 | done | |
154 | $(RM) $(SERVERBIN)/filter/rastertodymo | |
155 | -$(RMDIR) $(SERVERBIN)/filter | |
156 | -$(RMDIR) $(SERVERBIN) | |
157 | $(RM) $(LIBDIR)/libcupsimage.2.dylib | |
158 | $(RM) $(LIBDIR)/libcupsimage.a | |
159 | $(RM) $(LIBDIR)/libcupsimage.dylib | |
160 | $(RM) $(LIBDIR)/libcupsimage_s.a | |
161 | $(RM) $(LIBDIR)/libcupsimage.sl | |
162 | $(RM) $(LIBDIR)/libcupsimage.sl.2 | |
163 | $(RM) $(LIBDIR)/libcupsimage.so | |
164 | $(RM) $(LIBDIR)/libcupsimage.so.2 | |
165 | -$(RMDIR) $(LIBDIR) | |
757d2cad | 166 | |
167 | ||
b423cd4c | 168 | # |
169 | # Automatic API help files... | |
170 | # | |
171 | ||
172 | apihelp: | |
173 | echo Generating CUPS API help files... | |
174 | mxmldoc --section "Programming" --title "Raster API" \ | |
5a738aea MS |
175 | --css ../doc/cups-printable.css \ |
176 | --header api-raster.header --intro api-raster.shtml \ | |
f11a948a | 177 | api-raster.xml \ |
ac884b6a MS |
178 | ../cups/raster.h interpret.c raster.c \ |
179 | >../doc/help/api-raster.html | |
f11a948a MS |
180 | mxmldoc --tokens help/api-raster.html api-raster.xml >../doc/help/api-raster.tokens |
181 | $(RM) api-raster.xml | |
8b450588 MS |
182 | mxmldoc --section "Programming" \ |
183 | --title "Developing PostScript Printer Drivers" \ | |
184 | --css ../doc/cups-printable.css \ | |
185 | --header postscript-driver.header \ | |
186 | --intro postscript-driver.shtml \ | |
187 | >../doc/help/postscript-driver.html | |
188 | mxmldoc --section "Programming" \ | |
189 | --title "Introduction to the PPD Compiler" \ | |
190 | --css ../doc/cups-printable.css \ | |
191 | --header ppd-compiler.header \ | |
192 | --intro ppd-compiler.shtml \ | |
193 | >../doc/help/ppd-compiler.html | |
194 | mxmldoc --section "Programming" \ | |
195 | --title "Developing Raster Printer Drivers" \ | |
196 | --css ../doc/cups-printable.css \ | |
197 | --header raster-driver.header \ | |
198 | --intro raster-driver.shtml \ | |
199 | >../doc/help/raster-driver.html | |
10d09e33 MS |
200 | mxmldoc --section "Specifications" \ |
201 | --title "CUPS PPD Extensions" \ | |
202 | --css ../doc/cups-printable.css \ | |
203 | --header spec-ppd.header \ | |
204 | --intro spec-ppd.shtml \ | |
205 | >../doc/help/spec-ppd.html | |
b423cd4c | 206 | |
207 | ||
7a14d768 MS |
208 | # |
209 | # commandtops | |
210 | # | |
211 | ||
212 | commandtops: commandtops.o ../cups/$(LIBCUPS) | |
213 | echo Linking $@... | |
a621d151 | 214 | $(LD_CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS) |
7a14d768 MS |
215 | |
216 | ||
ef416fc2 | 217 | # |
218 | # gziptoany | |
219 | # | |
220 | ||
221 | gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS) | |
222 | echo Linking $@... | |
a621d151 | 223 | $(LD_CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS) |
ef416fc2 | 224 | |
225 | ||
ef416fc2 | 226 | # |
227 | # libcupsimage.so.2, libcupsimage.sl.2 | |
228 | # | |
229 | ||
230 | libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS) | |
231 | echo Linking $@... | |
a74454a7 | 232 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \ |
83e08001 | 233 | -L../cups $(LINKCUPS) |
ef416fc2 | 234 | $(RM) `basename $@ .2` |
235 | $(LN) $@ `basename $@ .2` | |
236 | ||
237 | ||
238 | # | |
239 | # libcupsimage.2.dylib | |
240 | # | |
241 | ||
355e94dc | 242 | libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER) |
ef416fc2 | 243 | echo Linking $@... |
e1d6a774 | 244 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ |
fa73b229 | 245 | -install_name $(libdir)/$@ \ |
f7deaa1a | 246 | -current_version 2.3.0 \ |
ef416fc2 | 247 | -compatibility_version 2.0.0 \ |
83e08001 | 248 | $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) |
ef416fc2 | 249 | $(RM) libcupsimage.dylib |
250 | $(LN) $@ libcupsimage.dylib | |
251 | ||
252 | ||
253 | # | |
254 | # libcupsimage_s.a | |
255 | # | |
256 | ||
a74454a7 | 257 | libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp |
ef416fc2 | 258 | echo Linking $@... |
e1d6a774 | 259 | $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \ |
83e08001 | 260 | -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) |
ef416fc2 | 261 | $(RM) $@ |
262 | $(AR) $(ARFLAGS) $@ libcupsimage_s.o | |
263 | ||
264 | ||
265 | # | |
266 | # libcupsimage.la | |
267 | # | |
268 | ||
269 | libcupsimage.la: $(IMAGEOBJS) | |
270 | echo Linking $@... | |
e1d6a774 | 271 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \ |
a74454a7 | 272 | -L../cups $(LINKCUPS) \ |
f7deaa1a | 273 | -rpath $(LIBDIR) -version-info 2:3 |
ef416fc2 | 274 | |
275 | ||
276 | # | |
277 | # libcupsimage.a | |
278 | # | |
279 | ||
280 | libcupsimage.a: $(IMAGEOBJS) | |
281 | echo Archiving $@... | |
282 | $(RM) $@ | |
283 | $(AR) $(ARFLAGS) $@ $(IMAGEOBJS) | |
284 | $(RANLIB) $@ | |
285 | ||
286 | ||
ef416fc2 | 287 | # |
288 | # pstops | |
289 | # | |
290 | ||
291 | pstops: pstops.o common.o ../cups/$(LIBCUPS) | |
292 | echo Linking $@... | |
a621d151 | 293 | $(LD_CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) |
ef416fc2 | 294 | |
295 | ||
ef416fc2 | 296 | # |
297 | # rastertoepson | |
298 | # | |
299 | ||
300 | rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
301 | echo Linking $@... | |
a621d151 | 302 | $(LD_CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) |
ef416fc2 | 303 | |
304 | ||
305 | # | |
306 | # rastertohp | |
307 | # | |
308 | ||
309 | rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
310 | echo Linking $@... | |
a621d151 | 311 | $(LD_CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) |
ef416fc2 | 312 | |
313 | ||
07ed0e9a MS |
314 | # |
315 | # rastertolabel | |
316 | # | |
317 | ||
318 | rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
319 | echo Linking $@... | |
a621d151 | 320 | $(LD_CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) |
07ed0e9a MS |
321 | |
322 | ||
323 | # | |
324 | # rastertopwg | |
325 | # | |
326 | ||
327 | rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
328 | echo Linking $@... | |
a621d151 | 329 | $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) |
07ed0e9a | 330 | |
94d5dc48 MS |
331 | rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a |
332 | echo Linking $@... | |
a621d151 | 333 | $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o libcupsimage.a \ |
b94f7488 | 334 | ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \ |
94d5dc48 MS |
335 | $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI) |
336 | ||
07ed0e9a | 337 | |
4b16c717 MS |
338 | # |
339 | # testclient (dependency on static libraries is intentional) | |
340 | # | |
341 | ||
342 | testclient: testclient.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a | |
343 | echo Linking $@... | |
344 | $(LD_CC) $(LDFLAGS) -o $@ testclient.o \ | |
345 | libcupsimage.a ../cups/$(LIBCUPSSTATIC) \ | |
346 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
347 | ||
348 | ||
ef416fc2 | 349 | # |
350 | # testraster | |
351 | # | |
352 | ||
6d2f911b | 353 | testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a |
ef416fc2 | 354 | echo Linking $@... |
a621d151 | 355 | $(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \ |
b94f7488 | 356 | ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \ |
c168a833 | 357 | $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI) |
c9fc04c6 MS |
358 | echo Running raster API tests... |
359 | ./testraster | |
ef416fc2 | 360 | |
361 | ||
ed486911 | 362 | # |
363 | # rasterbench | |
364 | # | |
365 | ||
f7deaa1a | 366 | rasterbench: rasterbench.o libcupsimage.a |
ed486911 | 367 | echo Linking $@... |
a621d151 | 368 | $(LD_CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS) |
ed486911 | 369 | |
370 | ||
ef416fc2 | 371 | # |
372 | # Dependencies... | |
373 | # | |
07ed0e9a | 374 | |
ef416fc2 | 375 | include Dependencies |