]> git.ipfire.org Git - thirdparty/cups.git/blame_incremental - Makefile
Don't install cupscgi, cupsmime, or cupsppdc shared libraries.
[thirdparty/cups.git] / Makefile
... / ...
CommitLineData
1#
2# Top-level Makefile for CUPS.
3#
4# Copyright 2007-2016 by Apple Inc.
5# Copyright 1997-2007 by Easy Software Products, all rights reserved.
6#
7# Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8#
9
10include Makedefs
11
12
13#
14# Directories to make...
15#
16
17DIRS = cups test $(BUILDDIRS)
18
19
20#
21# Make all targets...
22#
23
24all:
25 chmod +x cups-config
26 echo Using ARCHFLAGS="$(ARCHFLAGS)"
27 echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
28 echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
29 echo Using CC="$(CC)"
30 echo Using CXX="$(CC)"
31 echo Using DSOFLAGS="$(DSOFLAGS)"
32 echo Using LDFLAGS="$(LDFLAGS)"
33 echo Using LIBS="$(LIBS)"
34 for dir in $(DIRS); do\
35 echo Making all in $$dir... ;\
36 (cd $$dir ; $(MAKE) $(MFLAGS) all $(UNITTESTS)) || exit 1;\
37 done
38
39
40#
41# Make library targets...
42#
43
44libs:
45 echo Using ARCHFLAGS="$(ARCHFLAGS)"
46 echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
47 echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
48 echo Using CC="$(CC)"
49 echo Using CXX="$(CC)"
50 echo Using DSOFLAGS="$(DSOFLAGS)"
51 echo Using LDFLAGS="$(LDFLAGS)"
52 echo Using LIBS="$(LIBS)"
53 for dir in $(DIRS); do\
54 echo Making libraries in $$dir... ;\
55 (cd $$dir ; $(MAKE) $(MFLAGS) libs) || exit 1;\
56 done
57
58
59#
60# Make unit test targets...
61#
62
63unittests:
64 echo Using ARCHFLAGS="$(ARCHFLAGS)"
65 echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
66 echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
67 echo Using CC="$(CC)"
68 echo Using CXX="$(CC)"
69 echo Using DSOFLAGS="$(DSOFLAGS)"
70 echo Using LDFLAGS="$(LDFLAGS)"
71 echo Using LIBS="$(LIBS)"
72 for dir in $(DIRS); do\
73 echo Making all in $$dir... ;\
74 (cd $$dir ; $(MAKE) $(MFLAGS) unittests) || exit 1;\
75 done
76
77
78#
79# Remove object and target files...
80#
81
82clean:
83 for dir in $(DIRS); do\
84 echo Cleaning in $$dir... ;\
85 (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\
86 done
87
88
89#
90# Remove all non-distribution files...
91#
92
93distclean: clean
94 $(RM) Makedefs config.h config.log config.status
95 $(RM) conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
96 $(RM) cups-config
97 $(RM) data/testprint
98 $(RM) desktop/cups.desktop
99 $(RM) doc/index.html
100 $(RM) man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man
101 $(RM) packaging/cups.list
102 $(RM) scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket
103 $(RM) templates/header.tmpl
104 -$(RM) doc/*/index.html
105 -$(RM) templates/*/header.tmpl
106 -$(RM) -r autom4te*.cache clang cups/charmaps cups/locale
107
108
109#
110# Make dependencies
111#
112
113depend:
114 for dir in $(DIRS); do\
115 echo Making dependencies in $$dir... ;\
116 (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\
117 done
118
119
120#
121# Run the Clang static code analysis tool on the sources, available here:
122#
123# http://clang-analyzer.llvm.org
124#
125# At least checker-231 is required.
126#
127# Alternatively, use "--analyze -Xanalyzer -analyzer-output=text" for OPTIM (text
128# output instead of HTML...)
129#
130
131.PHONY: clang clang-changes
132clang:
133 $(RM) -r clang
134 scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) clean all
135clang-changes:
136 scan-build -V -k -o `pwd`/clang $(MAKE) $(MFLAGS) all
137
138
139#
140# Run the STACK tool on the sources, available here:
141#
142# http://css.csail.mit.edu/stack/
143#
144# Do the following to pass options to configure:
145#
146# make CONFIGFLAGS="--foo --bar" stack
147#
148
149.PHONY: stack
150stack:
151 stack-build ./configure $(CONFIGFLAGS)
152 stack-build $(MAKE) $(MFLAGS) clean all
153 poptck
154 $(MAKE) $(MFLAGS) distclean
155 $(RM) */*.ll
156 $(RM) */*.ll.out
157
158
159#
160# Generate a ctags file...
161#
162
163ctags:
164 ctags -R .
165
166
167#
168# Install everything...
169#
170
171install: install-data install-headers install-libs install-exec
172
173
174#
175# Install data files...
176#
177
178install-data:
179 echo Making all in cups...
180 (cd cups; $(MAKE) $(MFLAGS) all)
181 for dir in $(DIRS); do\
182 echo Installing data files in $$dir... ;\
183 (cd $$dir; $(MAKE) $(MFLAGS) install-data) || exit 1;\
184 done
185 echo Installing cups-config script...
186 $(INSTALL_DIR) -m 755 $(BINDIR)
187 $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
188
189
190#
191# Install header files...
192#
193
194install-headers:
195 for dir in $(DIRS); do\
196 echo Installing header files in $$dir... ;\
197 (cd $$dir; $(MAKE) $(MFLAGS) install-headers) || exit 1;\
198 done
199 if test "x$(privateinclude)" != x; then \
200 echo Installing config.h into $(PRIVATEINCLUDE)...; \
201 $(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \
202 $(INSTALL_DATA) config.h $(PRIVATEINCLUDE)/config.h; \
203 fi
204
205
206#
207# Install programs...
208#
209
210install-exec: all
211 for dir in $(DIRS); do\
212 echo Installing programs in $$dir... ;\
213 (cd $$dir; $(MAKE) $(MFLAGS) install-exec) || exit 1;\
214 done
215
216
217#
218# Install libraries...
219#
220
221install-libs: libs
222 for dir in $(DIRS); do\
223 echo Installing libraries in $$dir... ;\
224 (cd $$dir; $(MAKE) $(MFLAGS) install-libs) || exit 1;\
225 done
226
227
228#
229# Uninstall object and target files...
230#
231
232uninstall:
233 for dir in $(DIRS); do\
234 echo Uninstalling in $$dir... ;\
235 (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\
236 done
237 echo Uninstalling cups-config script...
238 $(RM) $(BINDIR)/cups-config
239 -$(RMDIR) $(BINDIR)
240
241
242#
243# Run the test suite...
244#
245
246test: all unittests
247 echo Running CUPS test suite...
248 cd test; ./run-stp-tests.sh
249
250
251check: all unittests
252 echo Running CUPS test suite with defaults...
253 cd test; ./run-stp-tests.sh 1 0 n n
254
255debugcheck: all unittests
256 echo Running CUPS test suite with debug printfs...
257 cd test; ./run-stp-tests.sh 1 0 n y
258
259
260#
261# Create HTML documentation using Mini-XML's mxmldoc (http://www.msweet.org/)...
262#
263
264apihelp:
265 for dir in cups filter; do\
266 echo Generating API help in $$dir... ;\
267 (cd $$dir; $(MAKE) $(MFLAGS) apihelp) || exit 1;\
268 done
269
270
271#
272# Create an Xcode docset using Mini-XML's mxmldoc (http://www.msweet.org/)...
273#
274
275docset: apihelp
276 echo Generating docset directory tree...
277 $(RM) -r org.cups.docset
278 mkdir -p org.cups.docset/Contents/Resources/Documentation/help
279 mkdir -p org.cups.docset/Contents/Resources/Documentation/images
280 cd man; $(MAKE) $(MFLAGS) html
281 cd doc; $(MAKE) $(MFLAGS) docset
282 cd cgi-bin; $(MAKE) $(MFLAGS) makedocset
283 cgi-bin/makedocset org.cups.docset \
284 `svnversion . | sed -e '1,$$s/[a-zA-Z]//g'` \
285 doc/help/api-*.tokens
286 $(RM) doc/help/api-*.tokens
287 echo Indexing docset...
288 /Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil index org.cups.docset
289 echo Generating docset archive and feed...
290 $(RM) org.cups.docset.atom
291 /Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil package --output org.cups.docset.xar \
292 --atom org.cups.docset.atom \
293 --download-url http://www.cups.org/org.cups.docset.xar \
294 org.cups.docset
295
296
297#
298# Lines of code computation...
299#
300
301sloc:
302 for dir in cups scheduler; do \
303 (cd $$dir; $(MAKE) $(MFLAGS) sloc) || exit 1;\
304 done
305
306
307#
308# Make software distributions using EPM (http://www.msweet.org/)...
309#
310
311EPMFLAGS = -v --output-dir dist $(EPMARCH)
312
313bsd deb epm pkg rpm slackware:
314 epm $(EPMFLAGS) -f $@ cups packaging/cups.list
315
316.PHONY: dist
317dist: all
318 $(RM) -r dist
319 $(MAKE) $(MFLAGS) epm
320 case `uname` in \
321 *BSD*) $(MAKE) $(MFLAGS) bsd;; \
322 Linux*) test ! -x /usr/bin/rpm || $(MAKE) $(MFLAGS) rpm;; \
323 SunOS*) $(MAKE) $(MFLAGS) pkg;; \
324 esac
325
326
327#
328# Don't run top-level build targets in parallel...
329#
330
331.NOTPARALLEL: