diff options
Diffstat (limited to 'libft/Makefile')
-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 |