aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index cea6294..4c176d9 100644
--- a/Makefile
+++ b/Makefile
@@ -113,27 +113,24 @@ ifdef ASAN
CFLAGS += ${FSANITIZE}
endif
#--------------------------------------------------------------------------------------------------#
-CDEFS = -DFT_SCR_SIZE=\"${SCR_SZE}\"
+CDEFS = -D_POSIX_C_SOURCE
+CDEFS += -DFT_SCR_SIZE=\"${SCR_SZE}\"
ifeq (${OS}, Darwin)
CDEFS += -DFT_OS=1
else
CDEFS += -DFT_OS=2
endif
#--------------------------------------------------------------------------------------------------#
-ifeq (${OS}, Darwin)
- NAME = Cub3D
-else
- NAME = a.out
-endif
+NAME = Cub3D
#==================================================================================================#
#------------------------------------------ Rules -------------------------------------------------#
#==================================================================================================#
${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}
@${MKDIR} ${OBJS_DIR}
ifeq (${OS}, Darwin)
- ${CC} -c -pthread ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${MLX_DIR} -I${INCS_DIR} -o $@ $<
+ ${CC} -c ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${MLX_DIR} -I${INCS_DIR} -o $@ $<
else
- ${CC} -c -pthread ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${INCS_DIR} -o $@ $<
+ ${CC} -c ${CFLAGS} ${CDEFS} -I${LFT_DIR}${INCS_DIR} -I${INCS_DIR} -o $@ $<
endif
#--------------------------------------------------------------------------------------------------#
${NAME}: ${OBJS} ${LFT_SRCS} ${LFT_DIR}${INCS_DIR}libft.h
@@ -149,10 +146,10 @@ else
@$(MAKE) --no-print-directory -C ${LFT_DIR} all
endif
ifeq (${OS}, Darwin)
- ${CC} -pthread ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm -lpthread \
+ ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm \
-framework OpenGL -framework AppKit
else
- ${CC} -pthread ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -lft -lX11 -lXext -lmlx -lm -lbsd -lpthread
+ ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -lft -lX11 -lXext -lmlx -lm -lbsd
endif
#--------------------------------------------------------------------------------------------------#
all: ${NAME}