From 88b465a6ede0c7e889d2e7d4fa79e3e994c58607 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Mon, 16 Mar 2015 13:14:52 +0300 Subject: [PATCH] lmdb-tools: fir LTO-build - use CFLAGS and AR instead of directly. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2d0983ef..d84c8707 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,12 @@ CC = gcc W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized THREADS = -pthread -OPT = -O2 -g -CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS) +XCFLAGS ?= $(CFLAGS) +OPT = -O2 -g +CFLAGS := $(THREADS) $(OPT) $(W) $(XCFLAGS) LDLIBS = SOLIBS = -prefix = /usr/local +prefix ?= /usr/local ######################################################################## @@ -49,7 +50,7 @@ test: all ./mtest && ./mdb_stat testdb liblmdb.a: mdb.o midl.o - ar rs $@ mdb.o midl.o + $(AR) rs $@ mdb.o midl.o liblmdb.so: mdb.lo midl.lo # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)