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