This commit is contained in:
lexborisov 2017-03-12 21:49:39 +03:00
parent 0ccabbd8b6
commit b3088f1c18
2 changed files with 17 additions and 10 deletions

View File

@ -6,8 +6,8 @@ CC ?= gcc
# ARGS
#
# MODEST_OPTIMIZATION_LEVEL, default -O2
# MODEST_BUILD_WITHOUT_THREADS, YES or (NO or undefined), default undefined
# MODEST_BUILD_DEBUG, default undefined
# MyCORE_BUILD_WITHOUT_THREADS, YES or (NO or undefined), default undefined
# MyCORE_BUILD_DEBUG, default undefined
#
.DEFAULT_GOAL := all
@ -51,6 +51,9 @@ include $(MODEST_BUILD_MODULES_MAKEFILES_LIST)
#********************
# Set ARGS for flags
#***************
MODEST_CFLAGS += -DMODEST_BUILD_OS=$(MODEST_BUILD_OS)
MODEST_CFLAGS += -DMODEST_PORT_NAME=$(MODEST_PORT_NAME)
override CFLAGS += $(MODEST_CFLAGS)
#********************

View File

@ -74,6 +74,17 @@ MODEST_LDFLAGS +=
OS ?= $(shell uname -s)
#********************
# Set -D
#***************
ifeq ($(MyCORE_BUILD_DEBUG),YES)
MODEST_CFLAGS += -g3 -ggdb3 -O0 -fno-omit-frame-pointer -DMyCORE_BUILD_DEBUG
endif
ifeq ($(MyCORE_BUILD_WITHOUT_THREADS),YES)
MODEST_CFLAGS += -DMyCORE_BUILD_WITHOUT_THREADS
endif
#********************
# Utils
#***************
@ -120,11 +131,6 @@ ifeq ($(OS),Darwin)
MODEST_BUILD_CLEAN_AFTER += rm -f $(call MODEST_LIBRARY_WITH_VERSION_MAJOR) $(MODEST_UTILS_NEW_LINE)
MODEST_BUILD_CLEAN_AFTER += rm -f $(call MODEST_LIBRARY_WITH_VERSION_MAJOR_MINOR) $(MODEST_UTILS_NEW_LINE)
# build without threads
ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
MODEST_CFLAGS += -DMODEST_BUILD_WITHOUT_THREADS
endif
# Need set
MODEST_BUILD_OS := $(OS)
# this name eq source/myport/<namedir>
@ -149,9 +155,7 @@ ifeq ($(MODEST_BUILD_OS),UNDEF)
MODEST_BUILD_CLEAN_AFTER += rm -f $(call MODEST_LIBRARY_WITH_VERSION_MAJOR_MINOR) $(MODEST_UTILS_NEW_LINE)
# build without threads
ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
MODEST_CFLAGS += -DMODEST_BUILD_WITHOUT_THREADS
else
ifneq ($(MyCORE_BUILD_WITHOUT_THREADS),YES)
MODEST_LDFLAGS += -pthread
endif