|
| 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/interfaces/odbc/Attic/Makefile.global.in,v 1.1 1998/10/06 05:57:56 thomas Exp $ |
| 11 | +# |
| 12 | +# NOTES |
| 13 | +# This is derived from the main Postgres makefile. |
| 14 | +# |
| 15 | +# When running standalone: |
| 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 | +# For convenience, POSTGRESDIR is where BINDIR, and LIBDIR |
| 58 | +# and other target destinations are rooted. Of course, each of these is |
| 59 | +# changable separately. |
| 60 | + |
| 61 | +POSTGRESDIR=@prefix@ |
| 62 | + |
| 63 | +# Where the postgres executables live (changeable by just putting them |
| 64 | +# somewhere else and putting that directory in your shell PATH) |
| 65 | +BINDIR= $(POSTGRESDIR)/bin |
| 66 | + |
| 67 | +# Where libpsqlodbc.a gets installed. You must put it where your loader will |
| 68 | +# look for it if you wish to use the -lpq convention. Otherwise you |
| 69 | +# can just put the absolute pathname to the library at the end of your |
| 70 | +# command line. |
| 71 | + |
| 72 | +LIBDIR= $(POSTGRESDIR)/lib |
| 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 | +# Where the odbcinst.ini file will be placed |
| 84 | + |
| 85 | +ODBCINST= $(POSTGRESDIR)@ODBCINSTDIR@ |
| 86 | + |
| 87 | +############################################################################## |
| 88 | +# |
| 89 | +# FEATURES |
| 90 | +# |
| 91 | +# To disable a feature, comment out the entire definition |
| 92 | +# (that is, prepend '#', don't set it to "0" or "no"). |
| 93 | + |
| 94 | +############################################################################## |
| 95 | +# |
| 96 | +# Installation. |
| 97 | +# |
| 98 | +# For many ports, INSTALL is overridden below. |
| 99 | +INSTALL= @INSTALL@ |
| 100 | +RANLIB= @RANLIB@ |
| 101 | + |
| 102 | +INSTLOPTS= @INSTLOPTS@ |
| 103 | +INSTL_EXE_OPTS= @INSTL_EXE_OPTS@ |
| 104 | +INSTL_LIB_OPTS= @INSTL_LIB_OPTS@ |
| 105 | + |
| 106 | +############################################################################## |
| 107 | +# |
| 108 | +# For building shell scripts: |
| 109 | +# |
| 110 | +# For many ports, these are overridden below. |
| 111 | + |
| 112 | +# DASH_N is what we put before the text on an echo command when we don't |
| 113 | +# want a trailing newline. BACKSLASH_C is what we put at the end of the |
| 114 | +# string on a echo command when we don't want a trailing newline. On |
| 115 | +# some systems, you do echo -n "no newline after this", while on others |
| 116 | +# you do echo "no newline after this\c". |
| 117 | + |
| 118 | +DASH_N= @DASH_N@ |
| 119 | +BACKSLASH_C= @BACKSLASH_C@ |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | +#------------------------------------------------------------- |
| 124 | +# See the subdirectory template for default settings for these |
| 125 | +#------------------------------------------------------------- |
| 126 | +CC= @CC@ |
| 127 | +AROPT= @AROPT@ |
| 128 | +CFLAGS= -I$(ODBCSRCDIR) @CPPFLAGS@ @CFLAGS@ |
| 129 | +CFLAGS_SL= @SHARED_LIB@ |
| 130 | +LDFLAGS= @LDFLAGS@ @LIBS@ |
| 131 | +DLSUFFIX= @DLSUFFIX@ |
| 132 | +LN_S = @LN_S@ |
| 133 | + |
| 134 | +############################################################################## |
| 135 | +# |
| 136 | +# Customization. |
| 137 | +# |
| 138 | +# This includes local customizations. If we're being build from |
| 139 | +# within the Postgres distribution and a Makefile.custom exists |
| 140 | +# in the top level Postgres directory it overrides any local customization |
| 141 | +# that might be in Makefile.custom of the odbc driver directory. These |
| 142 | +# files don't exist in the original |
| 143 | +# distribution so that they don't get overwritten when you upgrade. |
| 144 | + |
| 145 | +ifneq ($(wildcard $(SRCDIR)/Makefile.custom), ) |
| 146 | +include $(SRCDIR)/Makefile.custom |
| 147 | +endif |
| 148 | + |
| 149 | +ifneq ($(wildcard ../../Makefile.custom), ) |
| 150 | +include ../../Makefile.custom |
| 151 | +endif |
| 152 | + |
| 153 | +# This goes here so that customization in Makefile.custom is effective |
| 154 | +############################################################################## |
| 155 | + |
| 156 | +ifneq ($(CUSTOM_INSTALL),) |
| 157 | +INSTALL= $(CUSTOM_INSTALL) |
| 158 | +endif |
| 159 | + |
| 160 | +# |
| 161 | +# Flags for CC and LD. |
| 162 | + |
| 163 | +############################################################################## |
| 164 | +# COPT |
| 165 | +# |
| 166 | +# COPT is for options that the sophisticated builder might want to vary |
| 167 | +# from one build to the next, like options to build Postgres with debugging |
| 168 | +# information included. COPT is meant to be set on the make command line, |
| 169 | +# for example with the command "make COPT=-g". The value you see set here |
| 170 | +# is the default that gets used if the builder does not give a value for |
| 171 | +# COPT on his make command. |
| 172 | +# |
| 173 | +# There is a nonobvious relationship between -O (optimization) and |
| 174 | +# -Werror (consider all warnings fatal). On some systems, if you don't |
| 175 | +# optimize, you will always get some warnings because the system header |
| 176 | +# files will include some unreferenced functions in the code. These are |
| 177 | +# functions that are supposed to be inline, so there wouldn't ordinarily |
| 178 | +# be an "unreferenced" problem, but if you don't enable optimization, no |
| 179 | +# inlining can happen, and hence the problem. Therefore, we include |
| 180 | +# if you override -O, you override -Werror as well. |
| 181 | +# |
| 182 | +# CUSTOM_COPT is something the user may set in Makefile.custom |
| 183 | + |
| 184 | +# Common values for COPT are: -g for debuggable binaries, -m486 if you are |
| 185 | +# using a i486 or better. |
| 186 | + |
| 187 | +ifneq ($(CUSTOM_CC),) |
| 188 | + CC= $(CUSTOM_CC) |
| 189 | +endif |
| 190 | + |
| 191 | +ifneq ($(CUSTOM_COPT),) |
| 192 | + COPT= $(CUSTOM_COPT) |
| 193 | +endif |
| 194 | + |
| 195 | +ifeq ($(CC), gcc) |
| 196 | +CFLAGS+= -Wall -Wmissing-prototypes |
| 197 | +endif |
| 198 | + |
| 199 | +ifdef COPT |
| 200 | + CFLAGS+= $(COPT) |
| 201 | +endif |
0 commit comments