]> git.ipfire.org Git - thirdparty/cups.git/blob - cups/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / cups / Makefile
1 #
2 # "$Id: Makefile 5138 2006-02-21 10:49:06Z 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 backend.o \
39 custom.o \
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 \
55 localize.o \
56 mark.o \
57 md5.o \
58 md5passwd.o \
59 normalize.o \
60 notify.o \
61 options.o \
62 page.o \
63 ppd.o \
64 request.o \
65 snprintf.o \
66 string.o \
67 tempfile.o \
68 transcode.o \
69 usersys.o \
70 util.o
71 OBJS = \
72 $(LIBOBJS) \
73 testarray.o \
74 testfile.o \
75 testhttp.o \
76 testi18n.o \
77 testipp.o \
78 testlang.o \
79 testppd.o \
80 php_cups_wrap.o
81
82
83 #
84 # Header files to install...
85 #
86
87 HEADERS = \
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
106 TARGETS = \
107 $(LIBCUPS) \
108 libcups.a \
109 testarray \
110 testfile \
111 testhttp \
112 testi18n \
113 testipp \
114 testlang \
115 testppd
116
117
118 #
119 # Make all targets...
120 #
121
122 all: $(TARGETS)
123
124
125 #
126 # Remove object and target files...
127 #
128
129 clean:
130 $(RM) $(OBJS) $(TARGETS) `basename $(LIBCUPS) .2` libcups.dylib
131
132
133 #
134 # Update dependencies (without system header dependencies...)
135 #
136
137 depend:
138 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
139
140
141 #
142 # Install object and target files...
143 #
144
145 install: all installhdrs $(INSTALLSTATIC)
146 $(INSTALL_DIR) -m 755 $(LIBDIR)
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
157
158 installstatic:
159 $(INSTALL_DIR) -m 755 $(LIBDIR)
160 if test $(LIBCUPS) != "libcups.a"; then \
161 $(INSTALL_LIB) libcups.a $(LIBDIR); \
162 $(RANLIB) $(LIBDIR)/libcups.a; \
163 fi
164
165 installhdrs:
166 $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
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
176 libcups.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
187 libcups.2.dylib: $(LIBOBJS)
188 echo Linking $@...
189 $(DSO) $(DSOFLAGS) -o $@ \
190 -install_name $(libdir)/$@ \
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
202 libcups_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
213 libcups.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
223 libcups.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
234 phpcups.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
243 php_cups_wrap.o: php_cups_wrap.c
244 echo Compiling $<...
245 $(CC) $(CFLAGS) `php-config --includes` -c $<
246 php_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
255 testarray: 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
265 testfile: 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
275 testhttp: 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
285 testipp: 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
295 testi18n: 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
305 testlang: testlang.o libcups.a
306 echo Linking $@...
307 $(CC) $(LDFLAGS) -o $@ testlang.o libcups.a \
308 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
309
310
311 #
312 # testppd (dependency on static CUPS library is intentional)
313 #
314
315 testppd: testppd.o libcups.a
316 echo Linking $@...
317 $(CC) $(LDFLAGS) -o $@ testppd.o libcups.a \
318 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
319
320
321 #
322 # Automatic API help files...
323 #
324
325 apihelp:
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 \
332 cups.h dest.c getputfile.c language.c \
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 \
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
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
356 include Dependencies
357
358
359 #
360 # End of "$Id: Makefile 5138 2006-02-21 10:49:06Z mike $".
361 #