Small improvement to Makefile.
This commit is contained in:
parent
13e9420ca1
commit
0043b907a7
16
Makefile
16
Makefile
@ -3,6 +3,7 @@
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
|
NALYZE ?= 0
|
||||||
ASAN ?= 0
|
ASAN ?= 0
|
||||||
STATIC ?= 0
|
STATIC ?= 0
|
||||||
FLTO ?= 0
|
FLTO ?= 0
|
||||||
@ -22,17 +23,17 @@ SUBDIR_LIB := libslunkcrypt
|
|||||||
# Flags
|
# Flags
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
CFLAGS = -I$(SUBDIR_LIB)/include -std=gnu99 -Wall -march=$(MARCH) -mtune=$(MTUNE)
|
CONFIG =
|
||||||
LDFLGS =
|
LDFLGS =
|
||||||
|
CFLAGS = -I$(SUBDIR_LIB)/include -std=gnu99 -Wall -march=$(MARCH) -mtune=$(MTUNE)
|
||||||
|
|
||||||
ifeq ($(DEBUG),1)
|
ifneq ($(ASAN),0)
|
||||||
|
CONFIG := _a
|
||||||
|
CFLAGS += -O1 -g -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
|
else ifneq ($(DEBUG),0)
|
||||||
CONFIG := _g
|
CONFIG := _g
|
||||||
CFLAGS += -Og -g
|
CFLAGS += -Og -g
|
||||||
else ifeq ($(ASAN),1)
|
|
||||||
CONFIG := _a
|
|
||||||
CFLAGS += -O1 -g -fsanitize=address -fno-omit-frame-pointer
|
|
||||||
else
|
else
|
||||||
CONFIG :=
|
|
||||||
CFLAGS += -O3 -DNDEBUG
|
CFLAGS += -O3 -DNDEBUG
|
||||||
ifneq ($(FLTO),0)
|
ifneq ($(FLTO),0)
|
||||||
CFLAGS += -flto -fuse-linker-plugin
|
CFLAGS += -flto -fuse-linker-plugin
|
||||||
@ -41,6 +42,9 @@ ifneq ($(FPGO),0)
|
|||||||
CFLAGS += -fprofile-$(FPGO)
|
CFLAGS += -fprofile-$(FPGO)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(NALYZE),0)
|
||||||
|
CFLAGS += -fanalyzer
|
||||||
|
endif
|
||||||
|
|
||||||
MACHINE := $(shell $(CC) -dumpmachine)
|
MACHINE := $(shell $(CC) -dumpmachine)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user