1 ## $Id: Makefile.global.in 7830 2008-05-14 18:57:39Z iulius $
3 ## This file is meant to be the central Makefile that configure works with
4 ## and that all other Makefiles include. No Makefile other than this one
5 ## should have to be a configure substitution target.
7 ## For installation paths, see the bottom of this file.
9 ## This version information is used to generate lib/version.c and is used
10 ## by INN for banner and local version identification. The version
11 ## identification string will be "$VERSION ($VERSION_EXTRA)", with the
12 ## parentheses omitted if $VERSION_EXTRA is empty (as it is for major
13 ## releases). If you make extensive local modifications to INN, you can
14 ## put your own version information in $VERSION_EXTRA. If it's set to
15 ## "CVS prerelease", the build time will be automatically included.
20 ## If you want to install INN relative to a root directory other than /,
21 ## set DESTDIR to the path to the root directory of the file system. This
22 ## won't affect any of the paths compiled into INN; it's used primarily
23 ## when building a software distribution, where software has to be
24 ## installed into some file system that will later be mounted as / on the
25 ## final system. DESTDIR should have a trailing slash, as the trailing
26 ## slash is not added automatically (in case someone wants to add a prefix
27 ## that isn't just a parent directory).
32 ## The absolute path to the top of the build directory, used to find the
33 ## libraries built as part of INN. Using relative paths confuses libtool
34 ## when linking the test suite.
38 ## Basic compiler settings. COPT is the variable to override on the make
39 ## command line to change the optimization or add warning flags (such as
40 ## -Wall). LFS_* is for large file support. All of INN is built with the
41 ## large file support flags if provided.
45 GCFLAGS = $(COPT) -I$(top)/include @CPPFLAGS@ $(LFS_CFLAGS)
47 BERKELEY_DB_CFLAGS = @BERKELEY_DB_CFLAGS@
49 LDFLAGS = @LDFLAGS@ $(LFS_LDFLAGS) @BERKELEY_DB_LDFLAGS@
50 LIBS = @LIBS@ $(LFS_LIBS)
52 LFS_CFLAGS = @LFS_CFLAGS@
53 LFS_LDFLAGS = @LFS_LDFLAGS@
58 MAKEPROFILING = $(MAKE) COPT="$(COPT) $(PROF)" \
59 LDFLAGS="$(LDFLAGS) $(PROF)" \
60 LIBSUFFIX=$(PROFSUFFIX)
62 ## Used to support non-recursive make. This variable is set to the necessary
63 ## options to the compiler to create an object file in a subdirectory. It
64 ## should be used instead of -c -o $@ $< and may be replaced with code that
65 ## calls mv, if the compiler doesn't support -c with -o.
69 ## Warnings to use with gcc. Default to including all of the generally
70 ## useful warnings unless there's something that makes them unsuitable. In
71 ## particular, the following warnings are *not* included:
73 ## -ansi Requires messing with feature test macros.
74 ## -pedantic Too much noise from embedded Perl.
75 ## -Wtraditional We assume ANSI C, so these aren't interesting.
76 ## -Wshadow Names like log or index are too convenient.
77 ## -Wcast-qual Used for a while, but some casts are unavoidable.
78 ## -Wconversion Too much unsigned to signed noise.
79 ## -Wredundant-decls Too much noise from system headers.
81 ## Some may be worth looking at again once a released version of gcc doesn't
82 ## warn on system headers. The warnings below are in the same order as
83 ## they're listed in the gcc manual.
85 ## Add -g because when building with warnings one generally also wants the
86 ## debugging information, and add -O because gcc won't find some warnings
87 ## without optimization turned on. Add -DDEBUG=1 so that we'll also
88 ## compile all debugging code and check it as well.
90 WARNINGS = -g -O -DDEBUG=1 -Wall -W -Wendif-labels -Wpointer-arith \
91 -Wbad-function-cast -Wcast-align -Wwrite-strings \
92 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
94 ## libtool support. Note that INN does not use Automake (and that
95 ## retrofitting Automake is likely more work than it's worth), so
96 ## libtool-aware rules have to be written by hand.
99 LIBTOOLCC = @LIBTOOLCC@
100 LIBTOOLLD = @LIBTOOLLD@
104 LIBCC = $(LIBTOOLCC) $(CC)
105 LIBLD = $(LIBTOOLLD) $(CC)
107 ## INN libraries. Nearly all INN programs are linked with libinn, and any
108 ## INN program that reads from or writes to article storage or overview is
109 ## linked against libstorage. EXTSTORAGELIBS is for external libraries
110 ## needed by libstorage.
112 LIBINN = $(builddir)/lib/libinn$(LIBSUFFIX).$(EXTLIB)
113 LIBHIST = $(builddir)/history/libinnhist$(LIBSUFFIX).$(EXTLIB)
114 LIBSTORAGE = $(builddir)/storage/libstorage$(LIBSUFFIX).$(EXTLIB)
115 EXTSTORAGELIBS = @BERKELEY_DB_LIB@
120 CRYPTLIB = @CRYPT_LIB@
122 REGEXLIB = @REGEX_LIB@
123 SHADOWLIB = @SHADOW_LIB@
125 ## Embedding support. Additional flags and libraries used when compiling
126 ## or linking portions of INN that support embedded interpretors, set by
127 ## configure based on what interpretor embeddings are selected.
129 PERLLIB = $(builddir)/lib/perl$(LIBSUFFIX).o @PERL_LIB@
132 PYTHONLIB = @PYTHON_LIB@
133 PYTHONINC = @PYTHON_INC@
135 ## OpenSSL support. Additional flags and libraries used when compiling or
136 ## linking code that contains OpenSSL support, and the path to the OpenSSL
143 ## SASL support. Additional flags and libraries used when compiling or
144 ## linking code that contains SASL support.
149 ## Kerberos support. Additional flags and libraries used when compiling or
150 ## linking code that contains Kerberos support. If Kerberos libraries were
151 ## compiled, KRB5_AUTH is also set to the name of the Kerberos v5
152 ## authenticator that should be compiled and installed.
155 KRB5_AUTH = @KRB5_AUTH@
157 ## Missing functions. If non-empty, configure detected that your system
158 ## was missing some standard functions, and INN will be providing its own
159 ## replacements from the lib directory.
163 ## Paths to various standard programs used during the build process.
164 ## Changes to this file will *not* be reflected in the paths compiled into
165 ## programs; these paths are only used during the build process and for
166 ## some autogenerated scripts. To change the compiled paths, see
167 ## include/paths.h. You may also need to modify scripts/innshellvars*.
170 COMPRESS = @COMPRESS@
177 UNCOMPRESS = @UNCOMPRESS@
179 FIXSCRIPT = $(top)/support/fixscript
181 PERLWHOAMI = $(PERL) -e 'print scalar getpwuid($$>), "\n"'
182 WHOAMI = (whoami || /usr/ucb/whoami || $(PERLWHOAMI)) 2> /dev/null
184 ## Paths and command lines for programs used only by the maintainers to
185 ## regenerate dependencies, documentation, and the like.
187 MAKEDEPEND = $(top)/support/makedepend
189 POD2MAN = pod2man -c 'InterNetNews Documentation' -r 'INN $(VERSION)'
190 POD2TEXT = pod2text -s -l
192 ## Installation directories. If any of the below are incorrect, don't just
193 ## edit this file; these directories are substituted in all over the source
194 ## tree by configure. Instead, re-run configure with the correct
195 ## command-line flags to set the directories. Run configure --help for a
196 ## list of supported flags.
201 PATHBIN = $(PATHNEWS)/bin
205 PATHINCLUDE = @includedir@
207 PATHCONTROL = @CONTROLDIR@
208 PATHFILTER = @FILTERDIR@
211 PATHLOGOLD = $(PATHLOG)/OLD
213 PATHSPOOL = @SPOOLDIR@
215 PATHAUTH = $(PATHBIN)/auth
216 PATHAUTHRESOLV = $(PATHAUTH)/resolv
217 PATHAUTHPASSWD = $(PATHAUTH)/passwd
218 PATHRNEWS = $(PATHBIN)/rnews.libexec
219 PATHARCHIVE = $(PATHSPOOL)/archive
220 PATHARTICLES = $(PATHSPOOL)/articles
221 PATHINCOMING = $(PATHSPOOL)/incoming
222 PATHTAPE = $(PATHSPOOL)/innfeed
223 PATHINBAD = $(PATHINCOMING)/bad
224 PATHOVERVIEW = $(PATHSPOOL)/overview
225 PATHOUTGOING = $(PATHSPOOL)/outgoing
232 ## Installation settings. The file installation modes are determined by
233 ## configure; inews and rnews are special and have configure flags to
234 ## control how they're installed. See INSTALL for more information.
236 NEWSUSER = @NEWSUSER@
237 NEWSGROUP = @NEWSGRP@
239 INEWSMODE = @INEWSMODE@
240 RNEWSMODE = @RNEWSMODE@
241 FILEMODE = @FILEMODE@
243 OWNER = -o $(NEWSUSER) -g $(NEWSGROUP)
244 ROWNER = -o $(NEWSUSER) -g @RNEWSGRP@
246 INSTALL = $(top)/support/install-sh -c
248 ## Installation commands. These commands are used by the installation rules
249 ## of each separate subdirectory. The naming scheme is as follows: the first
250 ## two characters are CP (indicating a plain copy) or LI (indicating an
251 ## installation that goes through libtool). After an underscore is a
252 ## one-character indicator of the file type (R for a regular file, X for an
253 ## executable, S for a setuid root executable) and then PUB for a
254 ## world-readable/world-executable file or PRI for a group-readable/
255 ## group-executable file (only the news group).
257 ## inews and rnews have their own special installation rules, as do database
258 ## files like active and newsgroups that should have the same permissions as
261 LI_SPRI = $(LIBTOOL) $(INSTALL) -o root -g $(NEWSGROUP) -m 4550 -B .OLD
262 LI_XPRI = $(LIBTOOL) $(INSTALL) $(OWNER) -m 0550 -B .OLD
263 LI_XPUB = $(LIBTOOL) $(INSTALL) $(OWNER) -m 0555 -B .OLD
265 LI_INEWS = $(LIBTOOL) $(INSTALL) $(OWNER) -m $(INEWSMODE) -B .OLD
266 LI_RNEWS = $(LIBTOOL) $(INSTALL) $(ROWNER) -m $(RNEWSMODE) -B .OLD
268 CP_RPRI = $(INSTALL) $(OWNER) -m 0640 -B .OLD
269 CP_RPUB = $(INSTALL) $(OWNER) -m 0644 -B .OLD
270 CP_XPRI = $(INSTALL) $(OWNER) -m 0550 -B .OLD
271 CP_XPUB = $(INSTALL) $(OWNER) -m 0555 -B .OLD
273 CP_DATA = $(INSTALL) $(OWNER) -m $(FILEMODE) -B .OLD
275 ## How to install man pages. Pick one of SOURCE, BSD4.4, NROFF-PACK, or
276 ## NROFF-PACK-SCO. Used by doc/man/putman.sh; read that script for more
277 ## information on what it does.
279 MANPAGESTYLE = SOURCE
281 ## Some additional definitions needed by some versions of make, to ensure a
282 ## consistant set of variables are available.