2
# The contents of this file are subject to the Mozilla Public
3
# License Version 1.1 (the "License"); you may not use this file
4
# except in compliance with the License. You may obtain a copy of
5
# the License at http://www.mozilla.org/MPL/
6
# Alternatively, the contents of this file may be used under the
7
# terms of the GNU General Public License Version 2 or later (the
8
# "GPL"), in which case the provisions of the GPL are applicable
9
# instead of those above. You may obtain a copy of the Licence at
10
# http://www.gnu.org/copyleft/gpl.html
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# Relevant for more details.
17
# This file was created by members of the firebird development team.
18
# All individual contributions remain the Copyright (C) of those
19
# individuals. Contributors to this file are either listed here or
20
# can be obtained from a CVS history command.
22
# All rights reserved.
24
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
32
#_____________________________________________________________________________
36
# This file contains default values that are used by the build process do not
37
# change these here, but override them in the platform specific file
38
# prefix.xxx where xxx is the platform name using the form SH := bash
39
# see the readme file with the Makefile.in files for more details.
41
#_____________________________________________________________________________
46
BLD_ROOT=$(ROOT)/builds
47
LNG_ROOT=$(ROOT)/lang_helpers
48
EXA_ROOT=$(ROOT)/examples
50
FIREBIRD=$(GEN_ROOT)/firebird
59
# This picks up the current directory and maps it to the equivalent module
60
# in the src and gen area.
62
RealSrcRootPath = $(shell cd $(SRC_ROOT); pwd)
64
#ModuleName:=$(notdir $(CURDIR))
65
ModuleName:=$(subst $(RealSrcRootPath)/,,$(CURDIR))
67
OBJ=$(TMP_ROOT)/$(ObjModuleType)
71
# This one is not so widely used at the momement.
72
# but I would like it to become so.
74
RealFirebirdPath = @NEW_FIREBIRD_DIR@
76
#____________________________________________________________________________
77
# From here we may set some global options to both compiler and linker.
80
# Possible use - profiling.
82
FB_CFLAGS:= $(FB_CFLAGS) $(GLOB_OPTIONS)
84
#____________________________________________________________________________
86
IsProdTypeBuild = @PROD_BUILD_FLG@
87
# If this is defined then we are building a production
88
# release with debug and optimization
91
ifeq ($(PLATFORM),DARWIN)
92
FirebirdInstallPrefix =
94
FirebirdInstallPrefix = @prefix@
99
ifeq (@FIREBIRD_ARCH_TYPE@,classic)
105
SFIO_EXAMPLES=@SFIO_EXAMPLES@
108
# link with readline libraries - set by configure
109
EDITLINE_FLG=@EDITLINE_FLG@
110
STD_EDITLINE=@STD_EDITLINE@
114
# Default programs and tools to be used in the build process
122
CHMOD_S7= chmod 06777
133
BTYACC=$(ROOT)/extern/btyacc/btyacc
142
# Most of the libraries and programs are linked using the dynamic linker
143
# We default to using the dynamic linker and have a special link macros for
144
# using the static linker.
146
# Also libtool looks like the future in cross platform shared object compile
147
# and linking, but unfortunately it does not yet work for us, as a
148
# libtool gcc -o $(BIN)/fred fred.o libzzz.la
149
# command will generate incorrect relative addresses in the wrapper script in
150
# $(BIN)/fred as it required the exe file fred to be in the directory from
151
# which the command is run from.
152
# One other issue is that libtool puts a -DPIC onto the compile line. While
153
# nice it conflicts with a struct in the file qli/format.h
157
# Alternatively we may use libtool here.
159
LIB_LINK:= @CXX@ $(GLOB_OPTIONS)
160
STATICLIB_LINK:= ar cruvs
161
CLIENTLIB_LINK:= @CC@ $(GLOB_OPTIONS)
162
EXE_LINK:= @CXX@ $(GLOB_OPTIONS)
163
STATICEXE_LINK:= @CXX@ $(GLOB_OPTIONS)
166
ICU_LIBS = -licuuc -licudata -licui18n
167
STATICLINK_LIBS = @LIBS@
168
SO_LINK_LIBS = @LIBS@
174
SHRLIB_EXT=@SHRLIB_EXT@
177
#_____________________________________________________________________________
179
# Include file with version variable definitions
181
-include $(ROOT)/gen/Make.Version
183
# Add windows dll to library patterns
185
.LIBPATTERNS += %.dll lib%.dll
187
# Search path for libraries
193
#_____________________________________________________________________________
198
JRD_BOOT= $(LIB)/jrd_boot.a
199
BLRTABLE = $(BIN)/blrtable$(EXEC_EXT)
202
# The shared library name for the embedded (or classic) library
203
# SD: This name is also hard-coded in builds/install/.../linux/classic scripts.
204
# Scold me, but I don't want library names to be in configure.in
207
SharedLibraryName=libfbembed.${SHRLIB_EXT}.${FirebirdVersion}
208
SharedLibrarySoName=libfbembed.${SHRLIB_EXT}.${MajorVer}.${MinorVer}
209
SharedLibraryBaseName=libfbembed.${SHRLIB_EXT}
211
LIBFBEMBED_SO = $(LIB)/$(SharedLibraryName)
212
LIBFBEMBED_SOBASENAME = $(LIB)/$(SharedLibrarySoName)
213
LIBFBEMBED_SONAME = $(LIB)/$(SharedLibraryBaseName)
215
# Shared library names for client side of fbserver (or super) version
216
# used to link all the utilities to enable them to connect over the wire
217
# to the fbserver. MOD 28-July-2002
219
ClientLibraryName = $(LIB_PREFIX)fbclient.$(SHRLIB_EXT)
220
ClientLibraryNameMajor = $(ClientLibraryName).2
221
ClientLibraryNameFull = $(ClientLibraryName).${FirebirdVersion}
223
LIBFBCLIENT_SO = $(LIB)/$(ClientLibraryNameFull)
224
LIBFBCLIENT_SOBASENAME=$(LIB)/$(ClientLibraryNameMajor)
225
LIBFBCLIENT_SONAME=$(LIB)/$(ClientLibraryName)
227
# intl will load dynamically, and having the whole soname set with version
228
# confuses the dynamic load process. So we only have the .$(SHRLIB_EXT) file
231
LIBFBINTL_SO = $(FIREBIRD)/intl/$(LIB_PREFIX)fbintl.$(SHRLIB_EXT)
233
LIBFBSTATIC_A = $(LIB)/libfbstatic.a
235
ifeq ($(EDITLINE_FLG),Y)
236
ifeq ($(STD_EDITLINE), true)
237
LIBEDITLINE := -l$(READLINE)
239
LIBEDITLINE := $(LIB)/libedit.a
243
LIBICU_SO = $(LIB)/$(LIB_PREFIX)icuuc.$(SHRLIB_EXT) \
244
$(LIB)/$(LIB_PREFIX)icudata.$(SHRLIB_EXT) \
245
$(LIB)/$(LIB_PREFIX)icui18n.$(SHRLIB_EXT)
247
# Shared library name for usage inside of the UDF
248
IbUtilLibraryName = $(LIB_PREFIX)ib_util.$(SHRLIB_EXT)
249
LIBIBUTIL_SO = $(LIB)/$(IbUtilLibraryName)
254
UNDEF_PLATFORM = -Wl,--no-undefined
255
ifneq ($(IsProdTypeBuild),Y)
256
UNDEF_FLAGS = $(UNDEF_PLATFORM)
258
LINK_OPTS = $(LDFLAGS) $(UNDEF_FLAGS) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/intl
259
LIB_LINK_OPTIONS = $(LDFLAGS) $(UNDEF_FLAGS) -shared
261
LIB_LINK_RPATH = -Wl,-rpath,
262
LIB_LINK_SONAME = -Wl,-soname,
263
LIB_LINK_MAPFILE= -Wl,--version-script,
264
FBEMBED_LINK= -L$(LIB) -lfbembed
266
LINK_FIREBIRD_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.vers
267
LINK_FBINTL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.vers
269
FB_SUPER_SERVER = $(BIN)/fbserver$(EXEC_EXT)
270
FB_CLASSIC_SERVER = $(BIN)/fb_inet_server$(EXEC_EXT)
272
STATIC_CXXSUPPORT_LIB = -lsupc++ -lgcc_eh
275
CREATE_DB = $(BIN)/create_db$(EXEC_EXT)
276
GDS_DROP = $(BIN)/gds_drop$(EXEC_EXT)
277
FBSVCMGR = $(BIN)/fbsvcmgr$(EXEC_EXT)
278
GSTAT = $(BIN)/gstat$(EXEC_EXT)
279
NBACKUP = $(BIN)/nbackup$(EXEC_EXT)
280
LOCKPRINT = $(BIN)/fb_lock_print$(EXEC_EXT)
281
GSEC = $(BIN)/gsec$(EXEC_EXT)
282
GFIX = $(BIN)/gfix$(EXEC_EXT)
283
GFIX_STATIC = $(BIN)/gfix_static$(EXEC_EXT)
284
GDS_REBUILD = $(BIN)/gds_rebuild$(EXEC_EXT)
285
GDS_RELAY = $(BIN)/gds_relay$(EXEC_EXT)
286
GDS_INSTALL = $(BIN)/gds_install$(EXEC_EXT)
287
GDS_INSTALL = $(BIN)/gds_install_service$(EXEC_EXT)
288
FBGUARD = $(BIN)/fbguard$(EXEC_EXT)
289
IBGUARD = $(BIN)/ibguard$(EXEC_EXT)
290
FBMGR_BIN = $(BIN)/fbmgr.bin$(EXEC_EXT)
291
INSTREG = $(BIN)/instreg$(EXEC_EXT)
292
INSTSVC = $(BIN)/instsvc$(EXEC_EXT)
293
ISC_GDB = $(FIREBIRD)/security2.fdb
294
ISC_GBAK = $(BIN)/security.gbak
297
QLI = $(BIN)/qli$(EXEC_EXT)
300
ISQL = $(BIN)/isql$(EXEC_EXT)
301
ISQL_STATIC = $(BIN)/isql_static$(EXEC_EXT)
302
MUISQL = $(BIN)/muisql$(EXEC_EXT)
305
GBAK_STATIC = $(BIN)/gbak_static$(EXEC_EXT)
306
GBAK = $(BIN)/gbak$(EXEC_EXT)
307
GSPLIT = $(BIN)/gsplit$(EXEC_EXT)
310
# (gpre current is a link to one of the others)
311
GPRE_BOOT = $(BIN)/gpre_boot$(EXEC_EXT)
312
GPRE_STATIC = $(BIN)/gpre_static$(EXEC_EXT)
313
GPRE = $(BIN)/gpre$(EXEC_EXT)
314
GPRE_CURRENT = $(BIN)/gpre_current$(EXEC_EXT)
318
CHECK_MESSAGES = $(BIN)/check_messages$(EXEC_EXT)
319
BUILD_FILE = $(BIN)/build_file$(EXEC_EXT)
320
FIREBIRD_MSG = $(FIREBIRD)/firebird.msg
322
ENTER_MESSAGES = $(BIN)/enter_messages$(EXEC_EXT)
323
MODIFY_MESSAGES = $(BIN)/modify_messages$(EXEC_EXT)
324
CHANGE_MESSAGES = $(BIN)/change_messages$(EXEC_EXT)
326
fr_FR_MSG = $(FIREBIRD)/fr_FR.msg
327
de_DE_MSG = $(FIREBIRD)/de_DE.msg
328
ja_JP_MSG = $(FIREBIRD)/ja_JP.msg
331
GDEF = $(BIN)/gdef$(EXEC_EXT)
334
#For want of a better suggestion we may as well default to posix
335
PLATFORM_PATH = os/posix