]> granicus.if.org Git - postgresql/blob - src/Makefile.global.in
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
[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.34 1998/02/13 05:09:12 scrappy 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
39 ##############################################################################
40 #
41 # CONFIGURATION SECTION
42 #
43 # Following are settings pertaining to the postgres build and 
44 # installation.  
45 # of the port.
46 #
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.
50 LINUX_ELF= true
51 #
52 # Ignore BSD_SHLIB if you're not using one of the BSD ports.  But if you
53 # are, and it's one that doesn't have shared libraries (NetBSD/vax is an
54 # example of this), set BSD_SHLIB to null in Makefile.custom.
55 BSD_SHLIB= true
56
57 LIBPQDIR:= $(SRCDIR)/interfaces/libpq
58
59 # For convenience, POSTGRESDIR is where BINDIR, and LIBDIR 
60 # and other target destinations are rooted.  Of course, each of these is 
61 # changable separately.
62 POSTGRESDIR= @prefix@
63
64 # Where the postgres executables live (changeable by just putting them
65 # somewhere else and putting that directory in your shell PATH)
66 BINDIR= $(POSTGRESDIR)/bin
67
68 # Where libpq.a gets installed.  You must put it where your loader will
69 # look for it if you wish to use the -lpq convention.  Otherwise you
70 # can just put the absolute pathname to the library at the end of your
71 # command line.
72 LIBDIR= $(POSTGRESDIR)/lib
73
74 # This is the directory where IPC utilities ipcs and ipcrm are located
75 #
76 IPCS=@ipcs@
77 IPCRM=@ipcrm@ 
78
79 # Where the man pages (suitable for use with "man") get installed.
80 POSTMANDIR= $(POSTGRESDIR)/man
81
82 # Where the formatted documents (e.g., the reference manual) get installed.
83 POSTDOCDIR= $(POSTGRESDIR)/doc
84
85 # Where the header files necessary to build frontend programs get installed.
86 HEADERDIR= $(POSTGRESDIR)/include
87
88 # NAMEDATALEN is the max length for system identifiers (e.g. table names,
89 # attribute names, function names, etc.)
90 #
91 # These MUST be set here.  DO NOT COMMENT THESE OUT
92 # Setting these too high will result in excess space usage for system catalogs
93 # Setting them too low will make the system unusable.
94 # values between 16 and 64 that are multiples of four are recommended.
95
96 # NOTE also that databases with different NAMEDATALEN's cannot interoperate!
97 #
98 # THERE ARE REDUNDANT DEFINITIONS OF THESE VALUES IN config.h.
99 # Don't change anything here without changing it there too.
100
101 NAMEDATALEN= 32
102 # OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid)
103 OIDNAMELEN= 36
104  
105 ##############################################################################
106 #
107 # FEATURES 
108 #
109 # To disable a feature, comment out the entire definition
110 # (that is, prepend '#', don't set it to "0" or "no").
111
112 # Compile libpq++
113 @HAVECXX@
114
115 # Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
116 # multi-byte types to generate a bus error.
117 ENFORCE_ALIGNMENT= true
118
119 # Comment out PROFILE to generate a profile version of the binaries
120 #PROFILE= -p -non_shared
121
122 # If you plan to use Kerberos for authentication...
123 #
124 # Comment out KRBVERS if you do not use Kerberos.
125 # Set KRBVERS to "4" for Kerberos v4, "5" for Kerberos v5.
126 # XXX Edit the default Kerberos variables below!
127 #
128 #KRBVERS= 5
129
130 # Globally pass Kerberos file locations.
131 # these are used in the postmaster and all libpq applications.
132 #
133 # Adjust KRBINCS and KRBLIBS to reflect where you have Kerberos
134 # include files and libraries installed.
135 # PG_KRB_SRVNAM is the name under which POSTGRES is registered in
136 # the Kerberos database (KDC).
137 # PG_KRB_SRVTAB is the location of the server's keytab file.
138 #
139 ifdef KRBVERS
140 KRBINCS= -I/usr/athena/include
141 KRBLIBS= -L/usr/athena/lib
142 KRBFLAGS+= $(KRBINCS) -DPG_KRB_SRVNAM='"postgres_dbms"'
143    ifeq ($(KRBVERS), 4)
144 KRBFLAGS+= -DKRB4
145 KRBFLAGS+= -DPG_KRB_SRVTAB='"/etc/srvtab"'
146 KRBLIBS+= -lkrb -ldes
147    else
148    ifeq ($(KRBVERS), 5)
149 KRBFLAGS+= -DKRB5
150 KRBFLAGS+= -DPG_KRB_SRVTAB='"FILE:/krb5/srvtab.postgres"'
151 KRBLIBS+= -lkrb5 -lcrypto -lcom_err -lisode
152    endif
153    endif
154 endif
155
156 #
157 # location of Tcl/Tk headers and libraries
158 #
159 # Uncomment this to build the tcl utilities.
160 USE_TCL= @USE_TCL@
161 # customize these to your site's needs
162 #
163 TCL_INCDIR= /usr/local/include
164 TCL_LIBDIR= /usr/local/lib
165 TCL_LIB= -ltcl8.0
166 TK_INCDIR= /usr/local/include
167 TK_LIBDIR= /usr/local/lib
168 TK_LIB= -ltk8.0
169
170 USE_PERL= @USE_PERL@
171
172 X11_INCDIR= /usr/include
173 X11_LIBDIR= /usr/lib
174 X11_LIB= -lX11 @SOCKET_LIB@ @NSL_LIB@
175
176
177 ##############################################################################
178 #
179 # Installation. 
180 #
181 # For many ports, INSTALL is overridden below.
182 INSTALL= @INSTALL@
183 RANLIB= @RANLIB@
184
185 INSTLOPTS= @INSTLOPTS@
186 INSTL_EXE_OPTS= @INSTL_EXE_OPTS@
187 INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
188
189 ##############################################################################
190 #
191 # For building shell scripts:
192
193 # For many ports, these are overridden below.
194
195 # DASH_N is what we put before the text on an echo command when we don't
196 # want a trailing newline.  BACKSLASH_C is what we put at the end of the
197 # string on a echo command when we don't want a trailing newline.  On
198 # some systems, you do echo -n "no newline after this", while on others
199 # you do echo "no newline after this\c".
200
201 DASH_N= @DASH_N@
202 BACKSLASH_C= @BACKSLASH_C@ 
203
204
205
206 #-------------------------------------------------------------
207 # See the subdirectory template for default settings for these
208 #-------------------------------------------------------------
209 CC= @CC@
210 YFLAGS= @YFLAGS@
211 YACC= @YACC@
212 LEX= @LEX@
213 AROPT= @AROPT@
214 CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@ 
215 CFLAGS_SL= @SHARED_LIB@
216 LDFLAGS= @LDFLAGS@ @LIBS@
217 DLSUFFIX= @DLSUFFIX@
218
219 include $(SRCDIR)/Makefile.port
220
221 ##############################################################################
222 #
223 # Customization.
224 #
225 # This includes your local customizations if Makefile.custom exists
226 # in the source directory.  This file doesn't exist in the original
227 # distribution so that it doesn't get overwritten when you upgrade.
228 ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
229 include $(SRCDIR)/Makefile.custom
230 endif
231
232 # This goes here so that customization in Makefile.custom is effective
233 ##############################################################################
234
235 ifneq ($(CUSTOM_INSTALL),)
236 INSTALL= $(CUSTOM_INSTALL)
237 endif
238
239 #
240 # Flags for CC and LD. 
241
242 ##############################################################################
243 # COPT
244 #
245 # COPT is for options that the sophisticated builder might want to vary 
246 # from one build to the next, like options to build Postgres with debugging
247 # information included.  COPT is meant to be set on the make command line, 
248 # for example with the command "make COPT=-g".  The value you see set here
249 # is the default that gets used if the builder does not give a value for
250 # COPT on his make command.
251 #
252 # There is a nonobvious relationship between -O (optimization) and 
253 # -Werror (consider all warnings fatal).  On some systems, if you don't
254 # optimize, you will always get some warnings because the system header
255 # files will include some unreferenced functions in the code.  These are
256 # functions that are supposed to be inline, so there wouldn't ordinarily
257 # be an "unreferenced" problem, but if you don't enable optimization, no
258 # inlining can happen, and hence the problem.  Therefore, we include 
259 # if you override -O, you override -Werror as well.
260 #
261 # CUSTOM_COPT is something the user may set in Makefile.custom
262
263 # Common values for COPT are: -g for debuggable binaries, -m486 if you are
264 # using a i486 or better.
265
266 ifneq ($(CUSTOM_CC),)
267   CC= $(CUSTOM_CC)
268 endif
269
270 ifneq ($(CUSTOM_COPT),)
271   COPT= $(CUSTOM_COPT)
272 endif
273
274 ifeq ($(CC), gcc)
275 CFLAGS+= -Wall -Wmissing-prototypes
276 endif
277
278 ifdef COPT
279    CFLAGS+= $(COPT)
280 endif
281
282 ifdef PROFILE
283    CFLAGS+= $(PROFILE)
284 endif