[c] Changed makefile to support debug mode with clang compilation

This commit is contained in:
Afonso Franco 2024-02-23 11:35:56 +00:00
parent 7ea5e9c6e0
commit 6ad30e2340
Signed by: afonso
SSH key fingerprint: SHA256:JiuxZNdA5bRWXPMUJChI0AQ75yC+cXY4xM0IaVwEVys

View file

@ -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