-
Notifications
You must be signed in to change notification settings - Fork 77
/
Makefile_helper.mk.in
69 lines (59 loc) · 1.89 KB
/
Makefile_helper.mk.in
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Makefile_helper.mk.in
#
# This file is auto-converted to Makefile_helper.mk by ./configure
#
# definitions for colorized output
COLOR_RED = "\033[0;31m"
COLOR_GREEN = "\033[0;32m"
COLOR_YELLOW = "\033[0;33m"
COLOR_OFF = "\033[0m"
# The variable use_no_gnu_unique controls the compiler option with the
# corresponding name, which is needed to compile the libmerc.so shared
# object library
#
use_no_gnu_unique = @USE_NO_GNU_UNIQUE@
# The variable use_fsanitize controls the compiler option with the
# corresponding name, which is used when present in some build targets
#
use_fsanitize = @USE_FSANITIZE@
# The variable openssl_newer controls the compiler option with the
# corresponding name, which controls which openssl functions are used
# depending on availablity
#
openssl_newer = @OPENSSL_NEWER@
# The variable is_macos controls certain options specfic for MacOS
#
is_macos = @IS_MACOS@
# The variable is_macos_arm controls compiler flags for additional include and lib paths
# for Apple Silicon, specifically the homebrew specific paths
#
is_macos_arm = @IS_MACOS_ARM@
CXX = @CXX@
CC = @CC@
CFLAGS = --std=c++17
CFLAGS += -O3
# CFLAGS += -march=x86-64 -mtune=generic
CFLAGS += -Wall -Wextra -Wno-deprecated $(CDEFS) $(MSV)
CFLAGS += -Wno-missing-braces # this flag squelches a gcc bug that causes a spurious warning
CFLAGS += -Wno-narrowing # needed for oid.h to suppress spurious (un)signed char error
# extra flags
CFLAGS += -fno-rtti
CFLAGS += -Wformat
CLFAGS += -Wformat-security
CFLAGS += -Wno-deprecated-declarations
CFLAGS += -Wno-long-long
CFLAGS += -Wmissing-noreturn
CFLAGS += -Wunreachable-code
CFLAGS += -fvisibility=hidden
CFLAGS += -DNDEBUG
# CFLAGS += -g
# CFLAGS += -ggdb
CFLAGS += -fno-builtin-malloc
CFLAGS += -fno-builtin-calloc
CFLAGS += -fno-builtin-realloc
CFLAGS += -fno-builtin-free
ifeq ($(use_no_gnu_unique),yes)
CFLAGS += -fno-gnu-unique
endif
CFLAGS += $(OPTFLAGS)
# EOF