]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
2 | # "$Id: Makefile 4804 2005-10-20 14:05:42Z mike $" | |
3 | # | |
4 | # Filter makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
6 | # Copyright 1997-2005 by Easy Software Products. | |
7 | # | |
8 | # These coded instructions, statements, and computer programs are the | |
9 | # property of Easy Software Products and are protected by Federal | |
10 | # copyright law. Distribution and use rights are outlined in the file | |
11 | # "LICENSE.txt" which should have been included with this file. If this | |
12 | # file is missing or damaged please contact Easy Software Products | |
13 | # at: | |
14 | # | |
15 | # Attn: CUPS Licensing Information | |
16 | # Easy Software Products | |
17 | # 44141 Airport View Drive, Suite 204 | |
18 | # Hollywood, Maryland 20636 USA | |
19 | # | |
20 | # Voice: (301) 373-9600 | |
21 | # EMail: cups-info@cups.org | |
22 | # WWW: http://www.cups.org | |
23 | # | |
24 | # This file is subject to the Apple OS-Developed Software exception. | |
25 | # | |
26 | ||
27 | include ../Makedefs | |
28 | ||
29 | FILTERS = gziptoany hpgltops texttops pstops imagetops imagetoraster \ | |
30 | rastertolabel rastertoepson rastertohp | |
31 | TARGETS = $(FILTERS) testraster | |
32 | ||
33 | HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \ | |
34 | hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o | |
35 | IMAGEOBJS = image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \ | |
36 | image-photocd.o image-pix.o image-png.o image-pnm.o \ | |
37 | image-sgi.o image-sgilib.o image-sun.o image-tiff.o \ | |
38 | image-zoom.o image.o interpret.o raster.o | |
39 | FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o | |
40 | OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \ | |
41 | imagetops.o imagetoraster.o common.o pstops.o raster.o \ | |
42 | rastertolabel.o rastertoepson.o rastertohp.o \ | |
43 | texttops.o textcommon.o testraster.o gziptoany.o | |
44 | ||
45 | ||
46 | # | |
47 | # Make all targets... | |
48 | # | |
49 | ||
50 | all: $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a | |
51 | ||
52 | ||
53 | # | |
54 | # Clean all object files... | |
55 | # | |
56 | ||
57 | clean: | |
58 | $(RM) $(OBJS) $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a | |
59 | $(RM) `basename $(LIBCUPSIMAGE) .2` libcupsimage.dylib | |
60 | ||
61 | ||
62 | # | |
63 | # Update dependencies (without system header dependencies...) | |
64 | # | |
65 | ||
66 | depend: | |
67 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 | |
68 | ||
69 | ||
70 | # | |
71 | # Install all targets... | |
72 | # | |
73 | ||
74 | install: all installhdrs | |
75 | $(INSTALL_DIR) $(SERVERBIN)/filter | |
76 | for file in $(FILTERS); do \ | |
77 | $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \ | |
78 | done | |
79 | $(RM) $(SERVERBIN)/filter/rastertodymo | |
80 | $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo | |
81 | $(INSTALL_DIR) $(LIBDIR) | |
82 | $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR) | |
83 | -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \ | |
84 | $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
85 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
86 | fi | |
87 | -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \ | |
88 | $(STRIP) -x $(LIBDIR)/$(LIBCUPSIMAGE); \ | |
89 | $(RM) $(LIBDIR)/libcupsimage.dylib; \ | |
90 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \ | |
91 | fi | |
92 | -if test $(LIBCUPSIMAGE) != "libcupsimage.a"; then \ | |
93 | $(INSTALL_LIB) libcupsimage.a $(LIBDIR); \ | |
94 | $(RANLIB) $(LIBDIR)/libcupsimage.a; \ | |
95 | fi | |
96 | ||
97 | installhdrs: | |
98 | $(INSTALL_DIR) $(INCLUDEDIR)/cups | |
99 | $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups | |
100 | $(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups | |
101 | ||
102 | ||
103 | # | |
104 | # formtops | |
105 | # | |
106 | ||
107 | formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS) | |
108 | echo Linking $@... | |
109 | $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm | |
110 | ||
111 | ||
112 | # | |
113 | # gziptoany | |
114 | # | |
115 | ||
116 | gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS) | |
117 | echo Linking $@... | |
118 | $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS) | |
119 | ||
120 | ||
121 | # | |
122 | # hpgltops | |
123 | # | |
124 | ||
125 | hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS) | |
126 | echo Linking $@... | |
127 | $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm | |
128 | ||
129 | ||
130 | # | |
131 | # libcupsimage.so.2, libcupsimage.sl.2 | |
132 | # | |
133 | ||
134 | libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS) | |
135 | echo Linking $@... | |
136 | $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) -lm | |
137 | $(RM) `basename $@ .2` | |
138 | $(LN) $@ `basename $@ .2` | |
139 | ||
140 | ||
141 | # | |
142 | # libcupsimage.2.dylib | |
143 | # | |
144 | ||
145 | libcupsimage.2.dylib: $(IMAGEOBJS) | |
146 | echo Linking $@... | |
147 | $(DSO) $(DSOFLAGS) -o $@ \ | |
148 | -install_name $(libdir)/libcupsimage.dylib \ | |
149 | -current_version 2.2.0 \ | |
150 | -compatibility_version 2.0.0 \ | |
151 | $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm | |
152 | $(RM) libcupsimage.dylib | |
153 | $(LN) $@ libcupsimage.dylib | |
154 | ||
155 | ||
156 | # | |
157 | # libcupsimage_s.a | |
158 | # | |
159 | ||
160 | libcupsimage_s.a: $(IMAGEOBJS) | |
161 | echo Linking $@... | |
162 | $(DSO) $(DSOFLAGS) -Wl,-berok -o libcupsimage_s.o $(IMAGEOBJS) \ | |
163 | $(DSOLIBS) -lm | |
164 | $(RM) $@ | |
165 | $(AR) $(ARFLAGS) $@ libcupsimage_s.o | |
166 | ||
167 | ||
168 | # | |
169 | # libcupsimage.la | |
170 | # | |
171 | ||
172 | libcupsimage.la: $(IMAGEOBJS) | |
173 | echo Linking $@... | |
174 | $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \ | |
175 | -rpath $(LIBDIR) -version-info 2:2 | |
176 | ||
177 | ||
178 | # | |
179 | # libcupsimage.a | |
180 | # | |
181 | ||
182 | libcupsimage.a: $(IMAGEOBJS) | |
183 | echo Archiving $@... | |
184 | $(RM) $@ | |
185 | $(AR) $(ARFLAGS) $@ $(IMAGEOBJS) | |
186 | $(RANLIB) $@ | |
187 | ||
188 | ||
189 | # | |
190 | # testimage | |
191 | # | |
192 | ||
193 | testimage: testimage.o libcupsimage.a ../Makedefs | |
194 | echo Linking $@... | |
195 | $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \ | |
196 | $(IMGLIBS) $(DSOLIBS) $(LIBS) | |
197 | ||
198 | ||
199 | # | |
200 | # imagetops | |
201 | # | |
202 | ||
203 | imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \ | |
204 | ../cups/$(LIBCUPS) | |
205 | echo Linking $@... | |
206 | $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \ | |
207 | $(IMGLIBS) $(LIBS) | |
208 | ||
209 | ||
210 | # | |
211 | # imagetoraster | |
212 | # | |
213 | ||
214 | imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \ | |
215 | ../cups/$(LIBCUPS) | |
216 | echo Linking $@... | |
217 | $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \ | |
218 | $(IMGLIBS) $(LIBS) | |
219 | ||
220 | ||
221 | # | |
222 | # pstops | |
223 | # | |
224 | ||
225 | pstops: pstops.o common.o ../cups/$(LIBCUPS) | |
226 | echo Linking $@... | |
227 | $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) | |
228 | ||
229 | ||
230 | # | |
231 | # rastertolabel | |
232 | # | |
233 | ||
234 | rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
235 | echo Linking $@... | |
236 | $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
237 | ||
238 | ||
239 | # | |
240 | # rastertoepson | |
241 | # | |
242 | ||
243 | rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
244 | echo Linking $@... | |
245 | $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
246 | ||
247 | ||
248 | # | |
249 | # rastertohp | |
250 | # | |
251 | ||
252 | rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
253 | echo Linking $@... | |
254 | $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
255 | ||
256 | ||
257 | # | |
258 | # testraster | |
259 | # | |
260 | ||
261 | testraster: testraster.o raster.o | |
262 | echo Linking $@... | |
263 | $(CC) $(LDFLAGS) -o $@ testraster.o raster.o | |
264 | ||
265 | ||
266 | # | |
267 | # texttops | |
268 | # | |
269 | ||
270 | texttops: texttops.o textcommon.o common.o \ | |
271 | ../cups/$(LIBCUPS) | |
272 | echo Linking $@... | |
273 | $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS) | |
274 | ||
275 | ||
276 | # | |
277 | # Dependencies... | |
278 | # | |
279 | ||
280 | include Dependencies | |
281 | ||
282 | ||
283 | # | |
284 | # End of "$Id: Makefile 4804 2005-10-20 14:05:42Z mike $". | |
285 | # |