]>
Commit | Line | Data |
---|---|---|
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 | ||
20 | include ../Makedefs | |
21 | ||
22 | ||
23 | # | |
24 | # Object files... | |
25 | # | |
26 | ||
27 | LIBOBJS = \ | |
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 | ||
37 | OBJS = \ | |
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 | ||
48 | TARGETS = \ | |
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 | ||
63 | all: $(TARGETS) | |
64 | ||
65 | ||
66 | # | |
67 | # Clean everything... | |
68 | # | |
69 | ||
70 | clean: | |
71 | $(RM) $(OBJS) core | |
72 | $(RM) *.bck core.* | |
73 | $(RM) $(TARGETS) | |
74 | $(RM) -r images | |
75 | ||
76 | ||
77 | # | |
78 | # Update dependencies... | |
79 | # | |
80 | ||
81 | depend: | |
82 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 | |
83 | ||
84 | ||
85 | # | |
86 | # Install... | |
87 | # | |
88 | ||
89 | install: | |
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 | ||
102 | uninstall: | |
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 | ||
113 | apihelp: | |
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 | ||
120 | framedhelp: | |
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 | ||
133 | commandtopclx: 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 | ||
142 | commandtoescpx: 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 | ||
151 | rastertoescpx: 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 | ||
161 | rastertopclx: 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 | ||
172 | testcmyk: 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 | ||
186 | testdither: 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 | ||
207 | testrgb: 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 | ||
221 | libcupsdriver.a: $(LIBOBJS) | |
222 | echo Archiving $@... | |
223 | $(RM) $@ | |
224 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
225 | $(RANLIB) $@ | |
226 | ||
227 | ||
228 | # | |
229 | # Include dependencies... | |
230 | # | |
231 | ||
232 | include Dependencies | |
233 | ||
234 | ||
235 | # | |
236 | # End of "$Id$". | |
237 | # |