From 650e83573987d004171f250e236b21b243477355 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 14:57:54 +0100 Subject: is not working --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7b374c8..9fbd0f2 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,11 @@ INCS_DIR = inc/ SRCS_DIR = src/ OBJS_DIR = obj/ LFT_DIR = libft/ -MLX_DIR = minilibx/ +ifdef BETA + MLX_DIR = minilibx_beta/ +else + MLX_DIR = minilibx/ +endif #==================================================================================================# #---------------------------------------------- Files ---------------------------------------------# #==================================================================================================# @@ -95,6 +99,7 @@ LFT_SRCS = $(shell find libft/src -name "*.c") #==================================================================================================# MKDIR = mkdir -p RM = rm -rf +MV = mv OS = $(shell uname) ifeq (${OS}, Darwin) SCR_SZE = $(shell osascript -e 'tell application "Finder" to get bounds of window of desktop' \ @@ -153,6 +158,9 @@ endif ${NAME}: ${OBJS} ${LFT_SRCS} ${LFT_DIR}${INCS_DIR}libft.h ifeq (${OS}, Darwin) @$(MAKE) --no-print-directory -C ${MLX_DIR} all +ifdef BETA + ${MV} ${MLX_DIR}libmlx.dylib ./ +endif endif ifdef ASAN @$(MAKE) --no-print-directory -C ${LFT_DIR} all ASAN=1 @@ -160,8 +168,12 @@ else @$(MAKE) --no-print-directory -C ${LFT_DIR} all endif ifeq (${OS}, Darwin) +ifdef BETA + ${CC} ${CFLAGS} -o $@ ${OBJS} -rpath ${MLX_DIR}libmlx.dylib -rpath /usr/lib/libSystem.B.dylib -L${LFT_DIR} -L./ -lft -lmlx -lm +else ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm \ -framework OpenGL -framework AppKit +endif else ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -lft -lX11 -lXext -lmlx -lm -lbsd endif @@ -171,6 +183,9 @@ all: ${NAME} clean: ifeq (${OS}, Darwin) @$(MAKE) --no-print-directory -C ${MLX_DIR} clean +ifdef BETA + ${RM} libmlx.dylib +endif endif @$(MAKE) --no-print-directory -C ${LFT_DIR} clean ${RM} ${OBJS_DIR} -- cgit v1.2.3