-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathMakefile_helper.mk.in
More file actions
99 lines (84 loc) · 3.12 KB
/
Makefile_helper.mk.in
File metadata and controls
99 lines (84 loc) · 3.12 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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 use_no_omit_leaf_frame_pointer controls the compiler option with
# the corresponding name, which preserves frame pointers in leaf functions
#
use_no_omit_leaf_frame_pointer = @USE_NO_OMIT_LEAF_FRAME_POINTER@
# The variable openssl_v1_1_or_newer indicates if OpenSSL 1.1.0+ is available,
# which controls which openssl functions are used depending on availability
#
openssl_v1_1_or_newer = @OPENSSL_V1_1_OR_NEWER@
# The variable openssl_v3_0_or_newer indicates if OpenSSL 3.0+ is available
# and controls the EVP_MAC API compiler flag
#
openssl_v3_0_or_newer = @OPENSSL_V3_0_OR_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@
#The variable platform is used to represent intel or arm based architecture.
# platform=intel for intel based platform
# =arm for arm based platform
# =unknown otherwise
platform = @PLATFORM@
# The variable have_xsimd indicates if the xsimd header-only library is
# available on the system, which enables SIMD-accelerated classifier path
#
have_xsimd = @HAVE_XSIMD@
# If xsimd was found via --with-xsimd-include=DIR, this holds the path.
# Used to add -I<path> in the consuming Makefiles.
#
xsimd_include = @XSIMD_INCLUDE@
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
CFLAGS += -Wformat-security
CFLAGS += -Wno-deprecated-declarations
CFLAGS += -Wno-long-long
CFLAGS += -Wmissing-noreturn
CFLAGS += -Wunreachable-code
CFLAGS += -Wno-psabi
CFLAGS += -fvisibility=hidden
CFLAGS += -DNDEBUG
CFLAGS += -g # always include debug symbols even in optimized builds
# CFLAGS += -ggdb
CFLAGS += -fno-omit-frame-pointer # preserve frame pointer for better stack traces
ifeq ($(use_no_omit_leaf_frame_pointer),yes)
CFLAGS += -mno-omit-leaf-frame-pointer # also preserve in leaf functions
endif
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