Modest/Makefile.cfg
2017-03-10 10:36:54 +03:00

77 lines
2.0 KiB
INI

MODEST_BUILD_OS := UNDEF
# DEFAULT
MODEST_DIR_SEPARATOR ?= /
# names
# This variables used with "call" $(call MODEST_LIBRARY_WITH_VERSION),
# for use actual variables like a LIB_NAME_SUFFIX
MODEST_LIBRARY ?= $(LIB_DIR_BASE)/lib$(LIB_NAME)$(LIB_NAME_SUFFIX)
MODEST_LIBRARY_STATIC ?= $(LIB_DIR_BASE)/lib$(LIB_NAME)$(LIB_NAME_SUFFIX_STATIC)
MODEST_LIBRARY_WITH_VERSION = $(LIB_DIR_BASE)/lib$(LIB_NAME).$(MODEST_VERSION_STRING)$(LIB_NAME_SUFFIX)
MODEST_LIBRARY_STATIC_WITH_VERSION = $(LIB_DIR_BASE)/lib$(LIB_NAME).$(MODEST_VERSION_STRING)$(LIB_NAME_SUFFIX_STATIC)
MODEST_PORT_NAME ?= posix
# flags
MODEST_OPTIMIZATION_LEVEL ?= -O2
MODEST_CFLAGS += -I$(INCLUDE_DIR)
MODEST_LDFLAGS +=
OS ?= $(shell uname -s)
#*******************************
# Windows_NT
#*******************
ifeq ($(OS),Windows_NT)
CFLAGS += -fPIC
# Need set
MODEST_BUILD_OS := $(OS)
# this name eq source/myport/<namedir>
MODEST_PORT_NAME := windows
endif
# end of Windows_NT
#*******************************
# Darwin, Mac OS X
#*******************
ifeq ($(OS),Darwin)
MODEST_CFLAGS += -fPIC
MODEST_CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function --std=c99
LIB_NAME_SUFFIX := .dylib
# 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>
MODEST_PORT_NAME := posix
endif
# end of Darwin, Mac OS X
#*******************************
# POSIX
#*******************
ifeq ($(MODEST_BUILD_OS),UNDEF)
MODEST_CFLAGS += -fPIC
MODEST_CFLAGS += -D_POSIX_C_SOURCE=199309L
MODEST_CFLAGS += $(MODEST_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function --std=c99
# build without threads
ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
MODEST_CFLAGS += -DMODEST_BUILD_WITHOUT_THREADS
else
MODEST_LDFLAGS += -pthread
endif
# Need set
MODEST_BUILD_OS := $(OS)
# this name eq source/myport/<namedir>
MODEST_PORT_NAME := posix
endif
# end of POSIX