From 628f816a236c0c3336e6e95ae237cf4953cc897e Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Mon, 31 Oct 2022 17:13:46 -0500 Subject: add debug opts to makefile, fix munmap error --- makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 8f28203..7bef8d1 100644 --- a/makefile +++ b/makefile @@ -15,10 +15,16 @@ so_minor := 1 CC=gcc -CFLAGS = -Wall -pedantic $(debug) +CFLAGS = -Wall -pedantic $(debug) $(opt) LDFLAGS := -lhts -lm -fPIC -# debug = -fsanitize=address -O2 -g + +ifeq ($(DEBUG),"1") + debug = -fsanitize=address -g +else + opt = -O2 +endif + SRC_EXT:=%.c _STD_BUILD=$(CC) $(CFLAGS) $(filter $(SRC_EXT) %.o, $^) -o $@ -- cgit v1.2.3