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