mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-29 08:48:48 +08:00
mdbx-make: add install-strip
and install-no-strip
targets.
Resolves https://github.com/erthink/libmdbx/pull/180
This commit is contained in:
parent
c77494e2aa
commit
50e729a687
20
GNUmakefile
20
GNUmakefile
@ -26,6 +26,7 @@ mandir ?= $(prefix)/man
|
||||
# lib/bin suffix for multiarch/biarch, e.g. '.x86_64'
|
||||
suffix ?=
|
||||
|
||||
INSTALL ?= install
|
||||
CC ?= gcc
|
||||
CFLAGS_EXTRA ?=
|
||||
LD ?= ld
|
||||
@ -60,7 +61,7 @@ LIBRARIES := libmdbx.a libmdbx.$(SO_SUFFIX)
|
||||
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
|
||||
|
||||
.PHONY: mdbx all install clean
|
||||
.PHONY: mdbx all install install-strip install-no-strip clean
|
||||
|
||||
all: $(LIBRARIES) $(TOOLS)
|
||||
|
||||
@ -421,12 +422,19 @@ cross-qemu:
|
||||
done
|
||||
|
||||
#< dist-cutoff-end
|
||||
|
||||
install: $(LIBRARIES) $(TOOLS) $(HEADERS)
|
||||
install -D -p -s -t $(DESTDIR)$(prefix)/bin$(suffix) $(TOOLS) && \
|
||||
install -D -p -s -t $(DESTDIR)$(prefix)/lib$(suffix) $(filter-out libmdbx.a,$(LIBRARIES)) && \
|
||||
install -D -p -t $(DESTDIR)$(prefix)/lib$(suffix) libmdbx.a && \
|
||||
install -D -p -m 444 -t $(DESTDIR)$(prefix)/include $(HEADERS) && \
|
||||
install -D -p -m 444 -t $(DESTDIR)$(mandir)/man1 $(addprefix $(MAN_SRCDIR), $(MANPAGES))
|
||||
$(INSTALL) -D -p $(EXE_INSTALL_FLAGS) -t $(DESTDIR)$(prefix)/bin$(suffix) $(TOOLS) && \
|
||||
$(INSTALL) -D -p $(EXE_INSTALL_FLAGS) -t $(DESTDIR)$(prefix)/lib$(suffix) $(filter-out libmdbx.a,$(LIBRARIES)) && \
|
||||
$(INSTALL) -D -p -t $(DESTDIR)$(prefix)/lib$(suffix) libmdbx.a && \
|
||||
$(INSTALL) -D -p -m 444 -t $(DESTDIR)$(prefix)/include $(HEADERS) && \
|
||||
$(INSTALL) -D -p -m 444 -t $(DESTDIR)$(mandir)/man1 $(addprefix $(MAN_SRCDIR), $(MANPAGES))
|
||||
|
||||
install-strip: EXE_INSTALL_FLAGS = -s
|
||||
install-strip: install
|
||||
|
||||
install-no-strip: EXE_INSTALL_FLAGS =
|
||||
install-no-strip: install
|
||||
|
||||
uninstall:
|
||||
rm -f $(addprefix $(DESTDIR)$(prefix)/bin$(suffix)/,$(TOOLS)) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user