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