1 #----------------------------------------------------------------------------
4 # global configuration for the Makefiles
6 # Copyright (c) 1994, Regents of the University of California
10 # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.86 2000/07/09 13:13:59 petere Exp $
13 # Essentially all Postgres make files include this file and use the
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.
26 # If you change any of these defines you probably have to
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
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).
36 #-------------------------------------------------------------------------
38 # PostgreSQL version number
42 top_builddir = $(SRCDIR)/..
46 SRCDIR = $(top_builddir)/src
49 # This should be changed once we have separate build dirs.
50 top_srcdir = $(top_builddir)
52 ifeq ($(top_builddir), $(top_srcdir))
55 srcdir = $(top_srcdir)/$(subdir)
59 ##############################################################################
61 # CONFIGURATION SECTION
63 # Following are settings pertaining to the postgres build and
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.
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?
76 LIBPQDIR= $(SRCDIR)/interfaces/libpq
77 LIBPGEASYDIR= $(SRCDIR)/interfaces/libpgeasy
78 LIBPGTCLDIR= $(SRCDIR)/interfaces/libpgtcl
80 LIBPQ= -L$(LIBPQDIR) -lpq
81 LIBPGTCL= -L$(LIBPGTCLDIR) -lpgtcl
82 LIBPGEASY= -L$(LIBPGEASYDIR) -lpgeasy
84 # installation directories
87 exec_prefix = @exec_prefix@
90 libexecdir = @libexecdir@
92 sysconfdir = @sysconfdir@
93 sharedstatedir = @sharedstatedir@
94 localstatedir = @localstatedir@
96 includedir = @includedir@
99 docdir = ${prefix}/doc
100 odbcinst_ini_dir = @odbcinst_ini_dir@
102 # old variable names for installation directories
104 POSTGRESDIR= $(prefix)
107 TEMPLATEDIR= $(libdir)
108 POSTMANDIR= $(mandir)
109 POSTDOCDIR= $(docdir)
110 HEADERDIR= $(includedir)
113 ##############################################################################
117 # To disable a feature, comment out the entire definition
118 # (that is, prepend '#', don't set it to "0" or "no").
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
124 # Comment out PROFILE to generate a profile version of the binaries
125 #PROFILE= -p -non_shared
128 with_CXX = @with_CXX@
129 with_perl = @with_perl@
130 enable_odbc = @enable_odbc@
132 with_python = @with_python@
134 python_extmakefile = @python_extmakefile@
135 python_moduledir = @python_moduledir@
137 krb_srvtab = @krb_srvtab@
140 # Please do not edit USE_TCL and USE_TK by hand.
145 TCL_CONFIG_SH = @TCL_CONFIG_SH@
146 TK_CONFIG_SH = @TK_CONFIG_SH@
150 X11_LIBS= -lX11 @X_EXTRA_LIBS@
152 # flag whether multibyte is on/off
153 MULTIBYTE=@MULTIBYTE@
155 ##############################################################################
159 # For many ports, INSTALL is overridden below.
162 INSTALL_PROGRAM = @INSTALL_PROGRAM@
163 INSTALL_SCRIPT = @INSTALL_SCRIPT@
164 INSTALL_DATA = @INSTALL_DATA@
165 INSTALL_SHLIB = @INSTALL_SHLIB@
167 mkinstalldirs = @mkinstalldirs@
171 #-------------------------------------------------------------
172 # See the subdirectory template for default settings for these
173 #-------------------------------------------------------------
180 CPPFLAGS = @CPPFLAGS@
181 CFLAGS = -I$(SRCDIR)/include $(CPPFLAGS) @CFLAGS@
182 CFLAGS_SL= @SHARED_LIB@
184 LDFLAGS= @LDFLAGS@ $(LIBS)
185 KRB_LIBS = @KRB_LIBS@
194 CXXFLAGS=@CXXFLAGS@ @INCLUDES@
198 ##############################################################################
200 # Additional platform-specific settings
203 # Name of the target platform.
207 # Various grungy items needed to configure some platforms.
208 HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
209 HPUXMATHLIB= @HPUXMATHLIB@
211 include $(SRCDIR)/Makefile.port
213 ##############################################################################
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
224 # This goes here so that customization in Makefile.custom is effective
225 ##############################################################################
227 ifneq ($(CUSTOM_INSTALL),)
228 INSTALL= $(CUSTOM_INSTALL)
232 # Flags for CC and LD.
234 ##############################################################################
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.
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.
253 # CUSTOM_COPT is something the user may set in Makefile.custom
255 # Common values for COPT are: -g for debuggable binaries, -m486 if you are
256 # using a i486 or better.
258 ifneq ($(CUSTOM_CC),)
262 ifneq ($(CUSTOM_COPT),)
277 # substitute implementations of the C library
278 INET_ATON = @INET_ATON@
279 STRERROR = @STRERROR@
280 STRERROR2 = @STRERROR2@
281 SNPRINTF = @SNPRINTF@
284 .PHONY: all install installdirs uninstall dep depend clean distclean maintainer-clean