From 6acfafec4dfa62a9258312fefe8eee6fd1fcd522 Mon Sep 17 00:00:00 2001 From: lexborisov Date: Wed, 1 Mar 2017 16:36:50 +0300 Subject: [PATCH] oh --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0ca3f2c..aeeb952 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ MODEST_OPTIMIZATION_LEVEL ?= -O2 CFLAGS ?= -Wall -Werror CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable --std=c99 -I$(SRCDIR) +LDFLAGS ?= -lm ifneq ($(OS),Windows_NT) CFLAGS += -fPIC @@ -31,7 +32,7 @@ ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES) CFLAGS += -DMODEST_BUILD_WITHOUT_THREADS -DMyHTML_BUILD_WITHOUT_THREADS else $(info Build with POSIX Threads) - CFLAGS += -pthread -lm + CFLAGS += -pthread endif ifeq ($(OS),Windows_NT) @@ -62,7 +63,7 @@ include $(TARGET)/modest/Makefile.mk OBJS := $(patsubst %.c,%.o,$(SRCS)) shared: $(OBJS) - $(CC) -shared $(IMP_FLAG) $(OBJS) $(LDFLAGS) -o $(LIB_TMP)/lib$(LIBNAME)$(LIBPOSTFIX) + $(CC) -shared $(IMP_FLAG) $(OBJS) -o $(LIB_TMP)/lib$(LIBNAME)$(LIBPOSTFIX) $(LDFLAGS) static: shared $(AR) crus $(LIB_TMP)/lib$(LIBNAME)$(LIBSTATIC_POSTFIX).a $(OBJS)