From 3af341f2cf3aa86c38a9363bff49de5cf384b39e Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sat, 22 Feb 2020 14:50:05 +0100 Subject: Better makefile --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 90a09d7..60d2818 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,8 @@ SRCS_NAME += ft_key_loop.c SRCS = $(addprefix ${SRCS_DIR},${SRCS_NAME}) #--------------------------------------------------------------------------------------------------# OBJS = $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS}) +#--------------------------------------------------------------------------------------------------# +LFT_SRCS = $(shell find libft/src -name "*.c") #==================================================================================================# #--------------------------------------------- UNIX -----------------------------------------------# #==================================================================================================# @@ -122,7 +124,7 @@ else ${CC} -c ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${INCS_DIR} -o $@ $< endif #--------------------------------------------------------------------------------------------------# -${NAME}: ${OBJS} +${NAME}: ${OBJS} ${LFT_SRCS} ifeq (${OS}, Darwin) ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm -framework OpenGL \ -framework AppKit -- cgit v1.2.3