]> granicus.if.org Git - postgresql/blob - src/Makefile.global.in
Another round of those unportable config/build changes :-/
[postgresql] / src / Makefile.global.in
1 #----------------------------------------------------------------------------
2 #
3 # Makefile.global--
4 #    global configuration for the Makefiles
5 #
6 # Copyright (c) 1994, Regents of the University of California
7 #
8 #
9 # IDENTIFICATION
10 #    $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.86 2000/07/09 13:13:59 petere Exp $
11 #
12 # NOTES
13 #    Essentially all Postgres make files include this file and use the
14 #    variables it sets.
15 #
16 #    To override the default setting, create a Makefile.custom in this
17 #    directory and put your defines there. (Makefile.custom is included
18 #    near the end of this file).  Sometimes, a variable gets set in
19 #    Makefile.global after Makefile.custom has been included, so you can't
20 #    simply set that variable in Makefile.custom.  In those cases, there is
21 #    often another variable (like CUSTOM_COPT) that you can set in
22 #    Makefile.custom that influences the later setting of the true variable
23 #    of interest (like CFLAGS) by Makefile.global.
24 #
25 #
26 #    If you change any of these defines you probably have to
27 #       make clean; make
28 #    since no dependencies are created for these. (of course you can
29 #    be crafty and check what files really depend on them and just remake
30 #    those).
31 #
32 #    Before including this file, you must set the SRCDIR variable to the
33 #    path of the top of the Postgres source tree (the directory that
34 #    contains this file).
35 #
36 #-------------------------------------------------------------------------
37
38 # PostgreSQL version number
39 VERSION = @VERSION@
40
41 ifndef top_builddir
42 top_builddir = $(SRCDIR)/..
43 endif
44
45 ifndef SRCDIR
46 SRCDIR = $(top_builddir)/src
47 endif
48
49 # This should be changed once we have separate build dirs.
50 top_srcdir = $(top_builddir)
51
52 ifeq ($(top_builddir), $(top_srcdir))
53 srcdir = .
54 else
55 srcdir = $(top_srcdir)/$(subdir)
56 endif
57 VPATH = $(srcdir)
58
59 ##############################################################################
60 #
61 # CONFIGURATION SECTION
62 #
63 # Following are settings pertaining to the postgres build and
64 # installation.
65 # of the port.
66 #
67 # Ignore BSD_SHLIB if you're not using one of the BSD ports.  But if you
68 # are, and it's one that doesn't have shared libraries (NetBSD/vax is an
69 # example of this), set BSD_SHLIB to null in Makefile.custom.
70 BSD_SHLIB= true
71
72 # This is mainly for use on FreeBSD, where we have both a.out and elf
73 # systems now.  May be applicable to other systems to?
74 ELF_SYSTEM= @ELF_SYS@
75
76 LIBPQDIR= $(SRCDIR)/interfaces/libpq
77 LIBPGEASYDIR= $(SRCDIR)/interfaces/libpgeasy
78 LIBPGTCLDIR= $(SRCDIR)/interfaces/libpgtcl
79
80 LIBPQ= -L$(LIBPQDIR) -lpq
81 LIBPGTCL= -L$(LIBPGTCLDIR) -lpgtcl
82 LIBPGEASY= -L$(LIBPGEASYDIR) -lpgeasy
83
84 # installation directories
85
86 prefix = @prefix@
87 exec_prefix = @exec_prefix@
88 bindir = @bindir@
89 sbindir = @sbindir@
90 libexecdir = @libexecdir@
91 datadir = @datadir@
92 sysconfdir = @sysconfdir@
93 sharedstatedir = @sharedstatedir@
94 localstatedir = @localstatedir@
95 libdir = @libdir@
96 includedir = @includedir@
97 mandir = @mandir@
98
99 docdir = ${prefix}/doc
100 odbcinst_ini_dir = @odbcinst_ini_dir@
101
102 # old variable names for installation directories
103
104 POSTGRESDIR= $(prefix)
105 BINDIR= $(bindir)
106 LIBDIR= $(libdir)
107 TEMPLATEDIR= $(libdir)
108 POSTMANDIR= $(mandir)
109 POSTDOCDIR= $(docdir)
110 HEADERDIR= $(includedir)
111
112
113 ##############################################################################
114 #
115 # FEATURES
116 #
117 # To disable a feature, comment out the entire definition
118 # (that is, prepend '#', don't set it to "0" or "no").
119
120 # Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
121 # multi-byte types to generate a bus error.
122 ENFORCE_ALIGNMENT= true
123
124 # Comment out PROFILE to generate a profile version of the binaries
125 #PROFILE= -p -non_shared
126
127
128 with_CXX = @with_CXX@
129 with_perl = @with_perl@
130 enable_odbc = @enable_odbc@
131
132 with_python = @with_python@
133 PYTHON = @PYTHON@
134 python_extmakefile = @python_extmakefile@
135 python_moduledir = @python_moduledir@
136
137 krb_srvtab = @krb_srvtab@
138
139 #
140 # Please do not edit USE_TCL and USE_TK by hand.
141 #
142 USE_TCL= @USE_TCL@
143 USE_TK= @USE_TK@
144 WISH= @WISH@
145 TCL_CONFIG_SH = @TCL_CONFIG_SH@
146 TK_CONFIG_SH = @TK_CONFIG_SH@
147
148 X_CFLAGS= @X_CFLAGS@
149 X_LIBS= @X_LIBS@
150 X11_LIBS= -lX11 @X_EXTRA_LIBS@
151
152 # flag whether multibyte is on/off
153 MULTIBYTE=@MULTIBYTE@
154
155 ##############################################################################
156 #
157 # Installation.
158 #
159 # For many ports, INSTALL is overridden below.
160 INSTALL= @INSTALL@
161
162 INSTALL_PROGRAM = @INSTALL_PROGRAM@
163 INSTALL_SCRIPT = @INSTALL_SCRIPT@
164 INSTALL_DATA = @INSTALL_DATA@
165 INSTALL_SHLIB = @INSTALL_SHLIB@
166
167 mkinstalldirs = @mkinstalldirs@
168
169 RANLIB= @RANLIB@
170
171 #-------------------------------------------------------------
172 # See the subdirectory template for default settings for these
173 #-------------------------------------------------------------
174 CC= @CC@
175 CPP= @CPP@
176 YACC= @YACC@
177 YFLAGS = @YFLAGS@
178 LEX= @LEX@
179 AROPT= @AROPT@
180 CPPFLAGS = @CPPFLAGS@
181 CFLAGS = -I$(SRCDIR)/include $(CPPFLAGS) @CFLAGS@
182 CFLAGS_SL= @SHARED_LIB@
183 LIBS= @LIBS@
184 LDFLAGS= @LDFLAGS@ $(LIBS)
185 KRB_LIBS = @KRB_LIBS@
186 LDREL= -r
187 LDOUT= -o
188 DLSUFFIX= @DLSUFFIX@
189 LN_S= @LN_S@
190 TAR= @tar@
191 PERL = @PERL@
192 AWK = @AWK@
193 CXX=@CXX@
194 CXXFLAGS=@CXXFLAGS@ @INCLUDES@
195 GCC = @GCC@
196
197
198 ##############################################################################
199 #
200 # Additional platform-specific settings
201 #
202
203 # Name of the target platform.
204 PORTNAME= @PORTNAME@
205 CPU= @CPU@
206
207 # Various grungy items needed to configure some platforms.
208 HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
209 HPUXMATHLIB= @HPUXMATHLIB@
210
211 include $(SRCDIR)/Makefile.port
212
213 ##############################################################################
214 #
215 # Customization.
216 #
217 # This includes your local customizations if Makefile.custom exists
218 # in the source directory.  This file doesn't exist in the original
219 # distribution so that it doesn't get overwritten when you upgrade.
220 ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
221 include $(SRCDIR)/Makefile.custom
222 endif
223
224 # This goes here so that customization in Makefile.custom is effective
225 ##############################################################################
226
227 ifneq ($(CUSTOM_INSTALL),)
228 INSTALL= $(CUSTOM_INSTALL)
229 endif
230
231 #
232 # Flags for CC and LD.
233
234 ##############################################################################
235 # COPT
236 #
237 # COPT is for options that the sophisticated builder might want to vary
238 # from one build to the next, like options to build Postgres with debugging
239 # information included.  COPT is meant to be set on the make command line,
240 # for example with the command "make COPT=-g".  The value you see set here
241 # is the default that gets used if the builder does not give a value for
242 # COPT on his make command.
243 #
244 # There is a nonobvious relationship between -O (optimization) and
245 # -Werror (consider all warnings fatal).  On some systems, if you don't
246 # optimize, you will always get some warnings because the system header
247 # files will include some unreferenced functions in the code.  These are
248 # functions that are supposed to be inline, so there wouldn't ordinarily
249 # be an "unreferenced" problem, but if you don't enable optimization, no
250 # inlining can happen, and hence the problem.  Therefore, we include
251 # if you override -O, you override -Werror as well.
252 #
253 # CUSTOM_COPT is something the user may set in Makefile.custom
254
255 # Common values for COPT are: -g for debuggable binaries, -m486 if you are
256 # using a i486 or better.
257
258 ifneq ($(CUSTOM_CC),)
259   CC= $(CUSTOM_CC)
260 endif
261
262 ifneq ($(CUSTOM_COPT),)
263   COPT= $(CUSTOM_COPT)
264 endif
265
266 ifdef COPT
267    CFLAGS+= $(COPT)
268    LDFLAGS+= $(COPT)
269 endif
270
271 ifdef PROFILE
272    CFLAGS+= $(PROFILE)
273    LDFLAGS+= $(PROFILE)
274 endif
275
276
277 # substitute implementations of the C library
278 INET_ATON = @INET_ATON@
279 STRERROR = @STRERROR@
280 STRERROR2 = @STRERROR2@
281 SNPRINTF = @SNPRINTF@
282 STRDUP = @STRDUP@
283
284 .PHONY: all install installdirs uninstall dep depend clean distclean maintainer-clean
285 .SILENT: installdirs