]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Add checks for missing/bad CloseUI/JCLCloseUI keywords (Issue #5381)
[thirdparty/cups.git] / filter / Makefile
CommitLineData
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
16include ../Makedefs
17
b86bc4cf 18
c9fc04c6
MS
19FILTERS = \
20 commandtops \
21 gziptoany \
c9fc04c6 22 pstops \
c9fc04c6 23 rastertoepson \
07ed0e9a
MS
24 rastertohp \
25 rastertolabel \
26 rastertopwg
c9fc04c6 27LIBTARGETS = \
e1d6a774 28 $(LIBCUPSIMAGE) \
12f89d24 29 libcupsimage.a
5f64df29
MS
30UNITTARGETS = \
31 rasterbench \
4b16c717 32 testclient \
e1d6a774 33 testraster
c9fc04c6
MS
34TARGETS = \
35 $(LIBTARGETS) \
5f64df29 36 $(FILTERS)
ef416fc2 37
a4845881 38IMAGEOBJS = error.o interpret.o raster.o
f8b3a85b 39OBJS = $(IMAGEOBJS) \
a4845881 40 commandtops.o gziptoany.o common.o pstops.o \
ed486911 41 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
4b16c717 42 rastertopwg.o testclient.o testraster.o
ef416fc2 43
44
45#
46# Make all targets...
47#
48
e1d6a774 49all: $(TARGETS)
ef416fc2 50
51
c9fc04c6
MS
52#
53# Make library targets...
54#
55
56libs: $(LIBTARGETS)
57
58
5f64df29
MS
59#
60# Make unit tests...
61#
62
63unittests: $(UNITTARGETS)
64
65
ef416fc2 66#
67# Clean all object files...
68#
69
70clean:
5f64df29 71 $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
e1d6a774 72 $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
ef416fc2 73
74
75#
76# Update dependencies (without system header dependencies...)
77#
78
79depend:
12f89d24 80 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
ef416fc2 81
82
83#
84# Install all targets...
85#
86
50fe7201
MS
87install: all install-data install-headers install-libs install-exec
88
89
90#
91# Install data files...
92#
93
94install-data:
95
96
97#
98# Install programs...
99#
100
101install-exec:
bd7854cb 102 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
ef416fc2 103 for file in $(FILTERS); do \
104 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
105 done
106 $(RM) $(SERVERBIN)/filter/rastertodymo
107 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
50fe7201
MS
108 if test "x$(SYMROOT)" != "x"; then \
109 $(INSTALL_DIR) $(SYMROOT); \
f8b3a85b 110 for file in $(FILTERS); do \
50fe7201 111 cp $$file $(SYMROOT); \
cb7f98ee 112 dsymutil $(SYMROOT)/$$file; \
50fe7201
MS
113 done \
114 fi
115
116
117#
118# Install headers...
119#
120
121install-headers:
50fe7201
MS
122
123
124#
125# Install libraries...
126#
127
12f89d24 128install-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
145installstatic:
146 $(INSTALL_DIR) -m 755 $(LIBDIR)
97c9a8d7
MS
147 $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR)
148 $(RANLIB) $(LIBDIR)/libcupsimage.a
b94f7488 149 $(CHMOD) 555 $(LIBDIR)/libcupsimage.a
ef416fc2 150
ef416fc2 151
757d2cad 152#
153# Uninstall all targets...
154#
155
12f89d24 156uninstall:
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
178apihelp:
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
213
7a14d768
MS
214#
215# commandtops
216#
217
218commandtops: commandtops.o ../cups/$(LIBCUPS)
219 echo Linking $@...
a621d151 220 $(LD_CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
7a14d768
MS
221
222
ef416fc2 223#
224# gziptoany
225#
226
227gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
228 echo Linking $@...
a621d151 229 $(LD_CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
ef416fc2 230
231
ef416fc2 232#
233# libcupsimage.so.2, libcupsimage.sl.2
234#
235
236libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
237 echo Linking $@...
a74454a7 238 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
83e08001 239 -L../cups $(LINKCUPS)
ef416fc2 240 $(RM) `basename $@ .2`
241 $(LN) $@ `basename $@ .2`
242
243
244#
245# libcupsimage.2.dylib
246#
247
355e94dc 248libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
ef416fc2 249 echo Linking $@...
e1d6a774 250 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 251 -install_name $(libdir)/$@ \
f7deaa1a 252 -current_version 2.3.0 \
ef416fc2 253 -compatibility_version 2.0.0 \
83e08001 254 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS)
ef416fc2 255 $(RM) libcupsimage.dylib
256 $(LN) $@ libcupsimage.dylib
257
258
259#
260# libcupsimage_s.a
261#
262
a74454a7 263libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 264 echo Linking $@...
e1d6a774 265 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
83e08001 266 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS)
ef416fc2 267 $(RM) $@
268 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
269
270
271#
272# libcupsimage.la
273#
274
275libcupsimage.la: $(IMAGEOBJS)
276 echo Linking $@...
e1d6a774 277 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 278 -L../cups $(LINKCUPS) \
f7deaa1a 279 -rpath $(LIBDIR) -version-info 2:3
ef416fc2 280
281
282#
283# libcupsimage.a
284#
285
286libcupsimage.a: $(IMAGEOBJS)
287 echo Archiving $@...
288 $(RM) $@
289 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
290 $(RANLIB) $@
291
292
ef416fc2 293#
294# pstops
295#
296
297pstops: pstops.o common.o ../cups/$(LIBCUPS)
298 echo Linking $@...
a621d151 299 $(LD_CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
ef416fc2 300
301
ef416fc2 302#
303# rastertoepson
304#
305
306rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
307 echo Linking $@...
a621d151 308 $(LD_CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
ef416fc2 309
310
311#
312# rastertohp
313#
314
315rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
316 echo Linking $@...
a621d151 317 $(LD_CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
ef416fc2 318
319
07ed0e9a
MS
320#
321# rastertolabel
322#
323
324rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
325 echo Linking $@...
a621d151 326 $(LD_CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
07ed0e9a
MS
327
328
329#
330# rastertopwg
331#
332
333rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
334 echo Linking $@...
a621d151 335 $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
07ed0e9a 336
94d5dc48
MS
337rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
338 echo Linking $@...
a621d151 339 $(LD_CC) $(LDFLAGS) -o $@ rastertopwg.o libcupsimage.a \
b94f7488 340 ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
94d5dc48
MS
341 $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
342
07ed0e9a 343
4b16c717
MS
344#
345# testclient (dependency on static libraries is intentional)
346#
347
348testclient: testclient.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
349 echo Linking $@...
350 $(LD_CC) $(LDFLAGS) -o $@ testclient.o \
351 libcupsimage.a ../cups/$(LIBCUPSSTATIC) \
352 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
353
354
ef416fc2 355#
356# testraster
357#
358
6d2f911b 359testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
ef416fc2 360 echo Linking $@...
a621d151 361 $(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
b94f7488 362 ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
c168a833 363 $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
c9fc04c6
MS
364 echo Running raster API tests...
365 ./testraster
ef416fc2 366
367
ed486911 368#
369# rasterbench
370#
371
f7deaa1a 372rasterbench: rasterbench.o libcupsimage.a
ed486911 373 echo Linking $@...
a621d151 374 $(LD_CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
ed486911 375
376
ef416fc2 377#
378# Dependencies...
379#
07ed0e9a 380
ef416fc2 381include Dependencies