diff options
author | joe <rbousset@42lyon.fr> | 2020-11-25 12:55:35 +0100 |
---|---|---|
committer | joe <rbousset@42lyon.fr> | 2020-11-25 12:55:35 +0100 |
commit | 1f184f8901c76570502ae3f2ff495a342e2d53b2 (patch) | |
tree | 406e500da30de1ca3254996da52181634f6dbb32 | |
parent | less retarded Makefile (diff) | |
download | 42-minishell-1f184f8901c76570502ae3f2ff495a342e2d53b2.tar.gz 42-minishell-1f184f8901c76570502ae3f2ff495a342e2d53b2.tar.bz2 42-minishell-1f184f8901c76570502ae3f2ff495a342e2d53b2.tar.xz 42-minishell-1f184f8901c76570502ae3f2ff495a342e2d53b2.tar.zst 42-minishell-1f184f8901c76570502ae3f2ff495a342e2d53b2.zip |
Less retaded libft Makefiler
-rw-r--r-- | libft/Makefile | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libft/Makefile b/libft/Makefile index 94ef43b..5498983 100644 --- a/libft/Makefile +++ b/libft/Makefile @@ -131,13 +131,13 @@ OS = $(shell uname) #-------------------------------- Compiler ------------------------------------# #==============================================================================# ifeq (${OS}, FreeBSD) -CC = /usr/bin/cc +CC = cc endif ifeq (${OS}, Linux) -CC = /usr/bin/clang +CC = clang endif ifeq (${OS}, Darwin) -CC = clang +CC = cc endif #------------------------------------------------------------------------------# CFLAGS = -std=c89 @@ -154,14 +154,16 @@ AR = ar rcs #==============================================================================# #--------------------------------- Rules --------------------------------------# #==============================================================================# -${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}${INCS} - @${MKDIR} ${OBJS_DIR} +${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}${INCS} ${CC} -c ${CFLAGS} -I${INCS_DIR} -o $@ $< #------------------------------------------------------------------------------# -${NAME}: ${OBJS} +${OBJS_DIR}: + ${MKDIR} ${OBJS_DIR} +#------------------------------------------------------------------------------# +${NAME}: ${OBJS} ${AR} ${NAME} ${OBJS} #------------------------------------------------------------------------------# -all: ${NAME} +all: ${OBJS_DIR} ${NAME} #------------------------------------------------------------------------------# debug: CFLAGS += -glldb debug: all |