8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

POSIX build with support for --enable-client-only and --without-tomcrypt.

This commit is contained in:
Adriano dos Santos Fernandes 2022-11-27 11:24:13 -03:00
parent a791ccd02e
commit 0c5db1d2a3
10 changed files with 227 additions and 136 deletions

View File

@ -248,7 +248,7 @@ copyFiles() {
chown root:wheel ${TargetDir}@FB_PLUGDIR@/*.so* chown root:wheel ${TargetDir}@FB_PLUGDIR@/*.so*
chmod 0755 ${TargetDir}@FB_PLUGDIR@/*.so* chmod 0755 ${TargetDir}@FB_PLUGDIR@/*.so*
makeDirs ${TargetDir}@FB_TZDATADIR@ makeDirs @FB_TZDATADIR@
cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@ cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@
chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res

View File

@ -42,6 +42,8 @@ include $(ROOT)/gen/make.shared.variables
# root of the build tree. # root of the build tree.
BuildRoot=$(GEN_ROOT) BuildRoot=$(GEN_ROOT)
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
WITH_TOMCRYPT=@WITH_TOMCRYPT@
InstallRoot=. InstallRoot=.
@ -112,8 +114,10 @@ buildImageDir: buildDebugInfo
buildTarDir: buildImageDir buildTarDir: buildImageDir
mkdir -p $(GEN_ROOT)/$(TarDir) mkdir -p $(GEN_ROOT)/$(TarDir)
ifeq ($(CLIENT_ONLY_FLG),N)
cp -r $(GEN_ROOT)/install/install.sh $(GEN_ROOT)/$(TarDir) cp -r $(GEN_ROOT)/install/install.sh $(GEN_ROOT)/$(TarDir)
chmod a+x $(GEN_ROOT)/$(TarDir)/*.sh chmod a+x $(GEN_ROOT)/$(TarDir)/*.sh
endif
(cd $(GEN_ROOT)/$(TarDir); tar -C ../buildroot -czf buildroot.tar.gz . ) (cd $(GEN_ROOT)/$(TarDir); tar -C ../buildroot -czf buildroot.tar.gz . )
(cd $(GEN_ROOT)/$(TarDir); tar -tzf buildroot.tar.gz > manifest.txt ) (cd $(GEN_ROOT)/$(TarDir); tar -tzf buildroot.tar.gz > manifest.txt )

View File

@ -38,6 +38,8 @@ SecurityDatabase=security5.fdb
TomMathBuild="@TOMMATH_BUILD@" TomMathBuild="@TOMMATH_BUILD@"
TomCryptBuild="@TOMCRYPT_BUILD@" TomCryptBuild="@TOMCRYPT_BUILD@"
OBJDUMP=@OBJDUMP@ OBJDUMP=@OBJDUMP@
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
WITH_TOMCRYPT=@WITH_TOMCRYPT@
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# addLibs # addLibs
@ -161,89 +163,102 @@ copyFiles() {
fi fi
#directories #directories
makeDirs "@FB_BINDIR@ @FB_SBINDIR@ @FB_CONFDIR@ @FB_LIBDIR@ @FB_INCDIR@/firebird @FB_DOCDIR@/sql.extensions \
@FB_SAMPLEDIR@ @FB_SAMPLEDBDIR@ @FB_INTLDIR@ @FB_MISCDIR@ @FB_SECDBDIR@ @FB_MSGDIR@ @FB_LOGDIR@ \
@FB_GUARDDIR@ @FB_PLUGDIR@ @FB_TZDATADIR@"
for i in udf; do makeDirs "@FB_CONFDIR@ @FB_LIBDIR@ @FB_INCDIR@/firebird @FB_MSGDIR@ @FB_TZDATADIR@"
makeDirs @FB_MISCDIR@/upgrade/$i
done
makeDirs /usr/include if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
makeDirs "@FB_PLUGDIR@"
fi
#bin if [ "$CLIENT_ONLY_FLG" = "N" ]; then
cp $BuiltFBDir/bin/gbak ${TargetDir}@FB_BINDIR@/gbak makeDirs "@FB_BINDIR@ @FB_SBINDIR@ @FB_DOCDIR@/sql.extensions @FB_SAMPLEDIR@ @FB_SAMPLEDBDIR@ @FB_INTLDIR@ \
cp $BuiltFBDir/bin/gfix ${TargetDir}@FB_BINDIR@/gfix @FB_MISCDIR@ @FB_SECDBDIR@ @FB_LOGDIR@ @FB_GUARDDIR@"
cp $BuiltFBDir/bin/gpre ${TargetDir}@FB_BINDIR@/gpre
cp $BuiltFBDir/bin/gsec ${TargetDir}@FB_BINDIR@/gsec
cp $BuiltFBDir/bin/nbackup ${TargetDir}@FB_BINDIR@/nbackup
copyIfExists $BuiltFBDir/bin/gsplit ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/gstat ${TargetDir}@FB_BINDIR@/gstat
copyIfExists $BuiltFBDir/bin/fbsvcmgr ${TargetDir}@FB_BINDIR@
copyIfExists $BuiltFBDir/bin/fbtracemgr ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/isql ${TargetDir}@FB_BINDIR@/isql
chmod 0755 ${TargetDir}@FB_BINDIR@/* for i in udf; do
makeDirs @FB_MISCDIR@/upgrade/$i
done
fi
#sbin makeDirs /usr/include
cp -f $BuiltFBDir/bin/firebird ${TargetDir}@FB_SBINDIR@/firebird
cp -f $BuiltFBDir/bin/fbguard ${TargetDir}@FB_SBINDIR@
copyIfExists $BuiltFBDir/bin/fb_lock_print ${TargetDir}@FB_SBINDIR@
addLibs $BuiltFBDir/bin changeServerMode.sh ${TargetDir}@FB_SBINDIR@ if [ "$CLIENT_ONLY_FLG" = "N" ]; then
cp $BuiltFBDir/bin/registerDatabase.sh ${TargetDir}@FB_SBINDIR@ #bin
cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@ cp $BuiltFBDir/bin/gbak ${TargetDir}@FB_BINDIR@/gbak
addLibs $BuiltFBDir/bin FirebirdUninstall.sh ${TargetDir}@FB_SBINDIR@ cp $BuiltFBDir/bin/gfix ${TargetDir}@FB_BINDIR@/gfix
cp $BuiltFBDir/bin/gpre ${TargetDir}@FB_BINDIR@/gpre
cp $BuiltFBDir/bin/gsec ${TargetDir}@FB_BINDIR@/gsec
cp $BuiltFBDir/bin/nbackup ${TargetDir}@FB_BINDIR@/nbackup
copyIfExists $BuiltFBDir/bin/gsplit ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/gstat ${TargetDir}@FB_BINDIR@/gstat
copyIfExists $BuiltFBDir/bin/fbsvcmgr ${TargetDir}@FB_BINDIR@
copyIfExists $BuiltFBDir/bin/fbtracemgr ${TargetDir}@FB_BINDIR@
cp $BuiltFBDir/bin/isql ${TargetDir}@FB_BINDIR@/isql
chmod 0755 ${TargetDir}@FB_SBINDIR@/* chmod 0755 ${TargetDir}@FB_BINDIR@/*
chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
#install script #sbin
addLibs $BuiltFBDir/bin install.sh $BuildRootDir/gen/install cp -f $BuiltFBDir/bin/firebird ${TargetDir}@FB_SBINDIR@/firebird
cp -f $BuiltFBDir/bin/fbguard ${TargetDir}@FB_SBINDIR@
copyIfExists $BuiltFBDir/bin/fb_lock_print ${TargetDir}@FB_SBINDIR@
#examples - copy only if we have them addLibs $BuiltFBDir/bin changeServerMode.sh ${TargetDir}@FB_SBINDIR@
exampleFiles=`find $BuiltFBDir/examples/README -type f -print` cp $BuiltFBDir/bin/registerDatabase.sh ${TargetDir}@FB_SBINDIR@
if [ -z "$exampleFiles" ]; then cp $BuiltFBDir/bin/fb_config ${TargetDir}@FB_SBINDIR@
echo "Example files have not been built!" addLibs $BuiltFBDir/bin FirebirdUninstall.sh ${TargetDir}@FB_SBINDIR@
else
(cd $BuiltFBDir/examples; tar cf - .) | (cd ${TargetDir}@FB_SAMPLEDIR@; tar xf -)
rm -rf ${TargetDir}@FB_SAMPLEDIR@/empbuild
makeDirs @FB_SAMPLEDBDIR@ chmod 0755 ${TargetDir}@FB_SBINDIR@/*
cp $BuiltFBDir/examples/empbuild/*.fdb ${TargetDir}@FB_SAMPLEDBDIR@ chmod 0700 ${TargetDir}@FB_SBINDIR@/*.sh
ReadOnlyTree ${TargetDir}@FB_SAMPLEDIR@ #install script
chmod 0664 ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb addLibs $BuiltFBDir/bin install.sh $BuildRootDir/gen/install
#plugins samples #examples - copy only if we have them
makeDirs ${TargetDir}@FB_SAMPLEDIR@/prebuilt exampleFiles=`find $BuiltFBDir/examples/README -type f -print`
cp $BuiltFBDir/plugins/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins if [ -z "$exampleFiles" ]; then
cp $BuiltFBDir/bin/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin echo "Example files have not been built!"
chmod 0644 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins/* else
(cd $BuiltFBDir/examples; tar cf - .) | (cd ${TargetDir}@FB_SAMPLEDIR@; tar xf -)
rm -rf ${TargetDir}@FB_SAMPLEDIR@/empbuild
# exec bit for sample binaries makeDirs @FB_SAMPLEDBDIR@
chmod 0755 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin/* cp $BuiltFBDir/examples/empbuild/*.fdb ${TargetDir}@FB_SAMPLEDBDIR@
fi
ReadOnlyTree ${TargetDir}@FB_SAMPLEDIR@
chmod 0664 ${TargetDir}@FB_SAMPLEDBDIR@/*.fdb
#plugins samples
makeDirs @FB_SAMPLEDIR@/prebuilt
cp $BuiltFBDir/plugins/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins
cp $BuiltFBDir/bin/*fbSample* ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin
chmod 0644 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/plugins/*
# exec bit for sample binaries
chmod 0755 ${TargetDir}@FB_SAMPLEDIR@/prebuilt/bin/*
fi
#secureDB (access rights will be set at install time)
cp $BuiltFBDir/$SecurityDatabase ${TargetDir}@FB_SECDBDIR@
fi
#message file #message file
cp $BuiltFBDir/*.msg ${TargetDir}@FB_MSGDIR@ cp $BuiltFBDir/*.msg ${TargetDir}@FB_MSGDIR@
chmod 0444 ${TargetDir}@FB_MSGDIR@/*.msg chmod 0444 ${TargetDir}@FB_MSGDIR@/*.msg
#secureDB (access rights will be set at install time)
cp $BuiltFBDir/$SecurityDatabase ${TargetDir}@FB_SECDBDIR@
#include (.h .pas files) #include (.h .pas files)
cp $BuiltFBDir/include/*.h ${TargetDir}@FB_INCDIR@ cp $BuiltFBDir/include/*.h ${TargetDir}@FB_INCDIR@
cp $BuildRootDir/src/include/firebird/*.h ${TargetDir}@FB_INCDIR@/firebird cp $BuildRootDir/src/include/firebird/*.h ${TargetDir}@FB_INCDIR@/firebird
tar -C $BuildRootDir/src/include/firebird -cf - impl | tar -C ${TargetDir}@FB_INCDIR@/firebird -x tar -C $BuildRootDir/src/include/firebird -cf - impl | tar -C ${TargetDir}@FB_INCDIR@/firebird -x
cp $BuildRootDir/src/include/gen/Firebird.pas ${TargetDir}@FB_INCDIR@/firebird if [ "$CLIENT_ONLY_FLG" = "N" ]; then
cp $BuildRootDir/src/include/gen/Firebird.pas ${TargetDir}@FB_INCDIR@/firebird
fi
ReadOnlyTree ${TargetDir}@FB_INCDIR@ ReadOnlyTree ${TargetDir}@FB_INCDIR@
#lib #lib
cp -df $BuiltFBDir/lib/libfbclient.so* ${TargetDir}@FB_LIBDIR@ cp -df $BuiltFBDir/lib/libfbclient.so* ${TargetDir}@FB_LIBDIR@
cp -f $BuiltFBDir/lib/libib_util.so ${TargetDir}@FB_LIBDIR@/libib_util.so if [ "$CLIENT_ONLY_FLG" = "N" ]; then
cp -f $BuiltFBDir/lib/libib_util.so ${TargetDir}@FB_LIBDIR@/libib_util.so
fi
if [ "$TomMathBuild" = "Y" ]; then if [ "$TomMathBuild" = "Y" ]; then
makeDirs @FB_LIBDIR@/.tm makeDirs @FB_LIBDIR@/.tm
@ -257,55 +272,64 @@ copyFiles() {
chmod 0755 ${TargetDir}@FB_LIBDIR@/*.so* chmod 0755 ${TargetDir}@FB_LIBDIR@/*.so*
#plugins #plugins
(cd $BuiltFBDir/plugins;tar cf - --exclude='*fbSample*' .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -) if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
(cd $BuiltFBDir/plugins;tar cf - --exclude='*fbSample*' .) | (cd ${TargetDir}@FB_PLUGDIR@; tar xvf -)
fi
for file in `find ${TargetDir}@FB_PLUGDIR@ -name '*.so*' -print`; do for file in `find ${TargetDir}@FB_PLUGDIR@ -name '*.so*' -print`; do
chmod 0755 ${file} chmod 0755 ${file}
done done
makeDirs ${TargetDir}@FB_TZDATADIR@ makeDirs @FB_TZDATADIR@
cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@ cp $BuiltFBDir/tzdata/*.res ${TargetDir}@FB_TZDATADIR@
chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res chmod 0444 ${TargetDir}@FB_TZDATADIR@/*.res
#intl if [ "$CLIENT_ONLY_FLG" = "N" ]; then
cp $BuiltFBDir/intl/libfbintl.so ${TargetDir}@FB_INTLDIR@/fbintl #intl
cp $BuiltFBDir/intl/fbintl.conf ${TargetDir}@FB_INTLDIR@ cp $BuiltFBDir/intl/libfbintl.so ${TargetDir}@FB_INTLDIR@/fbintl
cp $BuiltFBDir/intl/fbintl.conf ${TargetDir}@FB_INTLDIR@
chmod 0755 ${TargetDir}@FB_INTLDIR@/fbintl chmod 0755 ${TargetDir}@FB_INTLDIR@/fbintl
chmod 0644 ${TargetDir}@FB_INTLDIR@/fbintl.conf chmod 0644 ${TargetDir}@FB_INTLDIR@/fbintl.conf
# Note that the following items copy files from outside the build tree. # Note that the following items copy files from outside the build tree.
# Copy the sql-declarations into the UDF-directory # Copy the sql-declarations into the UDF-directory
#doc #doc
cp $BuildRootDir/doc/*.pdf ${TargetDir}@FB_DOCDIR@ cp $BuildRootDir/doc/*.pdf ${TargetDir}@FB_DOCDIR@
cp $BuildRootDir/doc/README.* ${TargetDir}@FB_DOCDIR@ cp $BuildRootDir/doc/README.* ${TargetDir}@FB_DOCDIR@
cp $BuildRootDir/doc/sql.extensions/README* ${TargetDir}@FB_DOCDIR@/sql.extensions cp $BuildRootDir/doc/sql.extensions/README* ${TargetDir}@FB_DOCDIR@/sql.extensions
cp $BuildRootDir/*.md ${TargetDir}@FB_CONFDIR@ cp $BuildRootDir/*.md ${TargetDir}@FB_CONFDIR@
for i in `find ${TargetDir}@FB_MISCDIR@ -print`; do for i in `find ${TargetDir}@FB_MISCDIR@ -print`; do
if [ -d $i ]; then if [ -d $i ]; then
chmod 0755 $i chmod 0755 $i
else else
chmod 0644 $i chmod 0644 $i
fi fi
done done
#misc #misc
cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@ cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/src/misc/upgrade/v4.0/udf_replace* ${TargetDir}@FB_MISCDIR@/upgrade/udf cp $BuildRootDir/src/misc/upgrade/v4.0/udf_replace* ${TargetDir}@FB_MISCDIR@/upgrade/udf
cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@ cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@ cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@
cp $BuildRootDir/gen/install/misc/firebird.service ${TargetDir}@FB_MISCDIR@ cp $BuildRootDir/gen/install/misc/firebird.service ${TargetDir}@FB_MISCDIR@
chmod -R go-rwx ${TargetDir}@FB_MISCDIR@ chmod -R go-rwx ${TargetDir}@FB_MISCDIR@
#conf
cp $BuiltFBDir/databases.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/fbtrace.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/replication.conf ${TargetDir}@FB_CONFDIR@
fi
#conf #conf
cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@ cp $BuiltFBDir/firebird.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/databases.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/fbtrace.conf ${TargetDir}@FB_CONFDIR@ if [ "$CLIENT_ONLY_FLG" = "N" ] || [ "$WITH_TOMCRYPT" = "Y" ]; then
cp $BuiltFBDir/plugins.conf ${TargetDir}@FB_CONFDIR@ cp $BuiltFBDir/plugins.conf ${TargetDir}@FB_CONFDIR@
cp $BuiltFBDir/replication.conf ${TargetDir}@FB_CONFDIR@ fi
chmod 0644 ${TargetDir}@FB_CONFDIR@/*.conf chmod 0644 ${TargetDir}@FB_CONFDIR@/*.conf
@ -314,7 +338,7 @@ copyFiles() {
chmod 0444 ${TargetDir}@FB_CONFDIR@/*License.txt chmod 0444 ${TargetDir}@FB_CONFDIR@/*License.txt
# link include files to /usr/include # link include files to /usr/include
linkFiles "@FB_INCDIR@" "firebird iberror.h ibase.h ib_util.h" "${TargetDir}/usr/include" "${TargetDir}@FB_INCDIR@" linkFiles "@FB_INCDIR@" "firebird iberror.h ibase.h ib_util.h" "${TargetDir}/usr/include" "${TargetDir}@FB_INCDIR@"
} }

View File

@ -181,7 +181,10 @@ $(GEN_ROOT)/Make.Version : $(SRC_ROOT)/misc/writeBuildNum.sh
# #
external: external:
ifeq ($(CLIENT_ONLY_FLG),N)
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/btyacc CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/btyacc
endif
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop core CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop core
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
@ -192,12 +195,14 @@ ifeq ($(ABSEIL_BUILD_FLG),Y)
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128.a $(LIB) ln -sf $(ROOT)/extern/int128/absl/numeric/libi128.a $(LIB)
endif endif
ifeq ($(CLIENT_ONLY_FLG),N)
ifeq ($(RE2_BUILD_FLG),Y) ifeq ($(RE2_BUILD_FLG),Y)
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -O3 -g -fPIC" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/re2 CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -O3 -g -fPIC" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/re2
ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB) ln -sf $(ROOT)/extern/re2/obj/libre2.a $(LIB)
endif endif
$(MAKE) libcds $(MAKE) libcds
endif
ifeq ($(TOMMATH_BUILD_FLG),Y) ifeq ($(TOMMATH_BUILD_FLG),Y)
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC="$(CC)" CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared GCC="$(CC)"
@ -223,11 +228,13 @@ else
endif endif
endif endif
ifeq ($(CLIENT_ONLY_FLG),N)
ifeq ($(STD_EDITLINE),false) ifeq ($(STD_EDITLINE),false)
ifeq ($(EDITLINE_FLG),Y) ifeq ($(EDITLINE_FLG),Y)
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -f $(GEN_ROOT)/Makefile.extern.editline
endif endif
endif endif
endif
#___________________________________________________________________________ #___________________________________________________________________________
@ -317,8 +324,16 @@ master_process:
$(MAKE) export_lists $(MAKE) export_lists
$(MAKE) external $(MAKE) external
$(MAKE) updateCloopInterfaces $(MAKE) updateCloopInterfaces
$(MAKE) boot $(MAKE) rest
$(MAKE) yvalve $(MAKE) yvalve
ifeq ($(CLIENT_ONLY_FLG),Y)
ifeq ($(WITH_TOMCRYPT),Y)
$(MAKE) chacha
endif
$(MAKE) include_generic
endif
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) boot
$(MAKE) engine $(MAKE) engine
$(MAKE) fbintl $(MAKE) fbintl
$(MAKE) utilities $(MAKE) utilities
@ -331,7 +346,7 @@ master_process:
(cd $(BIN); $(LN) $(notdir $(GPRE)) $(notdir $(GPRE_CURRENT))) (cd $(BIN); $(LN) $(notdir $(GPRE)) $(notdir $(GPRE_CURRENT)))
$(MAKE) plugins $(MAKE) plugins
$(MAKE) examples $(MAKE) examples
$(MAKE) rest endif
cross_process: cross_process:
@ -344,6 +359,7 @@ cross1:
$(MAKE) export_lists $(MAKE) export_lists
$(MAKE) external $(MAKE) external
$(MAKE) updateCloopInterfaces $(MAKE) updateCloopInterfaces
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) boot $(MAKE) boot
$(MAKE) yvalve $(MAKE) yvalve
$(MAKE) engine $(MAKE) engine
@ -358,26 +374,39 @@ cross1:
(cd $(BIN); $(LN) $(notdir $(RUN_GPRE)) $(notdir $(GPRE_CURRENT))) (cd $(BIN); $(LN) $(notdir $(RUN_GPRE)) $(notdir $(GPRE_CURRENT)))
$(MAKE) include_generic $(MAKE) include_generic
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/ $(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
endif
cross2: cross2:
ln -sf $(SRC_ROOT)/include/cross/$(CROSS_CONFIG) $(SRC_ROOT)/include/gen/autoconfig.h ln -sf $(SRC_ROOT)/include/cross/$(CROSS_CONFIG) $(SRC_ROOT)/include/gen/autoconfig.h
$(MAKE) prerequisites $(MAKE) prerequisites
$(MAKE) tommath $(MAKE) tommath
ifeq ($(WITH_TOMCRYPT),Y)
$(MAKE) LTCSOURCE=-DLTC_SOURCE tomcrypt $(MAKE) LTCSOURCE=-DLTC_SOURCE tomcrypt
endif
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) re2 $(MAKE) re2
$(MAKE) libcds
endif
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
ln -sf $(ROOT)/extern/decNumber/libdecFloat$(CROSS).a $(LIB) ln -sf $(ROOT)/extern/decNumber/libdecFloat$(CROSS).a $(LIB)
CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/int128/absl/numeric CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKE) -C $(ROOT)/extern/int128/absl/numeric
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128$(CROSS).a $(LIB) ln -sf $(ROOT)/extern/int128/absl/numeric/libi128$(CROSS).a $(LIB)
$(MAKE) libcds $(MAKE) cross_rest
$(MAKE) yvalve $(MAKE) yvalve
ifeq ($(CLIENT_ONLY_FLG),Y)
ifeq ($(WITH_TOMCRYPT),Y)
$(MAKE) chacha
endif
$(MAKE) include_generic
endif
ifeq ($(CLIENT_ONLY_FLG),N)
$(MAKE) engine $(MAKE) engine
$(MAKE) fbintl $(MAKE) fbintl
$(MAKE) utilities $(MAKE) utilities
$(MAKE) $(GPRE) $(MAKE) $(GPRE)
$(MAKE) plugins $(MAKE) plugins
$(MAKE) -f Makefile.plugins_examples $(MAKE) -f Makefile.plugins_examples
$(MAKE) cross_rest endif
#___________________________________________________________________________ #___________________________________________________________________________
@ -538,7 +567,7 @@ $(FBTRACEMGR): $(FBTRACEMGR_Objects) $(COMMON_LIB)
gbak: $(GBAK) gbak: $(GBAK)
$(GBAK): $(GBAK_Objects) $(COMMON_LIB) $(GBAK): $(GBAK_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(RE2LIB)
gsplit: $(GSPLIT) gsplit: $(GSPLIT)
@ -606,7 +635,7 @@ $(UDR_PLUGIN): $(UDRENG_Objects) $(COMMON_LIB)
legacy_user_management: $(LEGACY_USER_MANAGER) legacy_user_management: $(LEGACY_USER_MANAGER)
$(LEGACY_USER_MANAGER): $(LEGACY_USERS_MANAGE_Objects) $(COMMON_LIB) $(LEGACY_USER_MANAGER): $(LEGACY_USERS_MANAGE_Objects) $(COMMON_LIB)
$(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)\ $(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(RE2LIB) $(FIREBIRD_LIBRARY_LINK)\
$(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libLegacy_UserManager.$(SHRLIB_EXT)) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libLegacy_UserManager.$(SHRLIB_EXT))
chacha: $(CHACHA) chacha: $(CHACHA)
@ -630,7 +659,7 @@ $(PROFILER): $(Profiler_Objects) $(COMMON_LIB)
trace: $(FBTRACE) trace: $(FBTRACE)
$(FBTRACE): $(FBTRACE_UTIL_Objects) $(COMMON_LIB) $(FBTRACE): $(FBTRACE_UTIL_Objects) $(COMMON_LIB)
$(LINK_TRACE) -o $@ $^ $(FIREBIRD_LIBRARY_LINK) $(LINK_TRACE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libfbtrace.$(SHRLIB_EXT)) $(LINK_TRACE) -o $@ $^ $(RE2LIB) $(FIREBIRD_LIBRARY_LINK) $(LINK_TRACE_LIBS) $(call LIB_LINK_DARWIN_INSTALL_NAME,plugins/libfbtrace.$(SHRLIB_EXT))
auth_debug: $(AUTH_DEBUGGER) auth_debug: $(AUTH_DEBUGGER)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.arm64 CROSS_CONFIG=android.arm64
LDFLAGS += -static-libstdc++ LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB) DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS := UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs) LINK_LIBS = $(DroidLibs)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.arme CROSS_CONFIG=android.arme
LDFLAGS += -static-libstdc++ LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB) DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS := UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs) LINK_LIBS = $(DroidLibs)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.x86 CROSS_CONFIG=android.x86
LDFLAGS += -static-libstdc++ LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB) DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS := UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs) LINK_LIBS = $(DroidLibs)

View File

@ -41,7 +41,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)
CROSS_CONFIG=android.x86_64 CROSS_CONFIG=android.x86_64
LDFLAGS += -static-libstdc++ LDFLAGS += -static-libstdc++
DroidLibs := -lm -ldl $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB) DroidLibs := -lm -ldl $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS := UDR_SUPPORT_LIBS :=
LINK_LIBS = $(DroidLibs) LINK_LIBS = $(DroidLibs)

View File

@ -110,6 +110,8 @@ PLUSPLUS_FLAGS:= -fno-rtti -std=c++17
# If this is defined then we use special rules useful for developers only # If this is defined then we use special rules useful for developers only
IsDeveloper = @DEVEL_FLG@ IsDeveloper = @DEVEL_FLG@
CLIENT_ONLY_FLG=@CLIENT_ONLY_FLG@
WITH_TOMCRYPT=@WITH_TOMCRYPT@
CpuType=@CPU_TYPE@ CpuType=@CPU_TYPE@
PLATFORM=@PLATFORM@ PLATFORM=@PLATFORM@
@ -206,8 +208,8 @@ endif
STATICLIB_LINK = $(AR) crus STATICLIB_LINK = $(AR) crus
LINK_LIBS = @LIBS@ $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB) LINK_LIBS = @LIBS@ $(DECLIB) $(I128LIB)
SO_LINK_LIBS = @LIBS@ $(DECLIB) $(RE2LIB) $(I128LIB) $(LIBCDSLIB) SO_LINK_LIBS = @LIBS@ $(DECLIB) $(I128LIB)
# Default extensions # Default extensions
@ -381,11 +383,11 @@ LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS)
LINK_FIREBIRD = $(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\ LINK_FIREBIRD = $(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\
$(call LIB_LINK_SONAME,$(LibrarySoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..) $(call LIB_LINK_SONAME,$(LibrarySoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
LINK_FIREBIRD_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(MATHLIB) $(CRYPTLIB) LINK_FIREBIRD_LIBS = -L$(LIB) $(LIB_GUI) $(SO_LINK_LIBS) $(MATHLIB)
LINK_ENGINE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\ LINK_ENGINE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_FIREBIRD_OPTIONS) $(UNDEF_FLAGS)\
$(call LIB_LINK_SONAME,$(EngineSoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..) $(call LIB_LINK_SONAME,$(EngineSoName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
LINK_ENGINE_LIBS = $(LINK_FIREBIRD_LIBS) $(FIREBIRD_LIBRARY_LINK) LINK_ENGINE_LIBS = $(LINK_FIREBIRD_LIBS) $(RE2LIB) $(LIBCDSLIB) $(FIREBIRD_LIBRARY_LINK)
LINK_UDRENG = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(call LIB_LINK_RPATH,lib) $(UNDEF_FLAGS)\ LINK_UDRENG = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(call LIB_LINK_RPATH,lib) $(UNDEF_FLAGS)\
$(call LINK_DARWIN_RPATH,..) $(call LINK_DARWIN_RPATH,..)

View File

@ -565,6 +565,16 @@ AC_ARG_ENABLE(developer,
esac]) esac])
AC_SUBST(DEVEL_FLG) AC_SUBST(DEVEL_FLG)
CLIENT_ONLY_FLG=N
AC_ARG_ENABLE(client-only,
[ --enable-client-only use client-only mode rules (default=no)],
[case "$enableval" in
yes) CLIENT_ONLY_FLG=Y;;
no) CLIENT_ONLY_FLG=N;;
*) AC_MSG_ERROR(bad value '${enableval}' for --enable-client-only);;
esac])
AC_SUBST(CLIENT_ONLY_FLG)
CROSS= CROSS=
IS_CROSS=N IS_CROSS=N
AC_ARG_WITH(cross-build, AC_ARG_WITH(cross-build,
@ -579,9 +589,19 @@ AC_ARG_WITH(builtin-tommath,
[TOMMATH_BUILD=Y]) [TOMMATH_BUILD=Y])
AC_SUBST(TOMMATH_BUILD) AC_SUBST(TOMMATH_BUILD)
WITH_TOMCRYPT=Y
AC_ARG_WITH(tomcrypt,
[ --without-tomcrypt do not use libtomcrypt (allowed with --enable-client-only)],
[case "$withval" in
yes) WITH_TOMCRYPT=Y;;
no) WITH_TOMCRYPT=N;;
*) AC_MSG_ERROR(bad value '${withval}' for --with-tomcrypt);;
esac])
AC_SUBST(WITH_TOMCRYPT)
TOMCRYPT_BUILD=N TOMCRYPT_BUILD=N
AC_ARG_WITH(builtin-tomcrypt, AC_ARG_WITH(builtin-tomcrypt,
[ --with-builtin-tomcrypt build libtomcrypt library from firebird tree], [ --with-builtin-tomcrypt build libtomcrypt library from firebird tree],
[TOMCRYPT_BUILD=Y]) [TOMCRYPT_BUILD=Y])
AC_SUBST(TOMCRYPT_BUILD) AC_SUBST(TOMCRYPT_BUILD)
@ -592,7 +612,7 @@ AC_ARG_WITH(termlib,
RE2_BUILD=Y RE2_BUILD=Y
AC_ARG_WITH(system-re2, AC_ARG_WITH(system-re2,
[ --with-system-re2 use system-wide re2 library instead of embedded copy], [ --with-system-re2 use system-wide re2 library instead of embedded copy],
[RE2_BUILD=N]) [RE2_BUILD=N])
AC_SUBST(RE2_BUILD) AC_SUBST(RE2_BUILD)
@ -910,16 +930,18 @@ dnl check for tomcrypt presence
if test "$TOMCRYPT_BUILD" = "Y"; then if test "$TOMCRYPT_BUILD" = "Y"; then
CRYPTLIB=-ltomcrypt CRYPTLIB=-ltomcrypt
else else
XE_SAVE_ENV() if test "$WITH_TOMCRYPT" = "Y"; then
CFLAGS="$CFLAGS -DLTC_NO_ASM" XE_SAVE_ENV()
AC_CHECK_HEADER(tomcrypt.h,, CFLAGS="$CFLAGS -DLTC_NO_ASM"
AC_MSG_ERROR(Include file for tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt)) AC_CHECK_HEADER(tomcrypt.h,,
XE_RESTORE_ENV() AC_MSG_ERROR(Include file for tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
XE_SAVE_ENV() XE_RESTORE_ENV()
LIBS= XE_SAVE_ENV()
AC_CHECK_LIB(tomcrypt, sha1_init, CRYPTLIB=-ltomcrypt, LIBS=
AC_MSG_ERROR(Library tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt)) AC_CHECK_LIB(tomcrypt, sha1_init, CRYPTLIB=-ltomcrypt,
XE_RESTORE_ENV() AC_MSG_ERROR(Library tomcrypt not found - please install development tomcrypt package or use --with-builtin-tomcrypt))
XE_RESTORE_ENV()
fi
fi fi
AC_SUBST(CRYPTLIB) AC_SUBST(CRYPTLIB)
@ -935,16 +957,18 @@ if test "$EDITLINE_FLG" = "Y"; then
AC_SUBST(TERMLIB) AC_SUBST(TERMLIB)
fi fi
dnl check for re2 presence if test "$CLIENT_ONLY_FLG" = "N"; then
if test "$RE2_BUILD" != "Y"; then dnl check for re2 presence
XE_SAVE_ENV() if test "$RE2_BUILD" != "Y"; then
AC_LANG_PUSH(C++) XE_SAVE_ENV()
AC_CHECK_HEADER(re2/re2.h, RE2LIB=-lre2, AC_LANG_PUSH(C++)
AC_MSG_ERROR(Include file for re2 not found - please install development re2 package or drop --with-system-re2)) AC_CHECK_HEADER(re2/re2.h, RE2LIB=-lre2,
AC_LANG_POP(C++) AC_MSG_ERROR(Include file for re2 not found - please install development re2 package or drop --with-system-re2))
XE_RESTORE_ENV() AC_LANG_POP(C++)
XE_RESTORE_ENV()
fi
AC_SUBST(RE2LIB)
fi fi
AC_SUBST(RE2LIB)
dnl Check for libraries dnl Check for libraries
AC_SEARCH_LIBS(dlopen, dl) AC_SEARCH_LIBS(dlopen, dl)
@ -1324,7 +1348,13 @@ for fb_tgt in \$FB_TARGETS; do
dnl # output dnl # output
mkdir -p gen/\$fb_tgt/firebird/bin mkdir -p gen/\$fb_tgt/firebird/bin
mkdir -p gen/\$fb_tgt/firebird/include/firebird/impl
mkdir -p gen/\$fb_tgt/firebird/lib
mkdir -p gen/\$fb_tgt/firebird/tests
if test "$CLIENT_ONLY_FLG" = "N" || test "$WITH_TOMCRYPT" = "Y"; then
mkdir -p gen/\$fb_tgt/firebird/plugins mkdir -p gen/\$fb_tgt/firebird/plugins
fi
if test "$CLIENT_ONLY_FLG" = "N"; then
mkdir -p gen/\$fb_tgt/firebird/plugins/udr mkdir -p gen/\$fb_tgt/firebird/plugins/udr
mkdir -p gen/\$fb_tgt/firebird/examples/api mkdir -p gen/\$fb_tgt/firebird/examples/api
mkdir -p gen/\$fb_tgt/firebird/examples/dbcrypt mkdir -p gen/\$fb_tgt/firebird/examples/dbcrypt
@ -1340,10 +1370,8 @@ dnl # output
mkdir -p gen/\$fb_tgt/firebird/examples/udr mkdir -p gen/\$fb_tgt/firebird/examples/udr
mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/bin mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/bin
mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/plugins mkdir -p gen/\$fb_tgt/firebird/examples/prebuilt/plugins
mkdir -p gen/\$fb_tgt/firebird/include/firebird/impl
mkdir -p gen/\$fb_tgt/firebird/lib
mkdir -p gen/\$fb_tgt/firebird/misc mkdir -p gen/\$fb_tgt/firebird/misc
mkdir -p gen/\$fb_tgt/firebird/tests fi
dnl ### TEMP ### directories for generated .cpp, .o and .d by module name dnl ### TEMP ### directories for generated .cpp, .o and .d by module name
for src_dir in `cd src; ls -R -1 * | grep : | tr -d : | tr "\n" " "; cd ..`; do for src_dir in `cd src; ls -R -1 * | grep : | tr -d : | tr "\n" " "; cd ..`; do
@ -1370,12 +1398,16 @@ dnl TODO: fix "arch-specific/linux/" paths for common posix scripts with SVN
for fb_tgt in $FB_TARGETS; do for fb_tgt in $FB_TARGETS; do
AC_CONFIG_FILES([ AC_CONFIG_FILES([
gen/$fb_tgt/firebird/firebird.conf:builds/install/misc/firebird.conf gen/$fb_tgt/firebird/firebird.conf:builds/install/misc/firebird.conf
gen/$fb_tgt/firebird/plugins.conf:builds/install/misc/plugins.conf
])
if test "$CLIENT_ONLY_FLG" = "N"; then
AC_CONFIG_FILES([
gen/$fb_tgt/firebird/databases.conf:builds/install/misc/databases.conf gen/$fb_tgt/firebird/databases.conf:builds/install/misc/databases.conf
gen/$fb_tgt/firebird/fbtrace.conf:src/utilities/ntrace/fbtrace.conf gen/$fb_tgt/firebird/fbtrace.conf:src/utilities/ntrace/fbtrace.conf
gen/$fb_tgt/firebird/intl/fbintl.conf:builds/install/misc/fbintl.conf gen/$fb_tgt/firebird/intl/fbintl.conf:builds/install/misc/fbintl.conf
gen/$fb_tgt/firebird/plugins.conf:builds/install/misc/plugins.conf
gen/$fb_tgt/firebird/replication.conf:builds/install/misc/replication.conf gen/$fb_tgt/firebird/replication.conf:builds/install/misc/replication.conf
]) ])
fi
done done
if test "x$CROSS" != "x"; then if test "x$CROSS" != "x"; then