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