mdbx: less mad in the Makefile.

Change-Id: Iec6a7546424b1e2954cd3c21805ddf01cc77d93e
This commit is contained in:
Leo Yuriev 2015-12-01 18:45:18 +03:00
parent a7a28ecdb4
commit a0d056e47e

View File

@ -1,4 +1,4 @@
# Makefile for libmdbx (lightning memory-mapped database library for Linux). # GNU Makefile for libmdbx (lightning memory-mapped database library for Linux).
######################################################################## ########################################################################
# Configuration. The compiler options must enable threaded compilation. # Configuration. The compiler options must enable threaded compilation.
@ -13,13 +13,15 @@
# There may be other macros in mdb.c of interest. You should # There may be other macros in mdb.c of interest. You should
# read mdb.c before changing any of them. # read mdb.c before changing any of them.
# #
CC ?= gcc DESTDIR ?=
XCFLAGS ?=
CFLAGS ?= -O2 -g -Wall -Werror -Wno-unused-parameter
CFLAGS += -pthread $(XCFLAGS)
prefix ?= /usr/local prefix ?= /usr/local
mandir ?= $(prefix)/man mandir ?= $(prefix)/man
CC ?= gcc
XCFLAGS ?=
CFLAGS ?= -O2 -g -Wall -Werror -Wno-unused-parameter
CFLAGS += -pthread $(XCFLAGS)
######################################################################## ########################################################################
IHDRS := lmdb.h mdbx.h IHDRS := lmdb.h mdbx.h
@ -40,14 +42,14 @@ mdbx: libmdbx.a libmdbx.so
lmdb: liblmdb.a liblmdb.so lmdb: liblmdb.a liblmdb.so
install: $(ILIBS) $(IPROGS) $(IHDRS) install: $(ILIBS) $(IPROGS) $(IHDRS)
mkdir -p $(DESTDIR)$(prefix)/bin mkdir -p $(DESTDIR)$(prefix)/bin \
mkdir -p $(DESTDIR)$(prefix)/lib && cp -t $(DESTDIR)$(prefix)/bin $(IPROGS) && \
mkdir -p $(DESTDIR)$(prefix)/include mkdir -p $(DESTDIR)$(prefix)/lib \
mkdir -p $(DESTDIR)$(prefix)/man/man1 && cp -t $(DESTDIR)$(prefix)/lib $(ILIBS) && \
for f in $(IPROGS); do cp $$f $(DESTDIR)$(prefix)/bin; done mkdir -p $(DESTDIR)$(prefix)/include \
for f in $(ILIBS); do cp $$f $(DESTDIR)$(prefix)/lib; done && cp -t $(DESTDIR)$(prefix)/include $(IHDRS) && \
for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include; done mkdir -p $(DESTDIR)$(mandir)/man1 \
for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done && cp -t $(DESTDIR)$(mandir)/man1 $(IDOCS)
clean: clean:
rm -rf $(PROGS) @* *.[ao] *.[ls]o *~ testdb/* *.gcov rm -rf $(PROGS) @* *.[ao] *.[ls]o *~ testdb/* *.gcov