aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-22 14:50:05 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-22 14:50:05 +0100
commit3af341f2cf3aa86c38a9363bff49de5cf384b39e (patch)
treeceb8028d3b449ab0ed8c4d292136fcf9ff6148bb /Makefile
parentnul (diff)
download42-cub3d-3af341f2cf3aa86c38a9363bff49de5cf384b39e.tar.gz
42-cub3d-3af341f2cf3aa86c38a9363bff49de5cf384b39e.tar.bz2
42-cub3d-3af341f2cf3aa86c38a9363bff49de5cf384b39e.tar.xz
42-cub3d-3af341f2cf3aa86c38a9363bff49de5cf384b39e.tar.zst
42-cub3d-3af341f2cf3aa86c38a9363bff49de5cf384b39e.zip
Better makefile
Diffstat (limited to '')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
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