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