From 1f184f8901c76570502ae3f2ff495a342e2d53b2 Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 25 Nov 2020 12:55:35 +0100 Subject: Less retaded libft Makefiler --- libft/Makefile | 16 +++++++++------- 1 file 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 -- cgit v1.2.3