summaryrefslogtreecommitdiffstats
path: root/libft
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-08-01 21:25:09 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-08-01 21:25:09 +0200
commit8680737a802539f3c21a295ad45eb9be72c73f5f (patch)
tree337018ce1574f425847d5f1c089694f3e0996b1c /libft
parentMakefile update (diff)
download42-minishell-8680737a802539f3c21a295ad45eb9be72c73f5f.tar.gz
42-minishell-8680737a802539f3c21a295ad45eb9be72c73f5f.tar.bz2
42-minishell-8680737a802539f3c21a295ad45eb9be72c73f5f.tar.xz
42-minishell-8680737a802539f3c21a295ad45eb9be72c73f5f.tar.zst
42-minishell-8680737a802539f3c21a295ad45eb9be72c73f5f.zip
More UNIX friendly libft
Diffstat (limited to 'libft')
-rw-r--r--libft/Makefile15
-rw-r--r--libft/include/libft.h (renamed from libft/inc/libft.h)0
2 files changed, 12 insertions, 3 deletions
diff --git a/libft/Makefile b/libft/Makefile
index 6803f66..ac06d94 100644
--- a/libft/Makefile
+++ b/libft/Makefile
@@ -3,10 +3,11 @@ default: all
#--------------------------------- Shell --------------------------------------#
#==============================================================================#
SHELL := /bin/sh
+OS = $(shell uname)
#==============================================================================#
#------------------------------ Directories -----------------------------------#
#==============================================================================#
-INCS_DIR = inc/
+INCS_DIR = include/
SRCS_DIR = src/
OBJS_DIR = obj/
#==============================================================================#
@@ -120,9 +121,17 @@ OS = $(shell uname)
#==============================================================================#
#-------------------------------- Compiler ------------------------------------#
#==============================================================================#
-CC = clang
+ifeq (${OS}, FreeBSD)
+CC = /usr/bin/cc
+endif
+ifeq (${OS}, Linux)
+CC = /usr/bin/clang-9
+endif
+ifeq (${OS}, Darwin)
+CC = clang
+endif
#------------------------------------------------------------------------------#
-CFLAGS = -std=c89
+CFLAGS = -std=c89
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -Werror
diff --git a/libft/inc/libft.h b/libft/include/libft.h
index 5ddb471..5ddb471 100644
--- a/libft/inc/libft.h
+++ b/libft/include/libft.h