From e67574a3e74c2f8340aa2ead168136cedb493735 Mon Sep 17 00:00:00 2001
From: JozanLeClerc <bousset.rudy@gmail.com>
Date: Sun, 23 Feb 2020 16:07:42 +0100
Subject: Fixed floating point exception

---
 libft/Makefile | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

(limited to 'libft')

diff --git a/libft/Makefile b/libft/Makefile
index 0af47bb..e22c78a 100644
--- a/libft/Makefile
+++ b/libft/Makefile
@@ -109,6 +109,13 @@ SRCS		= $(addprefix ${SRCS_DIR},${SRCS_NAME})
 #------------------------------------------------------------------------------#
 OBJS		= $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS})
 #==============================================================================#
+#--------------------------------- UNIX ---------------------------------------#
+#==============================================================================#
+MKDIR		= mkdir -p
+RM			= rm -rf
+OS			= $(shell uname)
+USER		= $(shell w | grep tty7 | awk '{print $$1}')
+#==============================================================================#
 #-------------------------------- Compiler ------------------------------------#
 #==============================================================================#
 DEBUG		= -glldb
@@ -128,7 +135,13 @@ ifdef ASAN
 endif
 #------------------------------------------------------------------------------#
 ifdef OPTI
-	CFLAGS	+= -march=ivybridge
+	ifeq (${USER}, salaaad)
+		CFLAGS	+= -march=broadwell
+	else ifeq (${USER}, jozan)
+		CFLAGS	+= -march=ivybridge
+	else
+		CFLAGS	+= -march=native
+	endif
 	CFLAGS	+= -O2
 	CFLAGS	+= -pipe
 endif
@@ -139,11 +152,6 @@ NAME		= libft.a
 #==============================================================================#
 AR			= ar rcs
 #==============================================================================#
-#--------------------------------- UNIX ---------------------------------------#
-#==============================================================================#
-MKDIR		= mkdir -p
-RM			= rm -rf
-#==============================================================================#
 #--------------------------------- Rules --------------------------------------#
 #==============================================================================#
 ${OBJS_DIR}%.o:		${SRCS_DIR}%.c ${INCS_DIR}${INCS}
-- 
cgit v1.2.3