# # 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 # # 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 GEN_ROOT=$(ROOT)/gen SRC_ROOT=$(ROOT)/src BLD_ROOT=$(ROOT)/builds LNG_ROOT=$(ROOT)/lang_helpers EXA_ROOT=$(ROOT)/examples FIREBIRD=$(GEN_ROOT)/firebird INTERBASE=$(FIREBIRD) export INTERBASE export FIREBIRD LIB=$(FIREBIRD)/lib BIN=$(FIREBIRD)/bin # 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) 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@ #____________________________________________________________________________ IsProdTypeBuild = @PROD_BUILD_FLG@ # If this is defined then we are building a production # release with debug and optimization FirebirdInstallPrefix = @prefix@ CpuType=@CPU_TYPE@ PLATFORM=@PLATFORM@ ifeq (@FIREBIRD_ARCH_TYPE@,classic) ArchPrefix=CS else ArchPrefix=SS endif # link with readline libraries - set by configure EDITLINE_FLG=@EDITLINE_FLG@ # 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 AR= ar crsu LN= @LN_S@ RANLIB= @RANLIB@ BTYACC=$(ROOT)/extern/btyacc/btyacc CC = @CC@ CXX = @CXX@ LD = @CXX@ # # LIBTOOL ISSUES # # Most of the libraries and programs are linked using the dynamic linker # We default to using the dynamic linker and have a special link macros for # using the static linker. # # Also libtool looks like the future in cross platform shared object compile # and linking, but unfortunately it does not yet work for us, as a # libtool gcc -o $(BIN)/fred fred.o libzzz.la # command will generate incorrect relative addresses in the wrapper script in # $(BIN)/fred as it required the exe file fred to be in the directory from # which the command is run from. # One other issue is that libtool puts a -DPIC onto the compile line. While # nice it conflicts with a struct in the file qli/format.h # MOD 26-July-2001. # LINKER COMMANDS # they are candidates to go to make.defaults and make this file make.defaults.in # if we decide to support different linkers directly in our build process. # Alternatively we may use libtool here. LIB_LINK= @CC@ STATICLIB_LINK= ar cruvs EXE_LINK = @CXX@ STATICEXE_LINK = @CXX@ LINK_LIBS = @LIBS@ @EDITLINE_A@ ICU_LIBS = -licuuc -licudata -licui18n STATICLINK_LIBS = @LIBS@ @EDITLINE_A@ SO_LINK_LIBS = @LIBS@ # Default extensions ARCH_EXT= .a EXEC_EXT= @EXEEXT@ SHRLIB_EXT=@SHRLIB_EXT@ LIB_PREFIX= lib #_____________________________________________________________________________ # 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 JRD_BOOT= $(LIB)/jrd_boot.a BLRTABLE = $(BIN)/blrtable$(EXEC_EXT) # The shared library name for the embedded (or classic) library # 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} 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 ClientLibraryName = $(LIB_PREFIX)fbclient.$(SHRLIB_EXT) ClientLibraryNameMajor = $(ClientLibraryName).${MajorVer} ClientLibraryNameFull = $(ClientLibraryName).${FirebirdVersion} LIBFBCLIENT_SO = $(LIB)/$(ClientLibraryNameFull) LIBFBCLIENT_SOBASENAME=$(LIB)/$(ClientLibraryNameMajor) 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 LIBFBINTL_SO = $(FIREBIRD)/intl/$(LIB_PREFIX)fbintl.$(SHRLIB_EXT) LIBFBSTATIC_A = $(LIB)/libfbstatic.a LIBEDITLINE_A = $(LIB)/libeditline.a LIBICU_SO = $(LIB)/$(LIB_PREFIX)icuuc.$(SHRLIB_EXT) \ $(LIB)/$(LIB_PREFIX)icudata.$(SHRLIB_EXT) \ $(LIB)/$(LIB_PREFIX)icui18n.$(SHRLIB_EXT) # Shared library name for usage inside of the UDF IbUtilLibraryName = $(LIB_PREFIX)ib_util.$(SHRLIB_EXT) LIBIBUTIL_SO = $(LIB)/$(IbUtilLibraryName) # LINKER OPTIONS # LINK_OPTS = $(LDFLAGS) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/intl LIB_LINK_OPTIONS = $(LDFLAGS) -shared LIB_LINK_RPATH = -Wl,-rpath, LIB_LINK_SONAME = -Wl,-soname, LIB_LINK_MAPFILE= -Wl,--version-script, LINK_FIREBIRD_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.vers LINK_FBINTL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.vers FB_SUPER_SERVER = $(BIN)/fbserver$(EXEC_EXT) FB_CLASSIC_SERVER = $(BIN)/fb_inet_server$(EXEC_EXT) # From utilities CREATE_DB = $(BIN)/create_db$(EXEC_EXT) GDS_DROP = $(BIN)/gds_drop$(EXEC_EXT) GSTAT = $(BIN)/gstat$(EXEC_EXT) NBACKUP = $(BIN)/nbackup$(EXEC_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) 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) 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) 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