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