From 4a54eecead42d47782652615dc4010442f65ec69 Mon Sep 17 00:00:00 2001 From: lexborisov Date: Thu, 9 Mar 2017 23:53:29 +0300 Subject: [PATCH] Makefile --- Makefile | 4 ---- Makefile.cfg | 9 ++++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b84fd78..7b839c5 100644 --- a/Makefile +++ b/Makefile @@ -15,11 +15,7 @@ CC ?= gcc #******************** # Flags #*************** -MODEST_OPTIMIZATION_LEVEL ?= -O2 - MODEST_CFLAGS ?= -Wall -Werror -MODEST_CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable --std=c99 -I$(SRCDIR) - MODEST_LFLAGS ?= #******************** diff --git a/Makefile.cfg b/Makefile.cfg index fc750bb..d813824 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -9,7 +9,8 @@ MODEST_LIBRARY_STATIC ?= $(LIB_DIR_BASE)/lib$(LIB_NAME)$(LIB_NAME_SUFFIX_STATIC) MODEST_PORT_NAME ?= posix # flags -MODEST_CFLAGS := -I$(INCLUDE_DIR) +MODEST_OPTIMIZATION_LEVEL ?= -O2 +MODEST_CFLAGS += -I$(INCLUDE_DIR) OS ?= $(shell uname -s) #******************************* @@ -29,7 +30,8 @@ endif # Darwin, Mac OS X #******************* ifeq ($(OS),Darwin) - CFLAGS += -fPIC + MODEST_CFLAGS += -fPIC + MODEST_CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable --std=c99 LIB_NAME_SUFFIX := .dylib @@ -53,7 +55,8 @@ endif ifeq ($(MODEST_BUILD_OS),UNDEF) MODEST_CFLAGS += -fPIC MODEST_CFLAGS += -D_POSIX_C_SOURCE=199309L - + MODEST_CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable --std=c99 + # build without threads ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES) MODEST_CFLAGS += -DMODEST_BUILD_WITHOUT_THREADS