comparison Makefile.gen @ 267:2400c2fac4b1

Add Makefile option for building with ASAN.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 13 Feb 2021 12:33:46 +0200
parents f0e180b13e05
children 7276fe5efff6
comparison
equal deleted inserted replaced
266:c3c131a33023 267:2400c2fac4b1
1 ### 1 ###
2 ### Compiler flags 2 ### Compiler flags
3 ### 3 ###
4 CFLAGS += -O2 -W -Wall -Wextra 4 CFLAGS += -W -Wall -Wextra
5 CXXFLAGS += -O2 -W -Wall -Wextra -std=c++11 5 CXXFLAGS += -W -Wall -Wextra -std=c++11
6
7 ifneq ($(ASAN),)
8 XCFLAGS = -fsanitize=address
9 LDFLAGS += -lasan
10 else
11 XCFLAGS = -O2
12 endif
13
14 CFLAGS += $(XCFLAGS)
15 CXXFLAGS += $(XCFLAGS)
6 16
7 17
8 ### 18 ###
9 ### Tools, paths and directories 19 ### Tools, paths and directories
10 ### 20 ###