]> git.ipfire.org Git - thirdparty/cups.git/blame - driver/Makefile
Merge changes from CUPS 1.4svn-r7386.
[thirdparty/cups.git] / driver / Makefile
CommitLineData
ac884b6a
MS
1#
2# "$Id$"
3#
4# Makefile for the CUPS base drivers.
5#
6# Copyright 2007-2008 by Apple Inc.
7# Copyright 2002-2005 by Easy Software Products.
8#
9# These coded instructions, statements, and computer programs are the
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/".
14#
15
16#
17# Include standard definitions...
18#
19
20include ../Makedefs
21
22
23#
24# Object files...
25#
26
27LIBOBJS = \
28 attr.o \
29 check.o \
30 cmyk.o \
31 dither.o \
32 lut.o \
33 pack.o \
34 rgb.o \
35 srgb.o
36
37OBJS = \
38 commandtoescpx.o \
39 commandtopclx.o \
40 rastertoescpx.o \
41 rastertopclx.o \
42 pcl-common.o \
43 testcmyk.o \
44 testdither.o \
45 testrgb.o \
46 $(LIBOBJS)
47
48TARGETS = \
49 libcupsdriver.a \
50 commandtoescpx \
51 commandtopclx \
52 rastertoescpx \
53 rastertopclx \
54 testcmyk \
55 testdither \
56 testrgb
57
58
59#
60# Make everything...
61#
62
63all: $(TARGETS)
64
65
66#
67# Clean everything...
68#
69
70clean:
71 $(RM) $(OBJS) core
72 $(RM) *.bck core.*
73 $(RM) $(TARGETS)
74 $(RM) -r images
75
76
77#
78# Update dependencies...
79#
80
81depend:
82 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
83
84
85#
86# Install...
87#
88
89install:
90 $(INSTALL_DIR) $(SERVERBIN)/filter
91 for file in commandtoescpx commandtopclx rastertoescpx rastertopclx; do \
92 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
93 done
94 $(INSTALL_DIR) $(INCLUDEDIR)/cups
95 $(INSTALL_DATA) driver.h $(INCLUDEDIR)/cups
96
97
98#
99# Uninstall...
100#
101
102uninstall:
103 for file in commandtoescpx commandtopclx rastertoescpx rastertopclx; do \
104 $(RM) $(SERVERBIN)/filter/$$file; \
105 done
106 $(RM) $(INCLUDEDIR)/cups/driver.h
107
108
109#
110# Automatic API help files...
111#
112
113apihelp:
114 mxmldoc --section "Programming" \
115 --title "Printer Driver API" \
116 --css ../doc/cups-printable.css \
117 --header api-driver.header --intro api-driver.shtml \
118 driver.h $(LIBOBJS:.o=.c) >../doc/help/api-driver.html
119
120framedhelp:
121 mxmldoc --framed api-driver \
122 --section "Programming" \
123 --title "Printer Driver API" \
124 --css ../doc/cups-printable.css \
125 --header api-driver.header --intro api-driver.shtml \
126 driver.h $(LIBOBJS:.o=.c)
127
128
129#
130# commandtopclx, the PCL command printer driver.
131#
132
133commandtopclx: commandtopclx.o libcupsdriver.a ../cups/$(LIBCUPS)
134 echo Linking $@...
135 $(CC) $(LDFLAGS) -o $@ commandtopclx.o libcupsdriver.a $(LIBS)
136
137
138#
139# commandtoescpx, the ESC/P command printer driver.
140#
141
142commandtoescpx: commandtoescpx.o libcupsdriver.a ../cups/$(LIBCUPS)
143 echo Linking $@...
144 $(CC) $(LDFLAGS) -o $@ commandtoescpx.o libcupsdriver.a $(LIBS)
145
146
147#
148# rastertoescpx, the ESC/P raster printer driver.
149#
150
151rastertoescpx: rastertoescpx.o libcupsdriver.a ../cups/$(LIBCUPS)
152 echo Linking $@...
153 $(CC) $(LDFLAGS) -o $@ rastertoescpx.o libcupsdriver.a \
154 $(LINKCUPSIMAGE) $(LIBS)
155
156
157#
158# rastertopclx, the ESC/P raster printer driver.
159#
160
161rastertopclx: rastertopclx.o pcl-common.o libcupsdriver.a \
162 ../cups/$(LIBCUPS)
163 echo Linking $@...
164 $(CC) $(LDFLAGS) -o $@ rastertopclx.o pcl-common.o libcupsdriver.a \
165 $(LINKCUPSIMAGE) $(LIBS)
166
167
168#
169# testcmyk, test cmyk separation functions.
170#
171
172testcmyk: testcmyk.o libcupsdriver.a ../cups/libcups.a
173 echo Linking $@...
174 $(CC) $(LDFLAGS) -o $@ testcmyk.o libcupsdriver.a ../cups/libcups.a \
175 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
176 if test ! -d test; then \
177 mkdir test; \
178 fi
179 ./testcmyk > test/testcmyk.log 2>&1
180
181
182#
183# testdither, test dithering functions.
184#
185
186testdither: testdither.o libcupsdriver.a ../cups/libcups.a
187 echo Linking $@...
188 $(CC) $(LDFLAGS) -o $@ testdither.o libcupsdriver.a ../cups/libcups.a \
189 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
190 if test ! -d test; then \
191 mkdir test; \
192 fi
193 ./testdither > test/0-255.pgm 2>test/0-255.log
194 ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log
195 ./testdither 0 85 170 255 > test/0-85-170-255.pgm 2>test/0-85-170-255.log
196 ./testdither 0 63 127 170 198 227 255 > test/0-63-127-170-198-227-255.pgm 2>test/0-63-127-170-198-227-255.log
197 ./testdither 0 210 383 > test/0-210-383.pgm 2>test/0-210-383.log
198 ./testdither 0 82 255 > test/0-82-255.pgm 2>test/0-82-255.log
199 ./testdither 0 510 > test/0-510.pgm 2>test/0-510.log
200 ./testdither 0 1020 > test/0-1020.pgm 2>test/0-1020.log
201
202
203#
204# testrgb, test RGB separation functions.
205#
206
207testrgb: testrgb.o libcupsdriver.a ../cups/libcups.a
208 echo Linking $@...
209 $(CC) $(LDFLAGS) -o $@ testrgb.o libcupsdriver.a ../cups/libcups.a \
210 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
211 if test ! -d test; then \
212 mkdir test; \
213 fi
214 ./testrgb > test/testrgb.log 2>&1
215
216
217#
218# libcupsdriver.a, the CUPS driver library...
219#
220
221libcupsdriver.a: $(LIBOBJS)
222 echo Archiving $@...
223 $(RM) $@
224 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
225 $(RANLIB) $@
226
227
228#
229# Include dependencies...
230#
231
232include Dependencies
233
234
235#
236# End of "$Id$".
237#