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