aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 17:01:55 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 17:01:55 +0100
commitb7433e108da26346c189888d0aa07ab0e896a709 (patch)
tree1b861b7fefc1ef791022f5694c105541563e3bf0 /Makefile
parentTweaked shadows (diff)
download42-cub3d-b7433e108da26346c189888d0aa07ab0e896a709.tar.gz
42-cub3d-b7433e108da26346c189888d0aa07ab0e896a709.tar.bz2
42-cub3d-b7433e108da26346c189888d0aa07ab0e896a709.tar.xz
42-cub3d-b7433e108da26346c189888d0aa07ab0e896a709.tar.zst
42-cub3d-b7433e108da26346c189888d0aa07ab0e896a709.zip
GNU libx
Diffstat (limited to '')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a7ff053..5feb222 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ SRCS_DIR = src/
OBJS_DIR = obj/
LFT_DIR = libft/
MLX_DIR = minilibx/
+MLX_GNU_DIR = minilibx_linux/
#==================================================================================================#
#---------------------------------------------- Files ---------------------------------------------#
#==================================================================================================#
@@ -151,12 +152,14 @@ ${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}
ifeq (${OS}, Darwin)
${CC} -c ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${MLX_DIR} -I${INCS_DIR} -o $@ $<
else
- ${CC} -c ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${INCS_DIR} -o $@ $<
+ ${CC} -c ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${MLX_GNU_DIR} -I${INCS_DIR} -o $@ $<
endif
#--------------------------------------------------------------------------------------------------#
${NAME}: ${OBJS} ${LFT_SRCS} ${LFT_DIR}${INCS_DIR}libft.h
ifeq (${OS}, Darwin)
@$(MAKE) --no-print-directory -C ${MLX_DIR} all
+else
+ @${MAKE} --no-print-directory -C ${MLX_GNU_DIR} all
endif
ifdef ASAN
@$(MAKE) --no-print-directory -C ${LFT_DIR} all ASAN=1
@@ -167,7 +170,7 @@ ifeq (${OS}, Darwin)
${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm \
-framework OpenGL -framework AppKit
else
- ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -lft -lX11 -lXext -lmlx -lm -lbsd
+ ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_GNU_DIR} -lft -lX11 -lXext -lmlx -lm -lbsd
endif
#--------------------------------------------------------------------------------------------------#
all: ${NAME}
@@ -175,6 +178,8 @@ all: ${NAME}
clean:
ifeq (${OS}, Darwin)
@$(MAKE) --no-print-directory -C ${MLX_DIR} clean
+else
+ @${MAKE} --no-print-directory -C ${MLX_GNU_DIR} clean
endif
@$(MAKE) --no-print-directory -C ${LFT_DIR} clean
${RM} ${OBJS_DIR}