-
Notifications
You must be signed in to change notification settings - Fork 65
/
Makefile.bin.cfg
53 lines (43 loc) · 1.25 KB
/
Makefile.bin.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 +=
BINARY_BUILD_OS ?= UNDEF
#*******************************
# Windows_NT
#*******************
ifeq ($(OS),Windows_NT)
BINARY_CFLAGS += -Wno-unused-variable -Wno-unused-function -std=c99
BINARY_BUILD_OS := $(OS)
endif
# end of Windows_NT
#*******************************
# Darwin, Mac OS X
#*******************
ifeq ($(OS),Darwin)
BINARY_CFLAGS += -fPIC
BINARY_CFLAGS += $(BINARY_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function -std=c99
BINARY_BUILD_OS := $(OS)
endif
# end of Darwin, Mac OS X
#*******************************
# POSIX
#*******************
ifeq ($(BINARY_BUILD_OS),UNDEF)
BINARY_CFLAGS += -fPIC
BINARY_CFLAGS += -D_POSIX_C_SOURCE=199309L
BINARY_CFLAGS += $(BINARY_OPTIMIZATION_LEVEL) -Wno-unused-variable -Wno-unused-function -std=c99
BINARY_LIBRARIES += -lm
# build without threads
ifneq ($(MODEST_BUILD_WITHOUT_THREADS),YES)
BINARY_LIBRARIES += -pthread
endif
BINARY_BUILD_OS := $(OS)
endif
# end of POSIX