From 6ad30e234044cfb32a28ef9bd10b2625b6d044a6 Mon Sep 17 00:00:00 2001 From: afonso Date: Fri, 23 Feb 2024 11:35:56 +0000 Subject: [PATCH] [c] Changed makefile to support debug mode with clang compilation --- TPs/TP02/c/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/TPs/TP02/c/Makefile b/TPs/TP02/c/Makefile index 0443fb3..7c0bae4 100644 --- a/TPs/TP02/c/Makefile +++ b/TPs/TP02/c/Makefile @@ -1,10 +1,15 @@ CC=gcc -CFLAGS=-Wall -Wextra -O2 +CFLAGS=-Wall -O2 LDFLAGS=-lssl -lcrypto ARCH=$(shell uname -m) BIN=bin SRC=src +ifdef DEBUG + CC=/opt/homebrew/opt/llvm/bin/clang + CFLAGS+= -fsanitize=address -g +endif + ifeq ($(ARCH), arm64) # Mac ARM installation CFLAGS+= -I/opt/homebrew/opt/openssl@3.2/include