diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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} |