2 # "$Id: Makefile 7961 2008-09-17 19:52:46Z mike $"
4 # Top-level Makefile for CUPS.
6 # Copyright 2007-2010 by Apple Inc.
7 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
9 # These coded instructions, statements, and computer programs are the
10 # property of Apple Inc. and are protected by Federal copyright
11 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 # which should have been included with this file. If this file is
13 # file is missing or damaged, see the license at "http://www.cups.org/".
20 # Don't run top-level build targets in parallel...
27 # Directories to make...
30 DIRS
= cups
test $(BUILDDIRS
) $(PHPDIR
) $(FONTS
)
39 echo Using ARCHFLAGS
="$(ARCHFLAGS)"
40 echo Using ALL_CFLAGS
="$(ALL_CFLAGS)"
41 echo Using ALL_CXXFLAGS
="$(ALL_CXXFLAGS)"
43 echo Using CXX
="$(CC)"
44 echo Using DSOFLAGS
="$(DSOFLAGS)"
45 echo Using LDFLAGS
="$(LDFLAGS)"
46 echo Using LIBS
="$(LIBS)"
47 for
dir in
$(DIRS
); do\
48 echo Making
all in
$$dir...
;\
49 (cd
$$dir ; $(MAKE
) $(MFLAGS
) all $(UNITTESTS
)) || exit
1;\
54 # Make library targets...
58 echo Using ARCHFLAGS
="$(ARCHFLAGS)"
59 echo Using ALL_CFLAGS
="$(ALL_CFLAGS)"
60 echo Using ALL_CXXFLAGS
="$(ALL_CXXFLAGS)"
62 echo Using CXX
="$(CC)"
63 echo Using DSOFLAGS
="$(DSOFLAGS)"
64 echo Using LDFLAGS
="$(LDFLAGS)"
65 echo Using LIBS
="$(LIBS)"
66 for
dir in
$(DIRS
); do\
67 echo Making libraries in
$$dir...
;\
68 (cd
$$dir ; $(MAKE
) $(MFLAGS
) libs
) || exit
1;\
73 # Make unit test targets...
77 echo Using ARCHFLAGS
="$(ARCHFLAGS)"
78 echo Using ALL_CFLAGS
="$(ALL_CFLAGS)"
79 echo Using ALL_CXXFLAGS
="$(ALL_CXXFLAGS)"
81 echo Using CXX
="$(CC)"
82 echo Using DSOFLAGS
="$(DSOFLAGS)"
83 echo Using LDFLAGS
="$(LDFLAGS)"
84 echo Using LIBS
="$(LIBS)"
85 for
dir in
$(DIRS
); do\
86 echo Making
all in
$$dir...
;\
87 (cd
$$dir ; $(MAKE
) $(MFLAGS
) unittests
) || exit
1;\
92 # Remove object and target files...
96 for
dir in
$(DIRS
); do\
97 echo Cleaning in
$$dir...
;\
98 (cd
$$dir; $(MAKE
) $(MFLAGS
) clean) || exit
1;\
103 # Remove all non-distribution files...
107 $(RM
) Makedefs config.h config.log config.status
109 $(RM
) conf
/cupsd.conf conf
/mime.convs conf
/pam.std conf
/snmp.conf
110 $(RM
) doc
/help
/ref-cupsd-conf.html doc
/help
/standard.html doc
/index.html
111 $(RM
) man
/client.conf.man
112 $(RM
) man
/cups-deviced.man man
/cups-driverd.man
113 $(RM
) man
/cups-lpd.man man
/cupsaddsmb.man man
/cupsd.man
114 $(RM
) man
/cupsd.conf.man man
/drv.man man
/lpoptions.man
115 $(RM
) packaging
/cups.list
116 $(RM
) packaging
/cups-desc.plist packaging
/cups-info.plist
117 $(RM
) templates
/header.tmpl
118 $(RM
) desktop
/cups.desktop
119 $(RM
) scheduler
/cups.sh scheduler
/cups-lpd.xinetd
120 $(RM
) scheduler
/org.cups.cups-lpd.plist scheduler
/cups.xml
121 -$(RM
) doc
/*/index.html
122 -$(RM
) templates
/*/header.tmpl
123 -$(RM
) -r autom4te
*.cache clang cups
/charmaps cups
/locale driver
/test
131 for
dir in
$(DIRS
); do\
132 echo Making dependencies in
$$dir...
;\
133 (cd
$$dir; $(MAKE
) $(MFLAGS
) depend
) || exit
1;\
138 # Run the clang.llvm.org static code analysis tool on the C sources.
139 # (at least checker-231 is required for scan-build to work this way)
142 .PHONY
: clang clang-changes
145 scan-build
-V
-k
-o
`pwd`/clang
$(MAKE
) $(MFLAGS
) clean all
147 scan-build
-V
-k
-o
`pwd`/clang
$(MAKE
) $(MFLAGS
) all
151 # Generate a ctags file...
159 # Install everything...
162 install: install-data install-headers install-libs install-exec
166 # Install data files...
170 for
dir in
$(DIRS
); do\
171 echo Installing data files in
$$dir...
;\
172 (cd
$$dir; $(MAKE
) $(MFLAGS
) install-data
) || exit
1;\
174 echo Installing cups-config script...
175 $(INSTALL_DIR
) -m
755 $(BINDIR
)
176 $(INSTALL_SCRIPT
) cups-config
$(BINDIR
)/cups-config
180 # Install header files...
184 for
dir in
$(DIRS
); do\
185 echo Installing header files in
$$dir...
;\
186 (cd
$$dir; $(MAKE
) $(MFLAGS
) install-headers
) || exit
1;\
188 if
test "x$(privateinclude)" != x
; then \
189 echo Installing config.h into
$(PRIVATEINCLUDE
)...
; \
190 $(INSTALL_DIR
) -m
755 $(PRIVATEINCLUDE
); \
191 $(INSTALL_DATA
) config.h
$(PRIVATEINCLUDE
)/config.h
; \
196 # Install programs...
200 for
dir in
$(DIRS
); do\
201 echo Installing programs in
$$dir...
;\
202 (cd
$$dir; $(MAKE
) $(MFLAGS
) install-exec
) || exit
1;\
207 # Install libraries...
211 for
dir in
$(DIRS
); do\
212 echo Installing libraries in
$$dir...
;\
213 (cd
$$dir; $(MAKE
) $(MFLAGS
) install-libs
) || exit
1;\
218 # Uninstall object and target files...
222 for
dir in
$(DIRS
); do\
223 echo Uninstalling in
$$dir...
;\
224 (cd
$$dir; $(MAKE
) $(MFLAGS
) uninstall) || exit
1;\
226 echo Uninstalling cups-config script...
227 $(RM
) $(BINDIR
)/cups-config
232 # Run the test suite...
236 echo Running CUPS
test suite...
237 cd
test; .
/run-stp-tests.sh
241 echo Running CUPS
test suite with defaults...
242 cd
test; .
/run-stp-tests.sh
1 0 n
246 # Create HTML documentation...
250 for
dir in cgi-bin cups
filter driver ppdc scheduler
; do\
251 echo Generating API help in
$$dir...
;\
252 (cd
$$dir; $(MAKE
) $(MFLAGS
) apihelp
) || exit
1;\
256 for
dir in cgi-bin cups
filter driver ppdc scheduler
; do\
257 echo Generating framed API help in
$$dir...
;\
258 (cd
$$dir; $(MAKE
) $(MFLAGS
) framedhelp
) || exit
1;\
263 # Create an Xcode docset...
267 echo Generating docset directory tree...
268 $(RM
) -r org.cups.docset
269 mkdir
-p org.cups.docset
/Contents
/Resources
/Documentation
/help
270 mkdir
-p org.cups.docset
/Contents
/Resources
/Documentation
/images
271 cd man
; $(MAKE
) $(MFLAGS
) html
272 cd doc
; $(MAKE
) $(MFLAGS
) docset
273 cd cgi-bin
; $(MAKE
) $(MFLAGS
) makedocset
274 cgi-bin
/makedocset org.cups.docset \
275 `svnversion . | sed -e '1,$$s/[a-zA-Z]//g'` \
276 doc
/help
/api-
*.tokens
277 $(RM
) doc
/help
/api-
*.tokens
278 echo Indexing docset...
279 /Developer
/usr
/bin
/docsetutil index org.cups.docset
280 echo Generating docset archive and feed...
281 $(RM
) org.cups.docset.atom
282 /Developer
/usr
/bin
/docsetutil package
--output org.cups.docset.xar \
283 --atom org.cups.docset.atom \
284 --download-url http
://www.cups.org
/org.cups.docset.xar \
289 # Make software distributions using EPM (http://www.epmhome.org/)...
292 EPMFLAGS
= -v
--output-dir
dist $(EPMARCH
)
294 aix bsd deb depot inst pkg setld slackware swinstall tardist
:
295 epm
$(EPMFLAGS
) -f
$@ cups packaging
/cups.list
298 epm
$(EPMFLAGS
) -s packaging
/installer.gif cups packaging
/cups.list
301 epm
$(EPMFLAGS
) -f osx
-s packaging
/installer.tif cups packaging
/cups.list
304 epm
$(EPMFLAGS
) -f rpm
-s packaging
/installer.gif cups packaging
/cups.list
309 $(MAKE
) $(MFLAGS
) epm
311 *BSD
*) $(MAKE
) $(MFLAGS
) bsd
;; \
312 Darwin
*) $(MAKE
) $(MFLAGS
) osx
;; \
313 IRIX
*) $(MAKE
) $(MFLAGS
) tardist
;; \
314 Linux
*) test ! -x
/usr
/bin
/rpm ||
$(MAKE
) $(MFLAGS
) rpm
;; \
315 SunOS
*) $(MAKE
) $(MFLAGS
) pkg
;; \
320 # End of "$Id: Makefile 7961 2008-09-17 19:52:46Z mike $".