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