Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lexborisov/Modest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlexborisov <lex.borisov@gmail.com>2017-03-09 23:47:39 +0300
committerlexborisov <lex.borisov@gmail.com>2017-03-09 23:47:39 +0300
commit8669462c8c1c62de0869bc8472ab46faa9ad1fe7 (patch)
treeb61a647808e6ad955a409c03c1a48215ba3815a6 /Makefile.cfg
parent77991b6e779bfcf103d9babfbb9a49c8d28b1864 (diff)
Refactoring Threads and Makefile
Diffstat (limited to 'Makefile.cfg')
-rw-r--r--Makefile.cfg69
1 files changed, 69 insertions, 0 deletions
diff --git a/Makefile.cfg b/Makefile.cfg
new file mode 100644
index 0000000..fc750bb
--- /dev/null
+++ b/Makefile.cfg
@@ -0,0 +1,69 @@
+MODEST_BUILD_OS := UNDEF
+
+# DEFAULT
+MODEST_DIR_SEPARATOR ?= /
+
+# names
+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_PORT_NAME ?= posix
+
+# flags
+MODEST_CFLAGS := -I$(INCLUDE_DIR)
+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)
+ CFLAGS += -fPIC
+
+ LIB_NAME_SUFFIX := .dylib
+
+# build without threads
+ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
+ MODEST_CFLAGS += -DMODEST_BUILD_WITHOUT_THREADS
+else
+ MODEST_LFLAGS += -pthread
+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
+
+# build without threads
+ifeq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
+ MODEST_CFLAGS += -DMODEST_BUILD_WITHOUT_THREADS
+else
+ MODEST_LFLAGS += -pthread
+endif
+
+ # Need set
+ MODEST_BUILD_OS := $(OS)
+ # this name eq source/myport/<namedir>
+ MODEST_PORT_NAME := posix
+endif
+# end of POSIX