]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / cups / Makefile
1 #
2 # "$Id: Makefile 4961 2006-01-20 22:19:13Z mike $"
3 #
4 # API library Makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 1997-2006 by Easy Software Products, all rights reserved.
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 #
30 # Object files...
31 #
32
33 LIBOBJS = \
34 array.o \
35 attr.o \
36 auth.o \
37 backchannel.o \
38 custom.o \
39 dest.o \
40 dir.o \
41 emit.o \
42 encode.o \
43 file.o \
44 getputfile.o \
45 globals.o \
46 http.o \
47 http-addr.o \
48 http-addrlist.o \
49 http-support.o \
50 ipp.o \
51 ipp-support.o \
52 langprintf.o \
53 language.o \
54 localize.o \
55 mark.o \
56 md5.o \
57 md5passwd.o \
58 normalize.o \
59 notify.o \
60 options.o \
61 page.o \
62 ppd.o \
63 snprintf.o \
64 string.o \
65 tempfile.o \
66 transcode.o \
67 usersys.o \
68 util.o
69 OBJS = \
70 $(LIBOBJS) \
71 testarray.o \
72 testfile.o \
73 testhttp.o \
74 testi18n.o \
75 testipp.o \
76 testlang.o \
77 testppd.o \
78 php_cups_wrap.o
79
80
81 #
82 # Header files to install...
83 #
84
85 HEADERS = \
86 array.h \
87 cups.h \
88 dir.h \
89 file.h \
90 http.h \
91 i18n.h \
92 ipp.h \
93 language.h \
94 md5.h \
95 normalize.h \
96 ppd.h \
97 transcode.h
98
99
100 #
101 # Targets in this directory...
102 #
103
104 TARGETS = \
105 $(LIBCUPS) \
106 libcups.a \
107 testarray \
108 testfile \
109 testhttp \
110 testi18n \
111 testipp \
112 testlang \
113 testppd
114
115
116 #
117 # Make all targets...
118 #
119
120 all: $(TARGETS)
121
122
123 #
124 # Remove object and target files...
125 #
126
127 clean:
128 $(RM) $(OBJS) $(TARGETS) `basename $(LIBCUPS) .2` libcups.dylib
129
130
131 #
132 # Update dependencies (without system header dependencies...)
133 #
134
135 depend:
136 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
137
138
139 #
140 # Install object and target files...
141 #
142
143 install: all installhdrs
144 $(INSTALL_DIR) $(LIBDIR)
145 $(INSTALL_LIB) $(LIBCUPS) $(LIBDIR)
146 if test $(LIBCUPS) = "libcups.so.2" -o $(LIBCUPS) = "libcups.sl.2"; then \
147 $(RM) $(LIBDIR)/`basename $(LIBCUPS) .2`; \
148 $(LN) $(LIBCUPS) $(LIBDIR)/`basename $(LIBCUPS) .2`; \
149 fi
150 if test $(LIBCUPS) = "libcups.2.dylib"; then \
151 $(STRIP) -x $(LIBDIR)/$(LIBCUPS); \
152 $(RM) $(LIBDIR)/libcups.dylib; \
153 $(LN) $(LIBCUPS) $(LIBDIR)/libcups.dylib; \
154 fi
155 if test $(LIBCUPS) != "libcups.a"; then \
156 $(INSTALL_LIB) libcups.a $(LIBDIR); \
157 $(RANLIB) $(LIBDIR)/libcups.a; \
158 fi
159
160 installhdrs:
161 $(INSTALL_DIR) $(INCLUDEDIR)/cups
162 for file in $(HEADERS); do \
163 $(INSTALL_DATA) $$file $(INCLUDEDIR)/cups; \
164 done
165
166
167 #
168 # libcups.so.2, libcups.sl.2
169 #
170
171 libcups.so.2 libcups.sl.2: $(LIBOBJS)
172 echo Linking $@...
173 $(DSO) $(DSOFLAGS) -o $@ $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
174 $(RM) `basename $@ .2`
175 $(LN) $@ `basename $@ .2`
176
177
178 #
179 # libcups.2.dylib
180 #
181
182 libcups.2.dylib: $(LIBOBJS)
183 echo Linking $@...
184 $(DSO) $(DSOFLAGS) -o $@ \
185 -install_name $(libdir)/$@ \
186 -current_version 2.7.0 \
187 -compatibility_version 2.0.0 \
188 $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
189 $(RM) libcups.dylib
190 $(LN) $@ libcups.dylib
191
192
193 #
194 # libcups_s.a
195 #
196
197 libcups_s.a: $(LIBOBJS)
198 echo Creating $@...
199 $(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) -lm
200 $(RM) $@
201 $(AR) $(ARFLAGS) $@ libcups_s.o
202
203
204 #
205 # libcups.la
206 #
207
208 libcups.la: $(LIBOBJS)
209 echo Linking $@...
210 $(CC) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
211 -version-info 2:7 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
212
213
214 #
215 # libcups.a
216 #
217
218 libcups.a: $(LIBOBJS)
219 echo Archiving $@...
220 $(RM) $@
221 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
222 $(RANLIB) $@
223
224
225 #
226 # CUPS language bindings for various scripting languages...
227 #
228
229 phpcups.so: $(LIBCUPS) php_cups_wrap.o
230 echo Linking $@...
231 if test `uname` = Darwin; then \
232 DSOFLAGS="-bundle -flat_namespace -undefined suppress"; \
233 else \
234 DSOFLAGS="$(DSOFLAGS)"; \
235 fi; \
236 $(DSO) $$DSOFLAGS -o $@ php_cups_wrap.o $(LIBS) `php-config --ldflags --libs`
237
238 php_cups_wrap.o: php_cups_wrap.c
239 echo Compiling $<...
240 $(CC) $(CFLAGS) `php-config --includes` -c $<
241 php_cups_wrap.c: cups.h
242 echo Creating $< using SWIG...
243 swig -php -o $@ -module cups cups.h
244
245
246 #
247 # testarray (dependency on static CUPS library is intentional)
248 #
249
250 testarray: testarray.o libcups.a
251 echo Linking $@...
252 $(CC) $(LDFLAGS) -o $@ testarray.o libcups.a \
253 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
254
255
256 #
257 # testfile (dependency on static CUPS library is intentional)
258 #
259
260 testfile: testfile.o libcups.a
261 echo Linking $@...
262 $(CC) $(LDFLAGS) -o $@ testfile.o libcups.a \
263 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
264
265
266 #
267 # testhttp (dependency on static CUPS library is intentional)
268 #
269
270 testhttp: testhttp.o libcups.a
271 echo Linking $@...
272 $(CC) $(LDFLAGS) -o $@ testhttp.o libcups.a \
273 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
274
275
276 #
277 # testipp (dependency on static CUPS library is intentional)
278 #
279
280 testipp: testipp.o libcups.a
281 echo Linking $@...
282 $(CC) $(LDFLAGS) -o $@ testipp.o libcups.a \
283 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
284
285
286 #
287 # testi18n (dependency on static CUPS library is intentional)
288 #
289
290 testi18n: testi18n.o libcups.a
291 echo Linking $@...
292 $(CC) $(LDFLAGS) -o $@ testi18n.o libcups.a \
293 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
294
295
296 #
297 # testlang (dependency on static CUPS library is intentional)
298 #
299
300 testlang: testlang.o libcups.a
301 echo Linking $@...
302 $(CC) $(LDFLAGS) -o $@ testlang.o libcups.a \
303 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
304
305
306 #
307 # testppd (dependency on static CUPS library is intentional)
308 #
309
310 testppd: testppd.o libcups.a
311 echo Linking $@...
312 $(CC) $(LDFLAGS) -o $@ testppd.o libcups.a \
313 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
314
315
316 #
317 # Automatic API help files...
318 #
319
320 apihelp:
321 echo Generating CUPS API help files...
322 mxmldoc --section "Programming" --title "Array API" \
323 --intro api-array.shtml \
324 array.h array.c >../doc/help/api-array.html
325 mxmldoc --section "Programming" --title "CUPS API" \
326 --intro api-cups.shtml \
327 cups.h auth.c dest.c encode.c getputfile.c language.c \
328 options.c tempfile.c usersys.c \
329 util.c >../doc/help/api-cups.html
330 mxmldoc --section "Programming" --title "File and Directory APIs" \
331 --intro api-filedir.shtml \
332 file.h file.c dir.h dir.c >../doc/help/api-filedir.html
333 mxmldoc --section "Programming" --title "PPD API" \
334 --intro api-ppd.shtml \
335 ppd.h attr.c emit.c mark.c page.c \
336 ppd.c >../doc/help/api-ppd.html
337 mxmldoc --section "Programming" --title "HTTP and IPP APIs" \
338 --intro api-httpipp.shtml \
339 cups.h http.h ipp.h \
340 auth.c dest.c encode.c getputfile.c http.c http-addr.c \
341 http-support.c ipp.c ipp-support.c md5passwd.c options.c \
342 usersys.c util.c >../doc/help/api-httpipp.html
343 mxmldoc --section "Programming" --title "Filter and Backend APIs" \
344 --intro api-filter.shtml \
345 backchannel.c >../doc/help/api-filter.html
346
347
348 #
349 # Dependencies...
350 #
351
352 include Dependencies
353
354
355 #
356 # End of "$Id: Makefile 4961 2006-01-20 22:19:13Z mike $".
357 #