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.33 1998/01/27 03:24:51 scrappy 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 #-------------------------------------------------------------------------
39 ##############################################################################
41 # CONFIGURATION SECTION
43 # Following are settings pertaining to the postgres build and
47 # Ignore LINUX_ELF if you're not using Linux. But if you are, and you're
48 # compiling to a.out (which means you're using the dld dynamic loading
49 # library), set LINUX_ELF to null in Makefile.custom.
52 LIBPQDIR:= $(SRCDIR)/interfaces/libpq
54 # For convenience, POSTGRESDIR is where BINDIR, and LIBDIR
55 # and other target destinations are rooted. Of course, each of these is
56 # changable separately.
59 # Where the postgres executables live (changeable by just putting them
60 # somewhere else and putting that directory in your shell PATH)
61 BINDIR= $(POSTGRESDIR)/bin
63 # Where libpq.a gets installed. You must put it where your loader will
64 # look for it if you wish to use the -lpq convention. Otherwise you
65 # can just put the absolute pathname to the library at the end of your
67 LIBDIR= $(POSTGRESDIR)/lib
69 # This is the directory where IPC utilities ipcs and ipcrm are located
74 # Where the man pages (suitable for use with "man") get installed.
75 POSTMANDIR= $(POSTGRESDIR)/man
77 # Where the formatted documents (e.g., the reference manual) get installed.
78 POSTDOCDIR= $(POSTGRESDIR)/doc
80 # Where the header files necessary to build frontend programs get installed.
81 HEADERDIR= $(POSTGRESDIR)/include
83 # NAMEDATALEN is the max length for system identifiers (e.g. table names,
84 # attribute names, function names, etc.)
86 # These MUST be set here. DO NOT COMMENT THESE OUT
87 # Setting these too high will result in excess space usage for system catalogs
88 # Setting them too low will make the system unusable.
89 # values between 16 and 64 that are multiples of four are recommended.
91 # NOTE also that databases with different NAMEDATALEN's cannot interoperate!
93 # THERE ARE REDUNDANT DEFINITIONS OF THESE VALUES IN config.h.
94 # Don't change anything here without changing it there too.
97 # OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid)
100 ##############################################################################
104 # To disable a feature, comment out the entire definition
105 # (that is, prepend '#', don't set it to "0" or "no").
110 # Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
111 # multi-byte types to generate a bus error.
112 ENFORCE_ALIGNMENT= true
114 # Comment out PROFILE to generate a profile version of the binaries
115 #PROFILE= -p -non_shared
117 # If you plan to use Kerberos for authentication...
119 # Comment out KRBVERS if you do not use Kerberos.
120 # Set KRBVERS to "4" for Kerberos v4, "5" for Kerberos v5.
121 # XXX Edit the default Kerberos variables below!
125 # Globally pass Kerberos file locations.
126 # these are used in the postmaster and all libpq applications.
128 # Adjust KRBINCS and KRBLIBS to reflect where you have Kerberos
129 # include files and libraries installed.
130 # PG_KRB_SRVNAM is the name under which POSTGRES is registered in
131 # the Kerberos database (KDC).
132 # PG_KRB_SRVTAB is the location of the server's keytab file.
135 KRBINCS= -I/usr/athena/include
136 KRBLIBS= -L/usr/athena/lib
137 KRBFLAGS+= $(KRBINCS) -DPG_KRB_SRVNAM='"postgres_dbms"'
140 KRBFLAGS+= -DPG_KRB_SRVTAB='"/etc/srvtab"'
141 KRBLIBS+= -lkrb -ldes
145 KRBFLAGS+= -DPG_KRB_SRVTAB='"FILE:/krb5/srvtab.postgres"'
146 KRBLIBS+= -lkrb5 -lcrypto -lcom_err -lisode
152 # location of Tcl/Tk headers and libraries
154 # Uncomment this to build the tcl utilities.
156 # customize these to your site's needs
158 TCL_INCDIR= /usr/local/include
159 TCL_LIBDIR= /usr/local/lib
161 TK_INCDIR= /usr/local/include
162 TK_LIBDIR= /usr/local/lib
167 X11_INCDIR= /usr/include
169 X11_LIB= -lX11 @SOCKET_LIB@ @NSL_LIB@
172 ##############################################################################
176 # For many ports, INSTALL is overridden below.
180 INSTLOPTS= @INSTLOPTS@
181 INSTL_EXE_OPTS= @INSTL_EXE_OPTS@
182 INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
184 ##############################################################################
186 # For building shell scripts:
188 # For many ports, these are overridden below.
190 # DASH_N is what we put before the text on an echo command when we don't
191 # want a trailing newline. BACKSLASH_C is what we put at the end of the
192 # string on a echo command when we don't want a trailing newline. On
193 # some systems, you do echo -n "no newline after this", while on others
194 # you do echo "no newline after this\c".
197 BACKSLASH_C= @BACKSLASH_C@
201 #-------------------------------------------------------------
202 # See the subdirectory template for default settings for these
203 #-------------------------------------------------------------
209 CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@
210 CFLAGS_SL= @SHARED_LIB@
211 LDFLAGS= @LDFLAGS@ @LIBS@
214 include $(SRCDIR)/Makefile.port
216 ##############################################################################
220 # This includes your local customizations if Makefile.custom exists
221 # in the source directory. This file doesn't exist in the original
222 # distribution so that it doesn't get overwritten when you upgrade.
223 ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
224 include $(SRCDIR)/Makefile.custom
227 # This goes here so that customization in Makefile.custom is effective
228 ##############################################################################
230 ifneq ($(CUSTOM_INSTALL),)
231 INSTALL= $(CUSTOM_INSTALL)
235 # Flags for CC and LD.
237 ##############################################################################
240 # COPT is for options that the sophisticated builder might want to vary
241 # from one build to the next, like options to build Postgres with debugging
242 # information included. COPT is meant to be set on the make command line,
243 # for example with the command "make COPT=-g". The value you see set here
244 # is the default that gets used if the builder does not give a value for
245 # COPT on his make command.
247 # There is a nonobvious relationship between -O (optimization) and
248 # -Werror (consider all warnings fatal). On some systems, if you don't
249 # optimize, you will always get some warnings because the system header
250 # files will include some unreferenced functions in the code. These are
251 # functions that are supposed to be inline, so there wouldn't ordinarily
252 # be an "unreferenced" problem, but if you don't enable optimization, no
253 # inlining can happen, and hence the problem. Therefore, we include
254 # if you override -O, you override -Werror as well.
256 # CUSTOM_COPT is something the user may set in Makefile.custom
258 # Common values for COPT are: -g for debuggable binaries, -m486 if you are
259 # using a i486 or better.
261 ifneq ($(CUSTOM_CC),)
265 ifneq ($(CUSTOM_COPT),)
270 CFLAGS+= -Wall -Wmissing-prototypes