8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00
firebird-mirror/builds/posix/make.defaults

363 lines
11 KiB
Plaintext
Raw Normal View History

#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
# Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. You may obtain a copy of the Licence at
# http://www.gnu.org/copyleft/gpl.html
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Relevant for more details.
#
# This file was created by members of the firebird development team.
# All individual contributions remain the Copyright (C) of those
# individuals. Contributors to this file are either listed here or
# can be obtained from a CVS history command.
#
# All rights reserved.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
#
#_____________________________________________________________________________
# This file contains default values that are used by the build process do not
# change these here, but override them in the platform specific file
# prefix.xxx where xxx is the platform name using the form SH := bash
# see the readme file with the Makefile.in files for more details.
#_____________________________________________________________________________
TMP_ROOT=$(ROOT)/temp
2003-03-27 12:21:47 +01:00
GEN_ROOT=$(ROOT)/gen
SRC_ROOT=$(ROOT)/src
2003-07-09 02:46:55 +02:00
BLD_ROOT=$(ROOT)/builds
2003-07-11 04:28:45 +02:00
LNG_ROOT=$(ROOT)/lang_helpers
EXA_ROOT=$(ROOT)/examples
2003-03-27 12:21:47 +01:00
FIREBIRD=$(GEN_ROOT)/firebird
INTERBASE=$(FIREBIRD)
export INTERBASE
export FIREBIRD
LIB=$(FIREBIRD)/lib
BIN=$(FIREBIRD)/bin
2009-02-03 13:03:25 +01:00
PLUGINS=$(FIREBIRD)/plugins
2003-03-27 12:21:47 +01:00
# This picks up the current directory and maps it to the equivalent module
# in the src and gen area.
RealSrcRootPath = $(shell cd $(SRC_ROOT); pwd)
#ModuleName:=$(notdir $(CURDIR))
ModuleName:=$(subst $(RealSrcRootPath)/,,$(CURDIR))
OBJ=$(TMP_ROOT)/$(ObjModuleType)
2003-03-27 12:21:47 +01:00
GEN_SRC=$(OBJ)
# This one is not so widely used at the momement.
# but I would like it to become so.
RealFirebirdPath = @NEW_FIREBIRD_DIR@
#____________________________________________________________________________
# From here we may set some global options to both compiler and linker.
# Use configure's CFLAGS as global options for all compilers and linkers
GLOB_OPTIONS=@CFLAGS@
# Possible use - profiling.
#GLOB_OPTIONS+= -pg
CFLAGS:= $(CFLAGS) $(GLOB_OPTIONS)
2005-12-28 07:58:28 +01:00
#____________________________________________________________________________
IsProdTypeBuild = @PROD_BUILD_FLG@
# If this is defined then we are building a production
# release with debug and optimization
2009-01-28 15:54:00 +01:00
FirebirdInstallPrefix = @prefix@
CpuType=@CPU_TYPE@
2003-02-19 06:14:36 +01:00
PLATFORM=@PLATFORM@
ifeq (@FIREBIRD_ARCH_TYPE@,classic)
ArchPrefix=CS
else
ArchPrefix=SS
endif
2008-09-02 16:22:42 +02:00
SFIO_EXAMPLES=@SFIO_EXAMPLES@
2008-09-04 13:48:41 +02:00
# link with readline libraries - set by configure
EDITLINE_FLG=@EDITLINE_FLG@
STD_EDITLINE=@STD_EDITLINE@
STD_ICU=@STD_ICU@
# threading options - set by configure
THR_FLAGS=@PTHREAD_CFLAGS@
THR_LIBS=@PTHREAD_LIBS@
2009-05-07 16:49:40 +02:00
# thread local storage options - set by configure
TLS_OPTIONS=@TLS_OPTIONS@
# Default programs and tools to be used in the build process
SH= sh -c
RM= rm -f
RM_R= rm -rf
CHMOD= chmod
CHMOD_6= chmod 666
CHMOD_7= chmod 777
CHMOD_S7= chmod 06777
MV= mv -f
TOUCH= touch
CP= cp
ECHO= echo
QUIET_ECHO= @echo
CD= cd
CAT= cat
2009-05-07 16:49:40 +02:00
AR= ar @AR_OPTIONS@ crsu
LN= @LN_S@
RANLIB= @RANLIB@
BTYACC=$(ROOT)/extern/btyacc/btyacc
2006-07-04 06:05:06 +02:00
CC = @CC@
CXX = @CXX@
LD = @CXX@
# LINKER COMMANDS
LIB_LINK:= @CXX@ $(GLOB_OPTIONS)
STATICLIB_LINK:= ar cruvs
CLIENTLIB_LINK:= @CC@ $(GLOB_OPTIONS)
EXE_LINK:= @CXX@ $(GLOB_OPTIONS)
STATICEXE_LINK:= @CXX@ $(GLOB_OPTIONS)
2006-07-04 06:05:06 +02:00
LINK_LIBS = @LIBS@ $(THR_LIBS)
2006-07-04 06:05:06 +02:00
ICU_LIBS = -licuuc -licudata -licui18n
STATICLINK_LIBS = @LIBS@ $(THR_LIBS)
SO_LINK_LIBS = @LIBS@ $(THR_LIBS)
2006-07-04 06:05:06 +02:00
# Default extensions
ARCH_EXT= .a
2002-12-06 15:30:40 +01:00
EXEC_EXT= @EXEEXT@
SHRLIB_EXT=@SHRLIB_EXT@
2005-06-10 12:32:51 +02:00
LIB_PREFIX= lib
2008-12-05 14:53:53 +01:00
SHRLIB_FOREIGN_EXT= $(SHRLIB_EXT)
2003-03-27 12:21:47 +01:00
#_____________________________________________________________________________
# Include file with version variable definitions
-include $(ROOT)/gen/Make.Version
# Add windows dll to library patterns
.LIBPATTERNS += %.dll lib%.dll
# Search path for libraries
vpath %.so $(LIB)
vpath %.a $(LIB)
vpath %.dll $(LIB)
#_____________________________________________________________________________
# From jrd
BLRTABLE = $(BIN)/blrtable$(EXEC_EXT)
# The shared library name for the embedded (or classic) library
2003-07-09 02:46:55 +02:00
# SD: This name is also hard-coded in builds/install/.../linux/classic scripts.
# Scold me, but I don't want library names to be in configure.in
#
SharedLibraryName=libfbembed.${SHRLIB_EXT}.${FirebirdVersion}
SharedLibrarySoName=libfbembed.${SHRLIB_EXT}.${MajorVer}.${MinorVer}
SharedLibraryBaseName=libfbembed.${SHRLIB_EXT}
LIBFBEMBED_SO = $(LIB)/$(SharedLibraryName)
LIBFBEMBED_SOBASENAME = $(LIB)/$(SharedLibrarySoName)
LIBFBEMBED_SONAME = $(LIB)/$(SharedLibraryBaseName)
# Shared library names for client side of fbserver (or super) version
# used to link all the utilities to enable them to connect over the wire
# to the fbserver. MOD 28-July-2002
2005-06-10 12:32:51 +02:00
ClientLibraryName = $(LIB_PREFIX)fbclient.$(SHRLIB_EXT)
ClientLibrarySoName = $(ClientLibraryName).${MajorVer}
2003-09-01 16:22:50 +02:00
ClientLibraryNameFull = $(ClientLibraryName).${FirebirdVersion}
LIBFBCLIENT_SO = $(LIB)/$(ClientLibraryNameFull)
LIBFBCLIENT_SOBASENAME=$(LIB)/$(ClientLibrarySoName)
LIBFBCLIENT_SONAME=$(LIB)/$(ClientLibraryName)
# intl will load dynamically, and having the whole soname set with version
# confuses the dynamic load process. So we only have the .$(SHRLIB_EXT) file
# MOD 28-July-2002
2005-06-10 12:32:51 +02:00
LIBFBINTL_SO = $(FIREBIRD)/intl/$(LIB_PREFIX)fbintl.$(SHRLIB_EXT)
LIBFBSTATIC_A = $(LIB)/libfbstatic.a
ifeq ($(EDITLINE_FLG),Y)
ifeq ($(STD_EDITLINE), true)
LIBEDITLINE := -leditline
else
LIBEDITLINE := $(LIB)/libeditline.a
endif
endif
2008-12-10 16:15:25 +01:00
LIBICU_SO = $(LIB)/$(LIB_PREFIX)icuuc*.$(SHRLIB_FOREIGN_EXT) \
$(LIB)/$(LIB_PREFIX)icudata*.$(SHRLIB_FOREIGN_EXT) \
$(LIB)/$(LIB_PREFIX)icui18n*.$(SHRLIB_FOREIGN_EXT)
2003-05-25 02:04:54 +02:00
# Shared library name for usage inside of the UDF
2005-06-10 12:32:51 +02:00
IbUtilLibraryName = $(LIB_PREFIX)ib_util.$(SHRLIB_EXT)
2003-05-25 02:04:54 +02:00
LIBIBUTIL_SO = $(LIB)/$(IbUtilLibraryName)
# LINKER OPTIONS
#
UNDEF_PLATFORM = -Wl,--no-undefined
ifneq ($(IsProdTypeBuild),Y)
UNDEF_FLAGS = $(UNDEF_PLATFORM)
endif
LINK_FIREBIRD_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.vers
LINK_FIREBIRD_EMBED_SYMBOLS = $(LINK_FIREBIRD_SYMBOLS)
LINK_FIREBIRD_CLIENT_SYMBOLS = $(LINK_FIREBIRD_SYMBOLS)
2009-02-04 12:43:19 +01:00
LINK_TRACE_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbtrace.vers
LINK_FBINTL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.vers
LINK_IBUTIL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/ib_util.vers
LIB_PLATFORM_RPATH = -Wl,-rpath,$(1)
2009-04-22 17:49:28 +02:00
ifeq ($(strip @BINRELOC_CFLAGS@),)
LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(FirebirdInstallPrefix)/$(1))
else
LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$$$ORIGIN/../$(1)')
endif
LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl)
LIB_LINK_SONAME= -Wl,-soname,$(1)
2004-05-20 11:55:36 +02:00
LIB_LINK_MAPFILE= -Wl,--version-script,
FBEMBED_LINK= -L$(LIB) -lfbembed
2004-05-20 11:55:36 +02:00
LINK_OPTS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS)
LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -shared
FB_SUPER_SERVER = $(BIN)/fbserver$(EXEC_EXT)
FB_CLASSIC_SERVER = $(BIN)/fb_inet_server$(EXEC_EXT)
FB_DAEMON = $(BIN)/fb_smp_server$(EXEC_EXT)
2009-02-19 22:17:17 +01:00
STATIC_CXXSUPPORT_LIB=@STATIC_CXXSUPPORT_LIB@
LIB_LINK_IMPLIB =
LIB_GUI =
# Per-library link rules
LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_EXT))\
$(call LIB_LINK_RPATH,lib) -lm
LINK_UDF_LIBS = $(THR_LIBS) -L$(LIB) -lib_util
LINK_IB_UTIL = $(LIB_LINK) $(LINK_IBUTIL_SYMBOLS) $(LIB_LINK_OPTIONS)\
$(call LIB_LINK_SONAME,$(IbUtilLibraryName)) $(call LIB_LINK_RPATH,lib)
LINK_IB_UTIL_LIBS = $(THR_LIBS)
LINK_INTL = $(LIB_LINK) $(LINK_FBINTL_SYMBOLS) $(LIB_LINK_OPTIONS)\
$(call LIB_LINK_SONAME,libintl.$(SHRLIB_EXT).1) $(call LIB_LINK_RPATH,lib)
LINK_INTL_LIBS = -L$(LIB) $(ICU_LIBS) $(SO_LINK_LIBS)
2009-02-03 13:03:25 +01:00
LINK_TRACE = $(LIB_LINK) $(LINK_TRACE_SYMBOLS) $(LIB_LINK_OPTIONS)\
$(call LIB_LINK_SONAME,$(LIB_PREFIX)fbtrace.$(SHRLIB_EXT).0) $(call LIB_LINK_RPATH,lib)
LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS)
2009-02-03 13:03:25 +01:00
LINK_CLIENT = $(CLIENTLIB_LINK) $(LINK_FIREBIRD_CLIENT_SYMBOLS) $(LIB_LINK_OPTIONS)\
$(LIB_LINK_IMPLIB) $(call LIB_LINK_SONAME,$(ClientLibrarySoName)) $(call LIB_LINK_RPATH,lib)
LINK_CLIENT_LIBS = $(SO_LINK_LIBS) $(STATIC_CXXSUPPORT_LIB)
LINK_EMBED = $(LIB_LINK) $(LINK_FIREBIRD_EMBED_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_EMBED_LINK_OPTIONS)\
$(call LIB_LINK_SONAME,$(SharedLibrarySoName)) $(call LIB_LINK_RPATH,lib)
LINK_EMBED_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(ICU_LIBS)
# From utilities
CREATE_DB = $(BIN)/create_db$(EXEC_EXT)
GDS_DROP = $(BIN)/gds_drop$(EXEC_EXT)
FBSVCMGR = $(BIN)/fbsvcmgr$(EXEC_EXT)
2009-06-25 03:17:43 +02:00
FBTRACEMGR = $(BIN)/fbtracemgr$(EXEC_EXT)
GSTAT = $(BIN)/gstat$(EXEC_EXT)
NBACKUP = $(BIN)/nbackup$(EXEC_EXT)
2009-02-03 13:03:25 +01:00
FBTRACE = $(PLUGINS)/$(LIB_PREFIX)fbtrace.$(SHRLIB_EXT)
LOCKPRINT = $(BIN)/fb_lock_print$(EXEC_EXT)
GSEC = $(BIN)/gsec$(EXEC_EXT)
GFIX = $(BIN)/gfix$(EXEC_EXT)
GDS_REBUILD = $(BIN)/gds_rebuild$(EXEC_EXT)
GDS_RELAY = $(BIN)/gds_relay$(EXEC_EXT)
GDS_INSTALL = $(BIN)/gds_install$(EXEC_EXT)
GDS_INSTALL = $(BIN)/gds_install_service$(EXEC_EXT)
FBGUARD = $(BIN)/fbguard$(EXEC_EXT)
IBGUARD = $(BIN)/ibguard$(EXEC_EXT)
FBMGR_BIN = $(BIN)/fbmgr.bin$(EXEC_EXT)
INSTREG = $(BIN)/instreg$(EXEC_EXT)
INSTSVC = $(BIN)/instsvc$(EXEC_EXT)
2005-02-24 13:24:38 +01:00
ISC_GDB = $(FIREBIRD)/security2.fdb
ISC_GBAK = $(BIN)/security.gbak
# From qli
QLI = $(BIN)/qli$(EXEC_EXT)
# From isql
ISQL = $(BIN)/isql$(EXEC_EXT)
ISQL_STATIC = $(BIN)/isql_static$(EXEC_EXT)
MUISQL = $(BIN)/muisql$(EXEC_EXT)
# From burp
GBAK_STATIC = $(BIN)/gbak_static$(EXEC_EXT)
GBAK = $(BIN)/gbak$(EXEC_EXT)
2003-11-05 17:53:37 +01:00
GSPLIT = $(BIN)/gsplit$(EXEC_EXT)
# From gpre
# (gpre current is a link to one of the others)
GPRE_BOOT = $(BIN)/gpre_boot$(EXEC_EXT)
GPRE_STATIC = $(BIN)/gpre_static$(EXEC_EXT)
GPRE = $(BIN)/gpre$(EXEC_EXT)
GPRE_CURRENT = $(BIN)/gpre_current$(EXEC_EXT)
# From msgs
CHECK_MESSAGES = $(BIN)/check_messages$(EXEC_EXT)
BUILD_FILE = $(BIN)/build_file$(EXEC_EXT)
2003-07-08 12:45:47 +02:00
FIREBIRD_MSG = $(FIREBIRD)/firebird.msg
ENTER_MESSAGES = $(BIN)/enter_messages$(EXEC_EXT)
MODIFY_MESSAGES = $(BIN)/modify_messages$(EXEC_EXT)
CHANGE_MESSAGES = $(BIN)/change_messages$(EXEC_EXT)
fr_FR_MSG = $(FIREBIRD)/fr_FR.msg
de_DE_MSG = $(FIREBIRD)/de_DE.msg
ja_JP_MSG = $(FIREBIRD)/ja_JP.msg
# From gdef
GDEF = $(BIN)/gdef$(EXEC_EXT)
#Platform Manager
#For want of a better suggestion we may as well default to posix
PLATFORM_PATH = os/posix
2009-03-01 16:42:23 +01:00
TRACE_OS_Sources =