2010-10-12 10:02:57 +02:00
|
|
|
#
|
|
|
|
# PROGRAM: Firebird single makefile
|
|
|
|
# MODULE: Makefile.in
|
|
|
|
# DESCRIPTION: Posix build main file
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
# You may obtain a copy of the Licence at
|
|
|
|
# http://www.gnu.org/licences/lgpl.html
|
2017-09-06 18:32:12 +02:00
|
|
|
#
|
2010-10-12 10:02:57 +02:00
|
|
|
# As a special exception this file can also be included in modules
|
2017-09-06 18:32:12 +02:00
|
|
|
# with other source code as long as that source code has been
|
|
|
|
# released under an Open Source Initiative certificed licence.
|
|
|
|
# More information about OSI certification can be found at:
|
|
|
|
# http://www.opensource.org
|
|
|
|
#
|
2010-10-12 10:02:57 +02:00
|
|
|
# This module 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
|
|
|
|
# GNU Lesser General Public Licence for more details.
|
2017-09-06 18:32:12 +02:00
|
|
|
#
|
|
|
|
# This module was created by members of the firebird development
|
|
|
|
# team. All individual contributions remain the Copyright (C) of
|
|
|
|
# those individuals and all rights are reserved. Contributors to
|
|
|
|
# this file are either listed below or can be obtained from a SVN
|
2010-10-12 10:02:57 +02:00
|
|
|
# history command.
|
|
|
|
#
|
|
|
|
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
# Alex Peshkoff - created single makefile based on Mark's files
|
2017-09-06 18:32:12 +02:00
|
|
|
#
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2010-11-23 10:43:58 +01:00
|
|
|
ROOT=$(shell cd ..; pwd)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2018-02-07 18:16:57 +01:00
|
|
|
ifeq ($(CROSS_OUT), Y)
|
|
|
|
export CROSS:=CrossBuild
|
|
|
|
endif
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
include make.defaults
|
2018-02-07 18:16:57 +01:00
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
ifeq ($(CROSS_OUT), Y)
|
|
|
|
include make.crossPlatform
|
|
|
|
else
|
2010-10-12 10:02:57 +02:00
|
|
|
include make.platform
|
2012-06-22 13:39:24 +02:00
|
|
|
endif
|
2018-02-07 18:16:57 +01:00
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
include make.rules
|
|
|
|
include make.shared.variables
|
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
ifeq ($(IsDeveloper), Y)
|
|
|
|
DefaultTarget := Debug
|
|
|
|
else
|
|
|
|
DefaultTarget := Release
|
|
|
|
endif
|
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
ifeq ($(IsCross), Y)
|
|
|
|
Process := cross_process
|
|
|
|
else
|
|
|
|
Process := master_process
|
|
|
|
endif
|
|
|
|
|
2016-05-25 14:14:01 +02:00
|
|
|
ifeq ($(LSB_FLG),Y)
|
|
|
|
GCC=/opt/lsb/bin/lsbcc
|
2016-05-30 16:50:02 +02:00
|
|
|
export CC
|
|
|
|
export CXX
|
2016-05-25 14:14:01 +02:00
|
|
|
else
|
|
|
|
GCC=gcc
|
|
|
|
endif
|
|
|
|
|
2019-06-14 10:03:41 +02:00
|
|
|
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
|
|
|
TOM2TOM_FLAGS=-I../libtommath
|
|
|
|
endif
|
|
|
|
|
2016-11-11 15:59:55 +01:00
|
|
|
.PHONY: master_process cross_process firebird Debug Release external
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
all: firebird
|
|
|
|
|
|
|
|
firebird:
|
2012-06-22 13:39:24 +02:00
|
|
|
$(MAKE) TARGET=$(DefaultTarget) $(Process)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
Release:
|
2012-06-22 13:39:24 +02:00
|
|
|
$(MAKE) TARGET=Release $(Process)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
Debug:
|
2012-06-22 13:39:24 +02:00
|
|
|
$(MAKE) TARGET=Debug $(Process)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# jrd/build_no.h contains the version and build# fields used throughout the
|
|
|
|
# program and quoted in the tools. This routine will update the build_no.h
|
|
|
|
# file with the auto update build# script file, writeBuildNum.sh. The
|
2015-03-28 16:02:42 +01:00
|
|
|
# writeBuildNum.sh script is autoupdated by SVN checkins.
|
2010-10-12 10:02:57 +02:00
|
|
|
#
|
|
|
|
|
2015-04-07 05:19:51 +02:00
|
|
|
.PHONY: updateCloopInterfaces updateBuildNum
|
|
|
|
|
2015-12-21 18:01:26 +01:00
|
|
|
IDL_ROOT=$(SRC_ROOT)/include/firebird
|
|
|
|
IDL_FILE=$(IDL_ROOT)/FirebirdInterface.idl
|
|
|
|
API_H_FILE=$(IDL_ROOT)/IdlFbInterfaces.h
|
|
|
|
API_PAS_FILE=$(SRC_ROOT)/include/gen/Firebird.pas
|
|
|
|
PAS_ROOT=$(SRC_ROOT)/misc/pascal
|
|
|
|
PASCAL_SOURCES=$(wildcard $(PAS_ROOT)/*)
|
|
|
|
TMP_FUNCS=$(TMP_ROOT)/func.pas
|
2019-06-03 16:45:00 +02:00
|
|
|
XPB_CONSTS=$(SRC_ROOT)/include/firebird/impl/consts_pub.h
|
2015-12-21 18:01:26 +01:00
|
|
|
ERR_CONSTS=$(ROOT)/lang_helpers/gds_codes.pas
|
|
|
|
|
|
|
|
updateCloopInterfaces : $(API_H_FILE) $(API_PAS_FILE)
|
|
|
|
|
|
|
|
$(API_H_FILE): $(IDL_FILE)
|
2015-04-07 05:19:51 +02:00
|
|
|
$(CLOOP) $< c++ $@ IDL_FB_INTERFACES_H Firebird I
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2015-12-21 18:01:26 +01:00
|
|
|
$(TMP_FUNCS): $(PASCAL_SOURCES) $(XPB_CONSTS) $(ERR_CONSTS)
|
|
|
|
cat $(PAS_ROOT)/fb_get_master_interface.pas >$(TMP_FUNCS)
|
|
|
|
awk -f $(PAS_ROOT)/Pascal.Constants.awk <$(XPB_CONSTS) >>$(TMP_FUNCS)
|
|
|
|
grep '[[:space:]]isc_' $(ERR_CONSTS) >>$(TMP_FUNCS)
|
|
|
|
|
|
|
|
$(API_PAS_FILE): $(IDL_FILE) $(PASCAL_SOURCES) $(TMP_FUNCS)
|
|
|
|
$(CLOOP) $(IDL_FILE) pascal $@ Firebird --uses SysUtils \
|
|
|
|
--interfaceFile $(PAS_ROOT)/Pascal.interface.pas \
|
|
|
|
--implementationFile $(PAS_ROOT)/Pascal.implementation.pas \
|
|
|
|
--exceptionClass FbException \
|
|
|
|
--functionsFile $(TMP_FUNCS) \
|
|
|
|
--prefix I
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
updateBuildNum : $(SRC_ROOT)/jrd/build_no.h $(GEN_ROOT)/Make.Version
|
|
|
|
|
|
|
|
$(SRC_ROOT)/jrd/build_no.h : $(SRC_ROOT)/misc/writeBuildNum.sh
|
2010-11-23 10:43:58 +01:00
|
|
|
(cd $(ROOT); ./src/misc/writeBuildNum.sh rebuildHeader)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
$(GEN_ROOT)/Make.Version : $(SRC_ROOT)/misc/writeBuildNum.sh
|
|
|
|
$(SRC_ROOT)/misc/writeBuildNum.sh createMakeVersion $@
|
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# build external software
|
|
|
|
#
|
|
|
|
|
2016-11-11 15:59:55 +01:00
|
|
|
external:
|
2016-05-30 16:50:02 +02:00
|
|
|
$(MAKE) -C $(ROOT)/extern/btyacc
|
|
|
|
$(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop
|
2015-04-07 05:19:51 +02:00
|
|
|
|
2016-11-11 15:59:55 +01:00
|
|
|
$(MAKE) -C $(ROOT)/extern/decNumber
|
|
|
|
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(LIB)
|
|
|
|
|
2019-08-13 18:22:18 +02:00
|
|
|
CXXFLAGS="-O3 -g -fPIC" $(MAKE) -C $(ROOT)/extern/re2
|
|
|
|
ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB)
|
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
2016-05-25 14:14:01 +02:00
|
|
|
CFLAGS="$(CFLAGS)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC=$(GCC)
|
2019-11-28 16:54:50 +01:00
|
|
|
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
install_name_tool -id "@rpath/lib/libtommath.dylib" $(TOMMATH)/.libs/libtommath.0.dylib
|
|
|
|
cp $(TOMMATH)/.libs/libtommath.0.dylib $(LIB)/libtommath.dylib
|
|
|
|
else
|
2016-04-24 17:09:48 +02:00
|
|
|
ln -sf $(TOMMATH_SO).$(TOMMATH_VER) $(LIB)
|
|
|
|
ln -sf $(TOMMATH_SO) $(LIB)
|
|
|
|
endif
|
2019-11-28 16:54:50 +01:00
|
|
|
endif
|
2016-04-24 17:09:48 +02:00
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
ifeq ($(TOMCRYPT_BUILD_FLG),Y)
|
2019-06-14 10:03:41 +02:00
|
|
|
CFLAGS="$(CFLAGS) $(TOM2TOM_FLAGS)" $(MAKE) -C $(ROOT)/extern/libtomcrypt -f makefile.shared GCC=$(GCC)
|
2019-11-28 16:54:50 +01:00
|
|
|
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
install_name_tool -id "@rpath/lib/libtomcrypt.dylib" $(TOMCRYPT)/.libs/libtomcrypt.1.dylib
|
|
|
|
cp $(TOMCRYPT)/.libs/libtomcrypt.1.dylib $(LIB)/libtomcrypt.dylib
|
|
|
|
else
|
2017-09-06 18:32:12 +02:00
|
|
|
ln -sf $(TOMCRYPT_SO).$(TOMCRYPT_VER) $(LIB)
|
|
|
|
ln -sf $(TOMCRYPT_SO) $(LIB)
|
|
|
|
endif
|
2019-11-28 16:54:50 +01:00
|
|
|
endif
|
2017-09-06 18:32:12 +02:00
|
|
|
|
2010-12-01 17:20:22 +01:00
|
|
|
ifeq ($(STD_EDITLINE),false)
|
|
|
|
ifeq ($(EDITLINE_FLG),Y)
|
2016-05-30 16:50:02 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline
|
2010-12-01 17:20:22 +01:00
|
|
|
endif
|
|
|
|
endif
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# create platform-specific export lists (version scripts) in gen
|
|
|
|
#
|
|
|
|
|
2010-11-23 10:43:58 +01:00
|
|
|
%.vers: $(ROOT)/builds/posix/%.vers
|
2010-10-12 10:02:57 +02:00
|
|
|
sh vers.sh $(firstword $@)
|
|
|
|
|
|
|
|
export_lists: $(ALLVERS)
|
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
#___________________________________________________________________________
|
|
|
|
# LibTomMath - used by cross-builds
|
|
|
|
#
|
|
|
|
|
|
|
|
.PHONY: tommath
|
2017-09-06 18:32:12 +02:00
|
|
|
TOMMATH_LIB=$(LIB)/libtommath.a
|
2012-06-22 13:39:24 +02:00
|
|
|
TOM_Objs=$(addprefix ../extern/libtommath/,$(call doObjects,$(call dirFiles,../extern/libtommath)))
|
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
tommath: $(TOMMATH_LIB)
|
|
|
|
|
|
|
|
$(TOMMATH_LIB): $(TOM_Objs)
|
|
|
|
-$(RM) $@
|
|
|
|
$(STATICLIB_LINK) $@ $^
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# LibTomCrypt - used by cross-builds
|
|
|
|
#
|
|
|
|
|
|
|
|
.PHONY: tomcrypt
|
|
|
|
TOMCRYPT_LIB=$(LIB)/libtomcrypt.a
|
2018-02-07 18:16:57 +01:00
|
|
|
|
2018-02-08 18:21:48 +01:00
|
|
|
TOM_Src:=hashes/md5.c hashes/sha1.c hashes/sha2/sha256.c hashes/sha2/sha512.c misc/crypt/crypt_argchk.c
|
|
|
|
TOM_Src:=$(addprefix ../extern/libtomcrypt/src/, $(TOM_Src))
|
2018-02-07 18:16:57 +01:00
|
|
|
|
2018-02-08 18:21:48 +01:00
|
|
|
TOM_Objs=$(call doObjects,$(TOM_Src))
|
2017-09-06 18:32:12 +02:00
|
|
|
|
|
|
|
tomcrypt: $(TOMCRYPT_LIB)
|
2012-06-22 13:39:24 +02:00
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
$(TOMCRYPT_LIB): $(TOM_Objs)
|
2012-06-22 13:39:24 +02:00
|
|
|
-$(RM) $@
|
|
|
|
$(STATICLIB_LINK) $@ $^
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
#___________________________________________________________________________
|
2018-04-11 19:17:28 +02:00
|
|
|
# main build target for both debug and release builds
|
2010-10-12 10:02:57 +02:00
|
|
|
#
|
|
|
|
|
2018-04-11 19:17:28 +02:00
|
|
|
.PHONY: cross1 cross2 boot yvalve engine fbintl gpre utilities plugins rest codes ids examples cross_rest preliminaryCheck
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
master_process:
|
2012-06-22 13:39:24 +02:00
|
|
|
ln -sf $(SRC_ROOT)/include/gen/autoconfig.auto $(SRC_ROOT)/include/gen/autoconfig.h
|
2010-10-12 10:02:57 +02:00
|
|
|
$(MAKE) updateBuildNum
|
|
|
|
$(MAKE) export_lists
|
2016-11-11 15:59:55 +01:00
|
|
|
$(MAKE) external
|
2015-04-07 05:19:51 +02:00
|
|
|
$(MAKE) updateCloopInterfaces
|
2018-04-11 19:17:28 +02:00
|
|
|
$(MAKE) preliminaryCheck
|
2010-10-12 10:02:57 +02:00
|
|
|
$(MAKE) boot
|
|
|
|
$(MAKE) yvalve
|
2013-12-03 11:52:23 +01:00
|
|
|
ifeq ($(IsDeveloper), Y)
|
|
|
|
# In developer mode we must regenerate various files in include/gen
|
|
|
|
$(MAKE) ids
|
|
|
|
endif
|
2010-10-12 10:02:57 +02:00
|
|
|
$(MAKE) engine
|
|
|
|
$(MAKE) fbintl
|
|
|
|
$(MAKE) utilities
|
2011-05-20 18:44:12 +02:00
|
|
|
# Now having ready such useful tools as gbak and isql, we may restore / create
|
|
|
|
# required databases and switch to full-featured gpre
|
2010-10-12 10:02:57 +02:00
|
|
|
$(MAKE) gpre
|
2017-09-06 18:32:12 +02:00
|
|
|
# Pay attention - after build force gpre_current to point to gpre
|
2010-10-12 10:02:57 +02:00
|
|
|
# even if gpre itself was not rebuilt
|
|
|
|
-$(RM) $(GPRE_CURRENT)
|
|
|
|
(cd $(BIN); $(LN) $(notdir $(GPRE)) $(notdir $(GPRE_CURRENT)))
|
|
|
|
ifeq ($(IsDeveloper), Y)
|
2011-05-20 18:44:12 +02:00
|
|
|
# In developer mode we must regenerate various files in include/gen
|
2010-10-12 10:02:57 +02:00
|
|
|
$(MAKE) codes
|
|
|
|
endif
|
|
|
|
$(MAKE) plugins
|
2011-01-14 18:31:40 +01:00
|
|
|
$(MAKE) examples
|
2010-10-12 10:02:57 +02:00
|
|
|
$(MAKE) rest
|
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
|
|
|
|
cross_process:
|
|
|
|
$(MAKE) TARGET=Native cross1
|
|
|
|
$(MAKE) CROSS_OUT=Y cross2
|
|
|
|
|
|
|
|
cross1:
|
|
|
|
ln -sf $(SRC_ROOT)/include/gen/autoconfig.auto $(SRC_ROOT)/include/gen/autoconfig.h
|
|
|
|
$(MAKE) updateBuildNum
|
|
|
|
$(MAKE) export_lists
|
2016-11-11 15:59:55 +01:00
|
|
|
$(MAKE) external
|
2015-04-07 05:19:51 +02:00
|
|
|
$(MAKE) updateCloopInterfaces
|
2012-06-22 13:39:24 +02:00
|
|
|
$(MAKE) boot
|
|
|
|
$(MAKE) yvalve
|
2013-12-03 11:52:23 +01:00
|
|
|
ifeq ($(IsDeveloper), Y)
|
|
|
|
# In developer mode we must regenerate various files in include/gen
|
|
|
|
$(MAKE) ids
|
|
|
|
endif
|
2012-06-22 13:39:24 +02:00
|
|
|
$(MAKE) engine
|
|
|
|
$(MAKE) fbintl
|
|
|
|
$(MAKE) gbak isql gfix
|
|
|
|
# Now having ready such useful tools as gbak and isql, we may restore / create
|
|
|
|
# required databases and switch to full-featured gpre
|
|
|
|
$(MAKE) gpre
|
2017-09-06 18:32:12 +02:00
|
|
|
# Pay attention - after build force gpre_current to point to gpre
|
2012-06-22 13:39:24 +02:00
|
|
|
# even if gpre itself was not rebuilt
|
|
|
|
-$(RM) $(GPRE_CURRENT)
|
|
|
|
(cd $(BIN); $(LN) $(notdir $(RUN_GPRE)) $(notdir $(GPRE_CURRENT)))
|
2015-01-27 11:46:48 +01:00
|
|
|
$(MAKE) include_generic
|
|
|
|
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
|
2012-06-22 13:39:24 +02:00
|
|
|
|
|
|
|
cross2:
|
|
|
|
ln -sf $(SRC_ROOT)/include/cross/$(CROSS_CONFIG) $(SRC_ROOT)/include/gen/autoconfig.h
|
2015-01-27 11:46:48 +01:00
|
|
|
$(MAKE) prerequisites
|
2012-06-22 13:39:24 +02:00
|
|
|
$(MAKE) tommath
|
2017-09-06 18:32:12 +02:00
|
|
|
$(MAKE) tomcrypt
|
2018-02-07 18:16:57 +01:00
|
|
|
$(MAKE) -C $(ROOT)/extern/decNumber
|
|
|
|
ln -sf $(ROOT)/extern/decNumber/libdecFloat$(CROSS).a $(LIB)
|
2012-06-22 13:39:24 +02:00
|
|
|
$(MAKE) yvalve
|
2015-01-27 11:46:48 +01:00
|
|
|
$(MAKE) engine
|
|
|
|
$(MAKE) fbintl
|
|
|
|
$(MAKE) utilities
|
|
|
|
$(MAKE) $(GPRE)
|
|
|
|
$(MAKE) plugins
|
2017-11-03 12:43:17 +01:00
|
|
|
$(MAKE) -f Makefile.plugins_examples
|
2015-01-27 11:46:48 +01:00
|
|
|
$(MAKE) cross_rest
|
2012-06-22 13:39:24 +02:00
|
|
|
|
2018-04-11 19:17:28 +02:00
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# preliminary checks - make sure platform is OK to build FB
|
|
|
|
#
|
|
|
|
|
|
|
|
STD_SIZES:=$(SRC_ROOT)/misc/ods.txt
|
|
|
|
RUN_SIZES:=$(GEN_ROOT)/ods.txt
|
|
|
|
ODS_H:=$(SRC_ROOT)/jrd/ods.h
|
|
|
|
ODS_AWK:=$(SRC_ROOT)/misc/ods.awk
|
|
|
|
ODS_TEST_CPP:=$(GEN_ROOT)/odstest.cpp
|
|
|
|
ODS_TEST:=$(GEN_ROOT)/odstest$(EXEC_EXT)
|
|
|
|
|
|
|
|
preliminaryCheck: $(STD_SIZES) $(RUN_SIZES)
|
|
|
|
diff -u $^
|
|
|
|
|
|
|
|
$(RUN_SIZES): $(ODS_H) $(ODS_AWK)
|
2018-04-12 15:28:13 +02:00
|
|
|
awk -f $(ODS_AWK) <$(ODS_H) >$(ODS_TEST_CPP)
|
2018-04-11 19:17:28 +02:00
|
|
|
$(CXX) -o $(ODS_TEST) $(WCXXFLAGS) $(ODS_TEST_CPP)
|
|
|
|
$(ODS_TEST) >$(RUN_SIZES)
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
#___________________________________________________________________________
|
|
|
|
# static library - various common code, used in different FB projects
|
|
|
|
#
|
|
|
|
|
|
|
|
$(COMMON_LIB): $(Common_Objects)
|
|
|
|
-$(RM) $@
|
|
|
|
$(STATICLIB_LINK) $@ $^
|
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# gpre_boot
|
|
|
|
#
|
|
|
|
|
2010-12-04 23:15:03 +01:00
|
|
|
boot: $(GPRE_BOOT)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
$(GPRE_BOOT): $(GPRE_Boot_Objects) $(COMMON_LIB)
|
2011-12-27 09:14:58 +01:00
|
|
|
$(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(LINK_LIBS)
|
2010-10-12 10:02:57 +02:00
|
|
|
-$(RM) $(GPRE_CURRENT)
|
|
|
|
(cd $(@D); $(LN) $(@F) $(notdir $(GPRE_CURRENT)))
|
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# yValve
|
|
|
|
#
|
|
|
|
|
|
|
|
yvalve: $(LIBFIREBIRD_BASENAME)
|
|
|
|
|
|
|
|
ifneq ($(LibraryBaseName),$(LibrarySoName))
|
|
|
|
$(LIBFIREBIRD_BASENAME): $(LIBFIREBIRD_SONAME)
|
|
|
|
(cd $(LIB) && $(LN) -f $(LibrarySoName) $(LibraryBaseName) )
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(LibrarySoName),$(LibraryFullName))
|
|
|
|
$(LIBFIREBIRD_SONAME): $(LIBFIREBIRD_FULLNAME)
|
|
|
|
(cd $(LIB) && $(LN) -f $(LibraryFullName) $(LibrarySoName) )
|
|
|
|
endif
|
|
|
|
|
|
|
|
# remote redirector is statically linked in main FB library
|
|
|
|
$(LIBFIREBIRD_FULLNAME): $(YValve_Objects) $(Remote_Client_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_FIREBIRD) -o $@ $^ $(LINK_FIREBIRD_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,lib/libfbclient.$(SHRLIB_EXT))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# core part - jrd's engine
|
|
|
|
#
|
|
|
|
|
|
|
|
engine: $(ENGINE_SONAME)
|
|
|
|
|
|
|
|
$(ENGINE_SONAME): $(Engine_Objects) $(SVC_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_ENGINE) -o $@ $^ $(LINK_ENGINE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/$(EngineSoName))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# intl support
|
|
|
|
#
|
|
|
|
|
|
|
|
fbintl: $(LIBFBINTL_SO)
|
|
|
|
|
|
|
|
$(LIBFBINTL_SO): $(INTL_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_INTL) -o $@ $^ $(LINK_INTL_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,intl/libfbintl.$(SHRLIB_EXT))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# full gpre
|
|
|
|
# when switching to it we also build databases needed later
|
|
|
|
#
|
|
|
|
|
2011-01-14 18:31:40 +01:00
|
|
|
.PHONY: databases
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-14 18:31:40 +01:00
|
|
|
gpre: $(GPRE) databases
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
$(GPRE): $(GPRE_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
HELP_FDB = $(FIREBIRD)/help/help.fdb
|
2016-03-06 09:32:18 +01:00
|
|
|
SECURITY_FDB = $(FIREBIRD)/security4.fdb
|
2011-01-17 18:38:25 +01:00
|
|
|
SECURITY_TMP = security.tmp
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
databases: yachts.lnk msg.timestamp $(HELP_FDB) $(SECURITY_FDB)
|
|
|
|
|
2011-02-24 15:06:39 +01:00
|
|
|
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(FIREBIRD)/lib
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
yachts.lnk: metadata.fdb
|
|
|
|
-$(RM) $@
|
|
|
|
$(LN) $^ $@
|
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
metadata.fdb: $(RUN_ISQL) $(SRC_ROOT)/dbs/metadata.sql
|
2011-10-11 10:20:16 +02:00
|
|
|
-$(RM) $@
|
2012-06-22 13:39:24 +02:00
|
|
|
$(RUN_ISQL) -q -i $(SRC_ROOT)/dbs/metadata.sql
|
|
|
|
$(RUN_GFIX) -mode read_only $@
|
2010-10-12 10:02:57 +02:00
|
|
|
$(CHMOD) 0444 $@
|
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
$(HELP_FDB): help.fdb
|
2010-10-12 10:02:57 +02:00
|
|
|
-$(RM) $@
|
2011-01-17 18:38:25 +01:00
|
|
|
$(CP) $^ $@
|
|
|
|
$(CHMOD) 0444 $@
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
help.fdb: $(BLD_ROOT)/misc/help.gbak
|
2012-06-22 13:39:24 +02:00
|
|
|
$(RUN_GBAK) -MODE read_only -R $< $@
|
2012-03-01 09:37:55 +01:00
|
|
|
$(CHMOD) 0444 $@
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
$(SECURITY_FDB): security.fdb
|
2010-10-12 10:02:57 +02:00
|
|
|
-$(RM) $@
|
2011-01-17 18:38:25 +01:00
|
|
|
$(CP) $^ $@
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
security.fdb: $(SRC_ROOT)/dbs/security.sql
|
2010-10-12 10:02:57 +02:00
|
|
|
-$(RM) $@
|
2011-01-17 18:38:25 +01:00
|
|
|
-$(RM) $(SECURITY_TMP)
|
2012-06-22 13:39:24 +02:00
|
|
|
echo create database \'$(SECURITY_TMP)\'\; | $(RUN_ISQL)
|
|
|
|
$(RUN_GFIX) -write async $(SECURITY_TMP)
|
|
|
|
$(RUN_ISQL) -i $^ $(SECURITY_TMP)
|
2011-01-17 18:38:25 +01:00
|
|
|
$(CHMOD) a=rw $(SECURITY_TMP)
|
|
|
|
$(CP) $(SECURITY_TMP) $@
|
2012-06-22 13:39:24 +02:00
|
|
|
$(RUN_GFIX) -write sync $@
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
msg.timestamp: $(MSG_FILES)
|
|
|
|
-$(RM) msg.fdb
|
2012-06-22 13:39:24 +02:00
|
|
|
echo create database \'msg.fdb\'\; | $(RUN_ISQL)
|
|
|
|
$(RUN_GFIX) -write async msg.fdb
|
|
|
|
for sql in $(MSG_FILES); do (echo $$sql; $(RUN_ISQL) -i $$sql msg.fdb) || exit; done
|
2010-10-12 10:02:57 +02:00
|
|
|
$(TOUCH) $@
|
|
|
|
|
|
|
|
|
2017-11-09 11:15:00 +01:00
|
|
|
.PHONY: ibutil udfsupport
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
udfsupport:
|
|
|
|
$(MAKE) ibutil
|
|
|
|
|
|
|
|
ibutil: $(LIBIBUTIL_SO)
|
|
|
|
|
|
|
|
$(LIBIBUTIL_SO): $(UTIL_Objects)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_IB_UTIL) -o $@ $^ $(LINK_IB_UTIL_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,lib/libib_util.$(SHRLIB_EXT))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
2017-11-09 11:15:00 +01:00
|
|
|
# most of utilities, including network server and UDF support
|
2010-10-12 10:02:57 +02:00
|
|
|
# qli is not here cause it needs special database (help.fdb), therefore needs gbak
|
|
|
|
#
|
|
|
|
|
|
|
|
.PHONY: firebird_server fb_lock_print fbguard fbsvcmgr fbtracemgr gbak gfix gsec gsplit gstat isql nbackup
|
|
|
|
|
2011-01-14 18:31:40 +01:00
|
|
|
utilities: firebird_server fb_lock_print fbguard fbsvcmgr fbtracemgr gbak gfix gsec gsplit gstat isql nbackup udfsupport
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
firebird_server: $(FB_DAEMON)
|
|
|
|
|
|
|
|
$(FB_DAEMON): $(Remote_Server_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
fb_lock_print: $(LOCKPRINT)
|
|
|
|
|
|
|
|
$(LOCKPRINT): $(LOCKPRINT_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
fbguard: $(FBGUARD)
|
|
|
|
|
|
|
|
$(FBGUARD): $(FBGUARD_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
fbsvcmgr: $(FBSVCMGR)
|
|
|
|
|
|
|
|
$(FBSVCMGR): $(FBSVCMGR_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
fbtracemgr: $(FBTRACEMGR)
|
|
|
|
|
|
|
|
$(FBTRACEMGR): $(FBTRACEMGR_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
gbak: $(GBAK)
|
|
|
|
|
|
|
|
$(GBAK): $(GBAK_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
gsplit: $(GSPLIT)
|
|
|
|
|
|
|
|
$(GSPLIT): $(GSPLIT_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
gfix: $(GFIX)
|
|
|
|
|
|
|
|
$(GFIX): $(GFIX_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
gsec: $(GSEC)
|
|
|
|
|
|
|
|
$(GSEC): $(GSEC_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
gstat: $(GSTAT)
|
|
|
|
|
|
|
|
$(GSTAT): $(GSTAT_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
isql: $(ISQL)
|
|
|
|
|
|
|
|
$(ISQL): $(ISQL_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LIBEDITLINE) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
nbackup: $(NBACKUP)
|
|
|
|
|
|
|
|
$(NBACKUP): $(NBACKUP_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# plugins - some of them are required to build examples, use separate entry for them
|
|
|
|
#
|
|
|
|
|
2017-11-09 11:15:00 +01:00
|
|
|
.PHONY: udr legacy_user_management legacy_auth_server trace auth_debug udf_compat
|
2011-01-14 18:31:40 +01:00
|
|
|
UDR_PLUGIN = $(call makePluginName,udr_engine)
|
2011-07-01 09:55:13 +02:00
|
|
|
LEGACY_USER_MANAGER = $(call makePluginName,Legacy_UserManager)
|
2013-10-28 11:27:40 +01:00
|
|
|
LEGACY_AUTH_SERVER = $(call makePluginName,Legacy_Auth)
|
2011-12-23 13:43:58 +01:00
|
|
|
SRP_USER_MANAGER = $(call makePluginName,Srp)
|
2012-05-31 18:53:42 +02:00
|
|
|
FBTRACE = $(call makePluginName,fbtrace)
|
2011-01-14 18:31:40 +01:00
|
|
|
AUTH_DEBUGGER = $(call makePluginName,Auth_Debug)
|
2017-11-09 11:15:00 +01:00
|
|
|
UDF_BACKWARD_COMPATIBILITY_BASENAME = $(LIB_PREFIX)udf_compat.$(SHRLIB_EXT)
|
|
|
|
UDF_BACKWARD_COMPATIBILITY = $(PLUGINS)/udr/$(UDF_BACKWARD_COMPATIBILITY_BASENAME)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-14 18:31:40 +01:00
|
|
|
BUILD_DEBUG:=
|
|
|
|
ifeq ($(TARGET),Debug)
|
|
|
|
BUILD_DEBUG:=auth_debug
|
|
|
|
endif
|
|
|
|
|
2017-11-09 11:15:00 +01:00
|
|
|
plugins: udr legacy_user_management legacy_auth_server srp_user_management trace $(BUILD_DEBUG) udf_compat
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
udr: $(UDR_PLUGIN) $(PLUGINS)/udr_engine.conf
|
|
|
|
|
|
|
|
$(PLUGINS)/udr_engine.conf: $(ROOT)/src/plugins/udr_engine/udr_engine.conf
|
|
|
|
cp $^ $@
|
|
|
|
|
|
|
|
$(UDR_PLUGIN): $(UDRENG_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_UDRENG) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_UDRENG_LIBS) $(FIREBIRD_LIBRARY_LINK)\
|
|
|
|
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libudr_engine.$(SHRLIB_EXT))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
legacy_user_management: $(LEGACY_USER_MANAGER)
|
|
|
|
|
|
|
|
$(LEGACY_USER_MANAGER): $(LEGACY_USERS_MANAGE_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)\
|
|
|
|
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libLegacy_UserManager.$(SHRLIB_EXT))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2013-10-28 11:27:40 +01:00
|
|
|
legacy_auth_server: $(LEGACY_AUTH_SERVER)
|
|
|
|
|
|
|
|
$(LEGACY_AUTH_SERVER): $(LEGACY_AUTH_SERVER_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)\
|
|
|
|
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libLegacy_Auth.$(SHRLIB_EXT))
|
2013-10-28 11:27:40 +01:00
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
trace: $(FBTRACE)
|
|
|
|
|
|
|
|
$(FBTRACE): $(FBTRACE_UTIL_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_TRACE) -o $@ $^ $(FIREBIRD_LIBRARY_LINK) $(LINK_TRACE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libfbtrace.$(SHRLIB_EXT))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-14 18:31:40 +01:00
|
|
|
auth_debug: $(AUTH_DEBUGGER)
|
|
|
|
|
|
|
|
$(AUTH_DEBUGGER): $(AUTH_DEBUGGER_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)\
|
|
|
|
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libAuth_Debug.$(SHRLIB_EXT))
|
2011-01-14 18:31:40 +01:00
|
|
|
|
2011-12-23 13:43:58 +01:00
|
|
|
srp_user_management: $(SRP_USER_MANAGER)
|
|
|
|
|
|
|
|
$(SRP_USER_MANAGER): $(SRP_USERS_MANAGE_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)\
|
|
|
|
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libSrp.$(SHRLIB_EXT))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2017-11-09 11:15:00 +01:00
|
|
|
udf_compat: $(UDF_BACKWARD_COMPATIBILITY) $(COMPAT_SQL)
|
|
|
|
|
|
|
|
$(UDF_BACKWARD_COMPATIBILITY): $(COMPAT_Objects)
|
|
|
|
$(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(UDF_BACKWARD_COMPATIBILITY_BASENAME)) \
|
2018-02-08 18:21:48 +01:00
|
|
|
$(LINK_UDR_PLUGIN_SYMBOLS) $(LIB_PATH_OPTS) $(UNDEF_FLAGS) -o $@ $^ $(THR_LIBS) $(UDR_SUPPORT_LIBS)
|
2017-11-09 11:15:00 +01:00
|
|
|
|
|
|
|
$(COMPAT_SQL): $(SRC_COMPAT_SQL)
|
|
|
|
cp $^ $@
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
#___________________________________________________________________________
|
|
|
|
# codes - developers change them sometimes
|
|
|
|
#
|
|
|
|
|
|
|
|
.PHONY: gen_codes
|
|
|
|
CODES = $(BIN)/codes$(EXEC_EXT)
|
|
|
|
IDS = $(SRC_ROOT)/include/gen/ids.h
|
|
|
|
|
2013-12-03 11:52:23 +01:00
|
|
|
codes: gen_codes
|
|
|
|
|
|
|
|
ids: $(IDS)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
gen_codes: $(CODES) msg.timestamp
|
|
|
|
$(CODES) $(SRC_ROOT)/include/gen $(LNG_ROOT)
|
|
|
|
|
|
|
|
$(CODES): $(CODES_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
$(IDS): $(SRC_ROOT)/misc/ids.m $(SRC_ROOT)/jrd/relations.h
|
|
|
|
m4 $< > $@
|
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# all the rest we need to build
|
|
|
|
#
|
|
|
|
|
2015-01-27 11:46:48 +01:00
|
|
|
.PHONY: qli message_file gbak_files
|
|
|
|
|
|
|
|
FDB_FILES := $(HELP_FDB) $(ROOT)/gen/msg.fdb $(SECURITY_FDB) $(FIREBIRD)/examples/empbuild/employee.fdb
|
|
|
|
GBAK_FILES := $(FDB_FILES:.fdb=.gbak) $(FIREBIRD)/msg.gbak
|
|
|
|
GBAK_FILES := $(subst Native,$(TARGET),$(GBAK_FILES))
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2011-01-14 18:31:40 +01:00
|
|
|
rest: qli message_file
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2015-01-27 11:46:48 +01:00
|
|
|
cross_rest: qli gbak_files
|
|
|
|
$(MAKE) $(BUILD_FILE)
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
qli: $(QLI)
|
|
|
|
|
|
|
|
$(QLI): $(QLI_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2010-10-25 17:48:35 +02:00
|
|
|
examples: include_generic
|
2010-10-12 10:02:57 +02:00
|
|
|
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
|
2017-11-03 12:43:17 +01:00
|
|
|
$(MAKE) -f Makefile.plugins_examples
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
message_file: $(FIREBIRD_MSG)
|
|
|
|
|
2015-01-27 11:46:48 +01:00
|
|
|
$(FIREBIRD_MSG): $(BUILD_FILE) msg.timestamp
|
|
|
|
$(BUILD_FILE) -d msg.fdb -f $@
|
2010-10-12 10:02:57 +02:00
|
|
|
$(CHMOD_6) $@
|
|
|
|
|
|
|
|
$(BUILD_FILE): $(BUILD_Objects) $(COMMON_LIB)
|
2019-11-28 16:54:50 +01:00
|
|
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $(LSB_UNDEF) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
2015-01-27 11:46:48 +01:00
|
|
|
gbak_files: $(GBAK_FILES)
|
|
|
|
|
|
|
|
$(GEN_ROOT)/$(TARGET)/firebird/msg.gbak: $(ROOT)/gen/msg.gbak
|
|
|
|
cp $^ $@
|
2012-05-31 18:53:42 +02:00
|
|
|
|
2010-10-25 17:48:35 +02:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
2010-10-27 02:32:58 +02:00
|
|
|
# This target builds the include files for distribution with the release
|
2010-10-25 17:48:35 +02:00
|
|
|
# Some of the files differ from the ones used internally to compile the
|
|
|
|
# software - mainly they are just flattened out to make the view simpler
|
|
|
|
# from an external point of view.
|
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
INCLUDE_DEST= $(FB_BUILD)/include
|
2010-10-25 17:48:35 +02:00
|
|
|
|
2015-05-03 20:36:30 +02:00
|
|
|
NEW_INCLUDES_SRC = $(shell find $(SRC_ROOT)/include/firebird -type f)
|
|
|
|
NEW_INCLUDES_DEST = $(patsubst $(SRC_ROOT)/include/firebird/%, $(INCLUDE_DEST)/firebird/%, $(NEW_INCLUDES_SRC))
|
|
|
|
|
2010-10-25 17:48:35 +02:00
|
|
|
include_generic: $(INCLUDE_DEST)/ib_util.h \
|
2015-05-03 20:36:30 +02:00
|
|
|
$(NEW_INCLUDES_DEST)
|
2010-10-25 17:48:35 +02:00
|
|
|
|
|
|
|
# ib_util.h actually is a marker for a number of headers
|
|
|
|
|
2010-10-27 02:32:58 +02:00
|
|
|
# Copy all the other headers to the distribution directory. We use
|
2010-10-25 17:48:35 +02:00
|
|
|
# ib_util.h as the marker for all the files.
|
|
|
|
|
|
|
|
OtherDistribHeaders = extlib/ib_util.h \
|
2010-10-27 02:32:58 +02:00
|
|
|
yvalve/perf.h \
|
2019-06-03 16:45:00 +02:00
|
|
|
include/gen/iberror.h \
|
|
|
|
include/ibase.h
|
2010-10-25 17:48:35 +02:00
|
|
|
|
|
|
|
SRC_OtherDistribHeaders = $(addprefix $(SRC_ROOT)/, $(OtherDistribHeaders))
|
|
|
|
|
|
|
|
$(INCLUDE_DEST)/ib_util.h : $(SRC_OtherDistribHeaders)
|
|
|
|
mkdir -p $(INCLUDE_DEST)
|
|
|
|
$(CP) $^ $(INCLUDE_DEST)/
|
|
|
|
|
2015-05-03 20:36:30 +02:00
|
|
|
$(INCLUDE_DEST)/firebird/%: $(SRC_ROOT)/include/firebird/%
|
|
|
|
mkdir -p $(@D)
|
|
|
|
$(CP) $< $@
|
|
|
|
|
2010-10-25 17:48:35 +02:00
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
#___________________________________________________________________________
|
|
|
|
# track dependencies
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(ROOT)/gen/make.shared.targets
|
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
Dependencies = $(AllObjects:.o=.d)
|
2010-10-12 10:02:57 +02:00
|
|
|
-include $(Dependencies)
|
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# create binary packages
|
|
|
|
#
|
|
|
|
|
2011-10-06 11:31:22 +02:00
|
|
|
.PHONY: install silent_install install-embedded package packages dist
|
2017-09-06 18:32:12 +02:00
|
|
|
|
2011-10-06 11:31:22 +02:00
|
|
|
install install-embedded silent_install package packages dist:
|
2011-01-17 18:38:25 +01:00
|
|
|
$(MAKE) -f Makefile.install $@
|
|
|
|
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
#___________________________________________________________________________
|
|
|
|
# various cleaning
|
|
|
|
#
|
|
|
|
.PHONY: clean clean_objects clean_dependancies clean_extern_objects clean_build \
|
|
|
|
clean_gpre_gen clean_icu clean_dbs clean_examples clean_makefiles \
|
2019-01-23 15:09:10 +01:00
|
|
|
clean_editline clean_all clean_decfloat clean_vers clean_misc
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
clean: clean_objects clean_dependancies clean_extern_objects clean_build \
|
2016-11-15 12:17:56 +01:00
|
|
|
clean_yacc_gen clean_gpre_gen clean_dbs clean_examples clean_tommath \
|
2019-01-23 15:09:10 +01:00
|
|
|
clean_tomcrypt clean_decfloat clean_vers clean_misc
|
|
|
|
|
|
|
|
clean_vers:
|
|
|
|
$(RM) *.vers
|
|
|
|
|
|
|
|
clean_misc:
|
2019-11-29 18:03:56 +01:00
|
|
|
$(RM) ods.txt odstest* security.tmp test.header.txt $(API_PAS_FILE)
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
ifeq ($(EDITLINE_FLG),Y)
|
|
|
|
ifeq ($(STD_EDITLINE),false)
|
|
|
|
clean: clean_editline
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean_config clean_all: clean clean_makefiles
|
|
|
|
$(RM) $(ROOT)/configure
|
|
|
|
$(RM) $(ROOT)/aclocal.m4
|
|
|
|
$(RM) $(ROOT)/config.log
|
|
|
|
$(RM) $(ROOT)/config.status
|
|
|
|
$(RM) $(ROOT)/libtool
|
|
|
|
$(RM_R) $(ROOT)/autom4te.cache
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/editline distclean
|
|
|
|
# -$(MAKE) -C $(ROOT)/extern/icu/source distclean
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/btyacc distclean
|
|
|
|
|
|
|
|
clean_dbs:
|
|
|
|
$(RM) *.fdb *.FDB msg.timestamp
|
|
|
|
$(RM) yachts.lnk
|
|
|
|
|
|
|
|
|
|
|
|
# The examples are a bit different, since the makefile is included in the directory
|
|
|
|
# and not in the gen directory, deleting it means, make clean; make doesnt work correctly
|
|
|
|
# so the code below deletes all the other stuff but not the Makefile.examples MOD Nov-2007
|
|
|
|
|
|
|
|
clean_examples:
|
|
|
|
$(RM) `find $(GEN_ROOT)/examples/ -type f ! -name 'Make*'`
|
|
|
|
|
|
|
|
clean_editline:
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/editline clean
|
|
|
|
|
|
|
|
#clean_icu:
|
|
|
|
# -$(MAKE) -C $(ROOT)/extern/icu/source clean
|
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
clean_tommath:
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/libtommath clean
|
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
clean_tomcrypt:
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/libtomcrypt clean
|
|
|
|
|
2016-11-15 12:17:56 +01:00
|
|
|
clean_decfloat:
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/decNumber clean
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
clean_objects:
|
|
|
|
$(RM) `find $(TMP_ROOT)/ -type f -name '*.o' -print`
|
2011-01-14 18:31:40 +01:00
|
|
|
$(RM) `find $(TMP_ROOT)/ -type f -name '*.a' -print`
|
2015-12-21 18:01:26 +01:00
|
|
|
$(RM) `find $(TMP_ROOT)/ -type f -name '*.cpp' -print`
|
|
|
|
$(RM) `find $(TMP_ROOT)/ -type f -name '*.pas' -print`
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
clean_extern_objects:
|
2011-01-14 18:31:40 +01:00
|
|
|
$(RM) `find $(ROOT)/extern/ -type f -name '*.lo' -print`
|
2010-10-12 10:02:57 +02:00
|
|
|
$(RM) `find $(ROOT)/extern/ -type f -name '*.o' -print`
|
|
|
|
|
|
|
|
# Clear out dependancies files created by the gcc compiler
|
|
|
|
# since when .o and other files are deleted the dependant
|
|
|
|
# targets need to be recalculated
|
|
|
|
|
|
|
|
clean_dependancies:
|
|
|
|
$(RM) -f `find $(TMP_ROOT)/ -type f -name '*.d' -print`
|
|
|
|
|
|
|
|
# delete only all of the files of type regular file in $FIREBIRD
|
|
|
|
# leave the directories to make dependacies work still
|
|
|
|
|
|
|
|
clean_build:
|
2017-07-19 16:33:10 +02:00
|
|
|
$(RM) `find $(GEN_ROOT)/*/firebird \( -type f -o -type l \) \( \! -name '*.conf' -o -name 'udr_engine.conf' \) \! -name 'fb_config' \! -name '*.sh' -print`
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
clean_makefiles:
|
|
|
|
$(RM) $(GEN_ROOT)/Make*
|
|
|
|
$(RM) $(GEN_ROOT)/make*
|
|
|
|
$(RM) `find $(GEN_ROOT)/install \( -type f -o -type l \) -print`
|
|
|
|
-$(RM) $(GEN_ROOT)/examples/Make*
|
|
|
|
$(RM) $(ROOT)/Makefile
|
|
|
|
$(RM) $(SRC_ROOT)/include/gen/autoconfig.h
|
|
|
|
|
|
|
|
clean_gpre_gen:
|
|
|
|
-$(RM) -f `find $(TMP_ROOT)/ -type f -name '*.cpp' -print`
|
|
|
|
|
|
|
|
clean_yacc_gen:
|
2019-01-23 15:09:10 +01:00
|
|
|
$(RM) $(ROOT)/src/dsql/parse.cpp $(ROOT)/src/dsql/dsql.tab.h types.y y.*
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
# Extra platform specific targets
|
|
|
|
@POSTFIX_INCLUDE@
|