]> granicus.if.org Git - postgresql/blob - src/Makefile.global.in
I really hope that I haven't missed anything in this one...
[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.44 1998/07/24 03:31:04 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 BSD_SHLIB if you're not using one of the BSD ports.  But if you
48 # are, and it's one that doesn't have shared libraries (NetBSD/vax is an
49 # example of this), set BSD_SHLIB to null in Makefile.custom.
50 BSD_SHLIB= true
51
52 LIBPQDIR:= $(SRCDIR)/interfaces/libpq
53
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.
57 POSTGRESDIR= @prefix@
58
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
62
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
66 # command line.
67 LIBDIR= $(POSTGRESDIR)/lib
68
69 # This is the directory where IPC utilities ipcs and ipcrm are located
70 #
71 IPCS=@ipcs@
72 IPCRM=@ipcrm@ 
73
74 # Where the man pages (suitable for use with "man") get installed.
75 POSTMANDIR= $(POSTGRESDIR)/man
76
77 # Where the formatted documents (e.g., the reference manual) get installed.
78 POSTDOCDIR= $(POSTGRESDIR)/doc
79
80 # Where the header files necessary to build frontend programs get installed.
81 HEADERDIR= $(POSTGRESDIR)/include
82
83 ##############################################################################
84 #
85 # FEATURES 
86 #
87 # To disable a feature, comment out the entire definition
88 # (that is, prepend '#', don't set it to "0" or "no").
89
90 # Compile libpq++
91 @HAVECXX@
92
93 # Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
94 # multi-byte types to generate a bus error.
95 ENFORCE_ALIGNMENT= true
96
97 # Comment out PROFILE to generate a profile version of the binaries
98 #PROFILE= -p -non_shared
99
100 # If you plan to use Kerberos for authentication...
101 #
102 # Comment out KRBVERS if you do not use Kerberos.
103 # Set KRBVERS to "4" for Kerberos v4, "5" for Kerberos v5.
104 # XXX Edit the default Kerberos variables below!
105 #
106 #KRBVERS= 5
107
108 # Globally pass Kerberos file locations.
109 # these are used in the postmaster and all libpq applications.
110 #
111 # Adjust KRBINCS and KRBLIBS to reflect where you have Kerberos
112 # include files and libraries installed.
113 # PG_KRB_SRVNAM is the name under which POSTGRES is registered in
114 # the Kerberos database (KDC).
115 # PG_KRB_SRVTAB is the location of the server's keytab file.
116 #
117 ifdef KRBVERS
118 KRBINCS= -I/usr/athena/include
119 KRBLIBS= -L/usr/athena/lib
120 KRBFLAGS+= $(KRBINCS) -DPG_KRB_SRVNAM='"postgres_dbms"'
121    ifeq ($(KRBVERS), 4)
122 KRBFLAGS+= -DKRB4
123 KRBFLAGS+= -DPG_KRB_SRVTAB='"/etc/srvtab"'
124 KRBLIBS+= -lkrb -ldes
125    else
126    ifeq ($(KRBVERS), 5)
127 KRBFLAGS+= -DKRB5
128 KRBFLAGS+= -DPG_KRB_SRVTAB='"FILE:/krb5/srvtab.postgres"'
129 KRBLIBS+= -lkrb5 -lcrypto -lcom_err -lisode
130    endif
131    endif
132 endif
133
134 #
135 # location of Tcl/Tk headers and libraries
136 #
137 # Uncomment this to build the tcl utilities.
138 USE_TCL= @USE_TCL@
139 # customize these to your site's needs
140 #
141 TCL_LIB= @TCL_LIB@
142 TK_LIB= @TK_LIB@
143
144 USE_PERL= @USE_PERL@
145
146 X_CFLAGS= @X_CFLAGS@
147 X_LIBS= @X_LIBS@
148 X11_LIBS= -lX11 @X_EXTRA_LIBS@
149
150 #
151 # enable multi-byte support
152 # choose one of:
153 # EUC_JP,EUC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5
154 MB=@MB@
155
156 ##############################################################################
157 #
158 # Installation. 
159 #
160 # For many ports, INSTALL is overridden below.
161 INSTALL= @INSTALL@
162 RANLIB= @RANLIB@
163
164 INSTLOPTS= @INSTLOPTS@
165 INSTL_EXE_OPTS= @INSTL_EXE_OPTS@
166 INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
167 INSTL_SHLIB_OPTS= @INSTL_SHLIB_OPTS@
168
169 ##############################################################################
170 #
171 # For building shell scripts:
172
173 # For many ports, these are overridden below.
174
175 # DASH_N is what we put before the text on an echo command when we don't
176 # want a trailing newline.  BACKSLASH_C is what we put at the end of the
177 # string on a echo command when we don't want a trailing newline.  On
178 # some systems, you do echo -n "no newline after this", while on others
179 # you do echo "no newline after this\c".
180
181 DASH_N= @DASH_N@
182 BACKSLASH_C= @BACKSLASH_C@ 
183
184
185
186 #-------------------------------------------------------------
187 # See the subdirectory template for default settings for these
188 #-------------------------------------------------------------
189 CC= @CC@
190 YFLAGS= @YFLAGS@
191 YACC= @YACC@
192 LEX= @LEX@
193 AROPT= @AROPT@
194 CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@ 
195 CFLAGS_SL= @SHARED_LIB@
196 LDFLAGS= @LDFLAGS@ @LIBS@
197 DLSUFFIX= @DLSUFFIX@
198
199 include $(SRCDIR)/Makefile.port
200
201 ##############################################################################
202 #
203 # Customization.
204 #
205 # This includes your local customizations if Makefile.custom exists
206 # in the source directory.  This file doesn't exist in the original
207 # distribution so that it doesn't get overwritten when you upgrade.
208 ifneq ($(wildcard $(SRCDIR)/Makefile.custom), )
209 include $(SRCDIR)/Makefile.custom
210 endif
211
212 # This goes here so that customization in Makefile.custom is effective
213 ##############################################################################
214
215 ifneq ($(CUSTOM_INSTALL),)
216 INSTALL= $(CUSTOM_INSTALL)
217 endif
218
219 #
220 # Flags for CC and LD. 
221
222 ##############################################################################
223 # COPT
224 #
225 # COPT is for options that the sophisticated builder might want to vary 
226 # from one build to the next, like options to build Postgres with debugging
227 # information included.  COPT is meant to be set on the make command line, 
228 # for example with the command "make COPT=-g".  The value you see set here
229 # is the default that gets used if the builder does not give a value for
230 # COPT on his make command.
231 #
232 # There is a nonobvious relationship between -O (optimization) and 
233 # -Werror (consider all warnings fatal).  On some systems, if you don't
234 # optimize, you will always get some warnings because the system header
235 # files will include some unreferenced functions in the code.  These are
236 # functions that are supposed to be inline, so there wouldn't ordinarily
237 # be an "unreferenced" problem, but if you don't enable optimization, no
238 # inlining can happen, and hence the problem.  Therefore, we include 
239 # if you override -O, you override -Werror as well.
240 #
241 # CUSTOM_COPT is something the user may set in Makefile.custom
242
243 # Common values for COPT are: -g for debuggable binaries, -m486 if you are
244 # using a i486 or better.
245
246 ifneq ($(CUSTOM_CC),)
247   CC= $(CUSTOM_CC)
248 endif
249
250 ifneq ($(CUSTOM_COPT),)
251   COPT= $(CUSTOM_COPT)
252 endif
253
254 ifeq ($(CC), gcc)
255 CFLAGS+= -Wall -Wmissing-prototypes
256 endif
257
258 ifdef COPT
259    CFLAGS+= $(COPT)
260    LDFLAGS+= $(COPT)
261 endif
262
263 ifdef PROFILE
264    CFLAGS+= $(PROFILE)
265    LDFLAGS+= $(PROFILE)
266 endif