2017-03-11 22:53:26 +03:00
|
|
|
BINARY_BUILD_OS := UNDEF
|
|
|
|
|
|
|
|
# library config
|
|
|
|
BINARY_PATH_RELATIVE ?= .
|
|
|
|
include $(BINARY_PATH_RELATIVE)/Makefile.cfg
|
|
|
|
|
|
|
|
# uses
|
|
|
|
BINARY_LIBRARIES += $(BINARY_PATH_RELATIVE)/$(call MODEST_LIBRARY_STATIC)
|
|
|
|
|
|
|
|
# flags
|
|
|
|
BINARY_OPTIMIZATION_LEVEL ?= -O2
|
|
|
|
BINARY_CFLAGS += -I$(BINARY_PATH_RELATIVE)/$(INCLUDE_DIR_API)
|
|
|
|
BINARY_LDFLAGS +=
|
|
|
|
|
|
|
|
#*******************************
|
|
|
|
# Windows_NT
|
|
|
|
#*******************
|
|
|
|
ifeq ($(OS),Windows_NT)
|
2017-03-13 18:02:31 +03:00
|
|
|
BINARY_CFLAGS += -Wno-unused-variable -Wno-unused-function -std=c99
|
2017-03-11 22:53:26 +03:00
|
|
|
endif
|
|
|
|
# end of Windows_NT
|
|
|
|
|
|
|
|
#*******************************
|
|
|
|
# Darwin, Mac OS X
|
|
|
|
#*******************
|
|
|
|
ifeq ($(OS),Darwin)
|
|
|
|
BINARY_CFLAGS += -fPIC
|
2017-03-13 18:02:31 +03:00
|
|
|
BINARY_CFLAGS += $(BINARY_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function -std=c99
|
2017-03-11 22:53:26 +03:00
|
|
|
endif
|
|
|
|
# end of Darwin, Mac OS X
|
|
|
|
|
|
|
|
#*******************************
|
|
|
|
# POSIX
|
|
|
|
#*******************
|
|
|
|
ifeq ($(MODEST_BUILD_OS),UNDEF)
|
|
|
|
BINARY_CFLAGS += -fPIC
|
|
|
|
BINARY_CFLAGS += -D_POSIX_C_SOURCE=199309L
|
2017-03-13 18:02:31 +03:00
|
|
|
BINARY_CFLAGS += $(BINARY_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function -std=c99
|
2017-03-11 22:53:26 +03:00
|
|
|
BINARY_LIBRARIES += -lm
|
|
|
|
|
|
|
|
# build without threads
|
|
|
|
ifneq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
|
|
|
|
BINARY_LDFLAGS += -pthread
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
# end of POSIX
|