From f9bbbc0211caaaf835fbaceb78f5b8d3417dfb44 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 9 Mar 2020 00:03:59 +0100 Subject: The smartest Makefile --- libft/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'libft') diff --git a/libft/Makefile b/libft/Makefile index 35c2b88..1f93f13 100644 --- a/libft/Makefile +++ b/libft/Makefile @@ -119,19 +119,27 @@ USER = $(shell w | grep tty7 | awk '{print $$1}') #==============================================================================# #-------------------------------- Compiler ------------------------------------# #==============================================================================# -DEBUG = -glldb +ifeq (${OS}, Darwin) + DEBUG = -glldb +else + DEBUG = -ggdb +endif FSANITIZE = -fsanitize=address #------------------------------------------------------------------------------# -CC = clang +ifeq (${OS}, Darwin) + CC = clang +else + CC = gcc +endif #------------------------------------------------------------------------------# CFLAGS = -std=c89 CFLAGS += -Wall CFLAGS += -Wextra CFLAGS += -Werror CFLAGS += -pedantic -CFLAGS += ${DEBUG} #------------------------------------------------------------------------------# ifdef ASAN + CFLAGS += ${DEBUG} CFLAGS += ${FSANITIZE} endif #------------------------------------------------------------------------------# -- cgit v1.2.3