mdbx-make: add lib-static and lib-shared targets.

Resolve https://github.com/erthink/libmdbx/issues/275.
This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-03-04 17:49:35 +03:00
parent 44fb240955
commit 4b130bd82c
2 changed files with 8 additions and 7 deletions

View File

@ -59,8 +59,8 @@ TOOLS := mdbx_stat mdbx_copy mdbx_dump mdbx_load mdbx_chk mdbx_drop
MANPAGES := mdbx_stat.1 mdbx_copy.1 mdbx_dump.1 mdbx_load.1 mdbx_chk.1 mdbx_drop.1 MANPAGES := mdbx_stat.1 mdbx_copy.1 mdbx_dump.1 mdbx_load.1 mdbx_chk.1 mdbx_drop.1
TIP := // TIP: TIP := // TIP:
.PHONY: all help options lib tools clean install uninstall check_buildflags_tag .PHONY: all help options lib libs tools clean install uninstall check_buildflags_tag
.PHONY: install-strip install-no-strip strip libmdbx mdbx show-options .PHONY: install-strip install-no-strip strip libmdbx mdbx show-options lib-static lib-shared
ifeq ("$(origin V)", "command line") ifeq ("$(origin V)", "command line")
MDBX_BUILD_VERBOSE := $(V) MDBX_BUILD_VERBOSE := $(V)
@ -85,7 +85,7 @@ help:
@echo " make all - build libraries and tools" @echo " make all - build libraries and tools"
@echo " make help - print this help" @echo " make help - print this help"
@echo " make options - list build options" @echo " make options - list build options"
@echo " make lib - build libraries" @echo " make lib - build libraries, also lib-static and lib-shared"
@echo " make tools - built tools" @echo " make tools - built tools"
@echo " make clean " @echo " make clean "
@echo " make install " @echo " make install "
@ -172,7 +172,7 @@ else
endif endif
#< dist-cutoff-end #< dist-cutoff-end
lib libmdbx mdbx: libmdbx.a libmdbx.$(SO_SUFFIX) lib libs libmdbx mdbx: libmdbx.a libmdbx.$(SO_SUFFIX)
tools: $(TOOLS) tools: $(TOOLS)
@ -196,11 +196,11 @@ check_buildflags_tag:
buildflags.tag: check_buildflags_tag buildflags.tag: check_buildflags_tag
libmdbx.a: mdbx-static.o mdbx++-static.o lib-static libmdbx.a: mdbx-static.o mdbx++-static.o
@echo ' AR $@' @echo ' AR $@'
$(QUIET)$(AR) rcs $@ $? $(HUSH) $(QUIET)$(AR) rcs $@ $? $(HUSH)
libmdbx.$(SO_SUFFIX): mdbx-dylib.o mdbx++-dylib.o lib-shared libmdbx.$(SO_SUFFIX): mdbx-dylib.o mdbx++-dylib.o
@echo ' LD $@' @echo ' LD $@'
$(QUIET)$(CXX) $(CXXFLAGS) $^ -pthread -shared $(LDFLAGS) $(LIBS) -o $@ $(QUIET)$(CXX) $(CXXFLAGS) $^ -pthread -shared $(LDFLAGS) $(LIBS) -o $@

View File

@ -3,7 +3,8 @@
all help options \ all help options \
clean install install-no-strip install-strip strip tools uninstall \ clean install install-no-strip install-strip strip tools uninstall \
bench bench-clean bench-couple bench-quartet bench-triplet re-bench \ bench bench-clean bench-couple bench-quartet bench-triplet re-bench \
lib libmdbx mdbx mdbx_chk mdbx_copy mdbx_drop mdbx_dump mdbx_load mdbx_stat \ lib libs lib-static lib-shared \
libmdbx mdbx mdbx_chk mdbx_copy mdbx_drop mdbx_dump mdbx_load mdbx_stat \
check dist memcheck cross-gcc cross-qemu doxygen gcc-analyzer reformat \ check dist memcheck cross-gcc cross-qemu doxygen gcc-analyzer reformat \
release-assets tags test build-test mdbx_test smoke smoke-fault smoke-singleprocess \ release-assets tags test build-test mdbx_test smoke smoke-fault smoke-singleprocess \
test-asan test-leak test-singleprocess test-ubsan test-valgrind: test-asan test-leak test-singleprocess test-ubsan test-valgrind: