1 UNAME
:= $(strip $(shell uname
))
3 $(error Operating system could not be detected
!)
6 DUMPMACHINE
:= $(strip $(shell $(CC
) -dumpmachine
))
8 $(error C compiler could not be detected
!)
15 XCFLAGS
= -O1
-g
-fsanitize
=address
-fno-omit-frame-pointer
16 XLDFLAGS
+= -static-libasan
18 XCFLAGS
= -Ofast
-DNDEBUG
22 ifneq ($(firstword $(filter x86_64-
%,$(DUMPMACHINE
))),)
23 XCFLAGS
+= -march
=x86-64
-mtune
=nocona
24 else ifneq ($(firstword $(filter i686-
%,$(DUMPMACHINE
))),)
25 XCFLAGS
+= -march
=pentiumpro
-mtune
=intel
28 ifneq ($(firstword $(filter %-mingw32
%-windows-gnu
%-cygwin
,$(DUMPMACHINE
))),)
29 DLL_LDFLAGS
= -shared
-Wl
,--out-implib
,$@.a
32 ifneq ($(firstword $(filter i686-
%,$(DUMPMACHINE
))),)
33 XLDFLAGS
+= -Wl
,--large-address-aware
36 ifneq ($(findstring -apple-darwin
,$(DUMPMACHINE
)),)
37 DLL_LDFLAGS
= -dynamiclib
54 XLDFLAGS
+= -Wl
,--strip-all
55 DLL_LDFLAGS
+= -Wl
,--strip-all
58 ifneq ($(firstword $(filter MINGW32_NT-
% MINGW64_NT-
% CYGWIN_NT-
%,$(UNAME
))),)
61 ifneq ($(firstword $(UNAME
)),Darwin
)
62 ENV_LDPATH
:= LD_LIBRARY_PATH
64 ENV_LDPATH
:= DYLD_LIBRARY_PATH