mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
Generate static libs in temp directory.
This commit is contained in:
parent
14507af30d
commit
a4d2f3aeba
@ -188,17 +188,17 @@ 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
|
||||||
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(LIB)
|
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(STATIC_LIB)
|
||||||
|
|
||||||
ifeq ($(ABSEIL_BUILD_FLG),Y)
|
ifeq ($(ABSEIL_BUILD_FLG),Y)
|
||||||
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.a $(LIB)
|
ln -sf $(ROOT)/extern/int128/absl/numeric/libi128.a $(STATIC_LIB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CLIENT_ONLY_FLG),N)
|
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 $(STATIC_LIB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(MAKE) libcds
|
$(MAKE) libcds
|
||||||
@ -251,7 +251,7 @@ export_lists: $(ALLVERS)
|
|||||||
#
|
#
|
||||||
|
|
||||||
.PHONY: tommath
|
.PHONY: tommath
|
||||||
TOMMATH_LIB=$(LIB)/libtommath.a
|
TOMMATH_LIB=$(STATIC_LIB)/libtommath.a
|
||||||
TOM_Objs=$(addprefix ../extern/libtommath/,$(call doObjects,$(call dirFiles,../extern/libtommath)))
|
TOM_Objs=$(addprefix ../extern/libtommath/,$(call doObjects,$(call dirFiles,../extern/libtommath)))
|
||||||
|
|
||||||
tommath: $(TOMMATH_LIB)
|
tommath: $(TOMMATH_LIB)
|
||||||
@ -265,7 +265,7 @@ $(TOMMATH_LIB): $(TOM_Objs)
|
|||||||
#
|
#
|
||||||
|
|
||||||
.PHONY: tomcrypt
|
.PHONY: tomcrypt
|
||||||
TOMCRYPT_LIB=$(LIB)/libtomcrypt.a
|
TOMCRYPT_LIB=$(STATIC_LIB)/libtomcrypt.a
|
||||||
|
|
||||||
TOM_Src:=$(shell find ../extern/libtomcrypt/src -name '*.c' -print)
|
TOM_Src:=$(shell find ../extern/libtomcrypt/src -name '*.c' -print)
|
||||||
TOM_Objs=$(call doObjects,$(TOM_Src))
|
TOM_Objs=$(call doObjects,$(TOM_Src))
|
||||||
@ -281,7 +281,7 @@ $(TOMCRYPT_LIB): $(TOM_Objs)
|
|||||||
#
|
#
|
||||||
|
|
||||||
.PHONY: re2
|
.PHONY: re2
|
||||||
RE2_LIB:=$(LIB)/libre2.a
|
RE2_LIB:=$(STATIC_LIB)/libre2.a
|
||||||
RE2_DIR:=../extern/re2/
|
RE2_DIR:=../extern/re2/
|
||||||
|
|
||||||
RE2_Util:=rune.cc strutil.cc
|
RE2_Util:=rune.cc strutil.cc
|
||||||
@ -307,9 +307,9 @@ libcds:
|
|||||||
AR="$(AR)" $(MAKE) -C $(LIBCDS)/lib/$(TARGET)
|
AR="$(AR)" $(MAKE) -C $(LIBCDS)/lib/$(TARGET)
|
||||||
|
|
||||||
ifeq ($(TARGET),Debug)
|
ifeq ($(TARGET),Debug)
|
||||||
ln -sf $(LIBCDS)/lib/$(TARGET)/bin/libcds-s_d.a $(LIB)/libcds.a
|
ln -sf $(LIBCDS)/lib/$(TARGET)/bin/libcds-s_d.a $(STATIC_LIB)/libcds.a
|
||||||
else
|
else
|
||||||
ln -sf $(LIBCDS)/lib/$(TARGET)/bin/libcds-s.a $(LIB)/libcds.a
|
ln -sf $(LIBCDS)/lib/$(TARGET)/bin/libcds-s.a $(STATIC_LIB)/libcds.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#___________________________________________________________________________
|
#___________________________________________________________________________
|
||||||
@ -388,9 +388,9 @@ ifeq ($(CLIENT_ONLY_FLG),N)
|
|||||||
$(MAKE) libcds
|
$(MAKE) libcds
|
||||||
endif
|
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 $(STATIC_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 $(STATIC_LIB)
|
||||||
$(MAKE) cross_rest
|
$(MAKE) cross_rest
|
||||||
$(MAKE) yvalve
|
$(MAKE) yvalve
|
||||||
ifeq ($(CLIENT_ONLY_FLG),Y)
|
ifeq ($(CLIENT_ONLY_FLG),Y)
|
||||||
@ -418,7 +418,7 @@ $(COMMON_LIB): $(Common_Objects)
|
|||||||
$(STATICLIB_LINK) $@ $^
|
$(STATICLIB_LINK) $@ $^
|
||||||
|
|
||||||
$(COMMON_TEST): $(Common_Test_Objects) $(COMMON_LIB)
|
$(COMMON_TEST): $(Common_Test_Objects) $(COMMON_LIB)
|
||||||
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(LINK_LIBS)
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) -L$(STATIC_LIB) $(LINK_LIBS)
|
||||||
|
|
||||||
#___________________________________________________________________________
|
#___________________________________________________________________________
|
||||||
# gpre_boot
|
# gpre_boot
|
||||||
@ -427,7 +427,7 @@ $(COMMON_TEST): $(Common_Test_Objects) $(COMMON_LIB)
|
|||||||
boot: $(GPRE_BOOT)
|
boot: $(GPRE_BOOT)
|
||||||
|
|
||||||
$(GPRE_BOOT): $(GPRE_Boot_Objects) $(COMMON_LIB)
|
$(GPRE_BOOT): $(GPRE_Boot_Objects) $(COMMON_LIB)
|
||||||
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) $(LINK_LIBS)
|
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ -L$(LIB) -L$(STATIC_LIB) $(LINK_LIBS)
|
||||||
-$(RM) $(GPRE_CURRENT)
|
-$(RM) $(GPRE_CURRENT)
|
||||||
(cd $(@D); $(LN) $(@F) $(notdir $(GPRE_CURRENT)))
|
(cd $(@D); $(LN) $(@F) $(notdir $(GPRE_CURRENT)))
|
||||||
|
|
||||||
|
@ -59,13 +59,13 @@ include $(ROOT)/gen/make.shared.variables
|
|||||||
.PHONY: libeditline
|
.PHONY: libeditline
|
||||||
|
|
||||||
|
|
||||||
libeditline : $(LIB)/libedit.a
|
libeditline : $(STATIC_LIB)/libedit.a
|
||||||
|
|
||||||
$(LIB)/libedit.a:
|
$(STATIC_LIB)/libedit.a:
|
||||||
AR=ar
|
AR=ar
|
||||||
cd $(ROOT)/extern/editline; chmod +x configure; ./configure --enable-static --disable-shared --enable-widec
|
cd $(ROOT)/extern/editline; chmod +x configure; ./configure --enable-static --disable-shared --enable-widec
|
||||||
$(MAKE) -C $(ROOT)/extern/editline
|
$(MAKE) -C $(ROOT)/extern/editline
|
||||||
cp $(ROOT)/extern/editline/src/libedit.a $(LIB)
|
cp $(ROOT)/extern/editline/src/libedit.a $(STATIC_LIB)
|
||||||
|
|
||||||
|
|
||||||
include $(ROOT)/gen/make.shared.targets
|
include $(ROOT)/gen/make.shared.targets
|
||||||
|
@ -75,6 +75,8 @@ BIN=$(call buildSubDirectory,bin)
|
|||||||
PLUGINS=$(call buildSubDirectory,plugins)
|
PLUGINS=$(call buildSubDirectory,plugins)
|
||||||
TZDATA=$(call buildSubDirectory,tzdata)
|
TZDATA=$(call buildSubDirectory,tzdata)
|
||||||
FB_TESTS_DIR=$(call buildSubDirectory,tests)
|
FB_TESTS_DIR=$(call buildSubDirectory,tests)
|
||||||
|
|
||||||
|
STATIC_LIB=$(TMP_ROOT)
|
||||||
RBIN=$(FIREBIRD)/bin
|
RBIN=$(FIREBIRD)/bin
|
||||||
|
|
||||||
# This picks up the current directory and maps it to the equivalent module
|
# This picks up the current directory and maps it to the equivalent module
|
||||||
@ -276,7 +278,7 @@ ifeq ($(EDITLINE_FLG),Y)
|
|||||||
ifeq ($(STD_EDITLINE), true)
|
ifeq ($(STD_EDITLINE), true)
|
||||||
LIBEDITLINE := -l$(READLINE)
|
LIBEDITLINE := -l$(READLINE)
|
||||||
else
|
else
|
||||||
LIBEDITLINE := $(LIB)/libedit.a
|
LIBEDITLINE := $(STATIC_LIB)/libedit.a
|
||||||
TERMLIB := -l@TERMLIB@
|
TERMLIB := -l@TERMLIB@
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -360,7 +362,7 @@ endif
|
|||||||
LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl)
|
LIB_PATH_OPTS = $(call LIB_LINK_RPATH,lib) $(call LIB_LINK_RPATH,intl)
|
||||||
LIB_LINK_SONAME= -Wl,-soname,$(1)
|
LIB_LINK_SONAME= -Wl,-soname,$(1)
|
||||||
LIB_LINK_MAPFILE= -Wl,--version-script,$(1)
|
LIB_LINK_MAPFILE= -Wl,--version-script,$(1)
|
||||||
FIREBIRD_LIBRARY_LINK= -L$(LIB) -lfbclient $(MATHLIB) $(CRYPTLIB)
|
FIREBIRD_LIBRARY_LINK= -L$(LIB) -L$(STATIC_LIB) -lfbclient $(MATHLIB) $(CRYPTLIB)
|
||||||
|
|
||||||
EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(call LINK_DARWIN_RPATH,..) $(LINK_EMPTY_SYMBOLS)
|
EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(call LINK_DARWIN_RPATH,..) $(LINK_EMPTY_SYMBOLS)
|
||||||
LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -shared
|
LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -shared
|
||||||
@ -370,7 +372,7 @@ FB_DAEMON = $(BIN)/firebird$(EXEC_EXT)
|
|||||||
# Per-library link rules
|
# Per-library link rules
|
||||||
LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_EXT)) $(UNDEF_FLAGS)\
|
LINK_UDF = $(LIB_LINK) $(LIB_LINK_OPTIONS) $(call LIB_LINK_SONAME,$(1).$(SHRLIB_EXT)) $(UNDEF_FLAGS)\
|
||||||
$(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
$(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
||||||
LINK_UDF_LIBS = $(THR_LIBS) -L$(LIB) -lib_util $(SO_LINK_LIBS)
|
LINK_UDF_LIBS = $(THR_LIBS) -L$(LIB) -L$(STATIC_LIB) -lib_util $(SO_LINK_LIBS)
|
||||||
|
|
||||||
LINK_IB_UTIL = $(LIB_LINK) $(LINK_IBUTIL_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\
|
LINK_IB_UTIL = $(LIB_LINK) $(LINK_IBUTIL_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\
|
||||||
$(call LIB_LINK_SONAME,$(IbUtilLibraryName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
$(call LIB_LINK_SONAME,$(IbUtilLibraryName)) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
||||||
@ -378,15 +380,15 @@ LINK_IB_UTIL_LIBS = $(THR_LIBS)
|
|||||||
|
|
||||||
LINK_INTL = $(LIB_LINK) $(LINK_FBINTL_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\
|
LINK_INTL = $(LIB_LINK) $(LINK_FBINTL_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\
|
||||||
$(call LIB_LINK_SONAME,libfbintl.$(SHRLIB_EXT).1) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
$(call LIB_LINK_SONAME,libfbintl.$(SHRLIB_EXT).1) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
||||||
LINK_INTL_LIBS = -L$(LIB) $(SO_LINK_LIBS) $(FIREBIRD_LIBRARY_LINK)
|
LINK_INTL_LIBS = -L$(LIB) -L$(STATIC_LIB) $(SO_LINK_LIBS) $(FIREBIRD_LIBRARY_LINK)
|
||||||
|
|
||||||
LINK_TRACE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\
|
LINK_TRACE = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(UNDEF_FLAGS)\
|
||||||
$(call LIB_LINK_SONAME,$(LIB_PREFIX)fbtrace.$(SHRLIB_EXT).0) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
$(call LIB_LINK_SONAME,$(LIB_PREFIX)fbtrace.$(SHRLIB_EXT).0) $(call LIB_LINK_RPATH,lib) $(call LINK_DARWIN_RPATH,..)
|
||||||
LINK_TRACE_LIBS = -L$(LIB) $(SO_LINK_LIBS)
|
LINK_TRACE_LIBS = -L$(LIB) -L$(STATIC_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)
|
LINK_FIREBIRD_LIBS = -L$(LIB) -L$(STATIC_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,..)
|
||||||
@ -394,11 +396,11 @@ LINK_ENGINE_LIBS = $(LINK_FIREBIRD_LIBS) $(RE2LIB) $(LIBCDSLIB) $(FIREBIRD_LIBRA
|
|||||||
|
|
||||||
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,..)
|
||||||
LINK_UDRENG_LIBS = -L$(LIB) $(SO_LINK_LIBS)
|
LINK_UDRENG_LIBS = -L$(LIB) -L$(STATIC_LIB) $(SO_LINK_LIBS)
|
||||||
|
|
||||||
LINK_PLUGIN = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(call LIB_LINK_RPATH,lib) $(UNDEF_FLAGS)\
|
LINK_PLUGIN = $(LIB_LINK) $(LINK_PLUGIN_SYMBOLS) $(LIB_LINK_OPTIONS) $(call LIB_LINK_RPATH,lib) $(UNDEF_FLAGS)\
|
||||||
$(call LINK_DARWIN_RPATH,..)
|
$(call LINK_DARWIN_RPATH,..)
|
||||||
LINK_PLUG_LIBS = -L$(LIB) $(SO_LINK_LIBS)
|
LINK_PLUG_LIBS = -L$(LIB) -L$(STATIC_LIB) $(SO_LINK_LIBS)
|
||||||
|
|
||||||
# Pay attention - we place common library into obj, not lib dir
|
# Pay attention - we place common library into obj, not lib dir
|
||||||
# It's just a set of object files, prepared to be used by ld, not an output library
|
# It's just a set of object files, prepared to be used by ld, not an output library
|
||||||
|
Loading…
Reference in New Issue
Block a user