aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-09 14:31:57 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-09 14:31:57 +0100
commit4fa8a129e6ecfa168604568673cfbdaa2c8e34b0 (patch)
tree6e97965f1a32c007533eadb15becb4b9405867ea /Makefile
parentReverted map to normal size (diff)
download42-cub3d-4fa8a129e6ecfa168604568673cfbdaa2c8e34b0.tar.gz
42-cub3d-4fa8a129e6ecfa168604568673cfbdaa2c8e34b0.tar.bz2
42-cub3d-4fa8a129e6ecfa168604568673cfbdaa2c8e34b0.tar.xz
42-cub3d-4fa8a129e6ecfa168604568673cfbdaa2c8e34b0.tar.zst
42-cub3d-4fa8a129e6ecfa168604568673cfbdaa2c8e34b0.zip
Renamed minilibx
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 2e2b65b..cc7001c 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ INCS_DIR = inc/
SRCS_DIR = src/
OBJS_DIR = obj/
LFT_DIR = libft/
-MLX_DIR = libmlx/
+MLX_DIR = minilibx/
#==============================================================================#
#--------------------------------- Files --------------------------------------#
#==============================================================================#
@@ -44,6 +44,17 @@ SRCS = $(addprefix ${SRCS_DIR},${SRCS_NAME})
#------------------------------------------------------------------------------#
OBJS = $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS})
#==============================================================================#
+#--------------------------------- UNIX ---------------------------------------#
+#==============================================================================#
+MKDIR = mkdir -p
+RM = rm -rf
+OS = $(shell uname)
+ifeq (${OS}, Darwin)
+ SCR_SZE = 1980x1024
+else
+ SCR_SZE = $(shell xdpyinfo | grep dimensions | awk '{print $$2}')
+endif
+#==============================================================================#
#-------------------------------- Compiler ------------------------------------#
#==============================================================================#
CC = clang
@@ -67,17 +78,9 @@ else
NAME = a.out
endif
#==============================================================================#
-#--------------------------------- UNIX ---------------------------------------#
-#==============================================================================#
-MKDIR = mkdir -p
-RM = rm -rf
-OS = $(shell uname)
-SCR_SZE = $(shell xdpyinfo | grep dimensions | awk '{print $$2}')
-#==============================================================================#
#--------------------------------- Rules --------------------------------------#
#==============================================================================#
${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}${INCS}
- echo ${SCR_SIZE}
@${MKDIR} ${OBJS_DIR}
ifeq (${OS}, Darwin)
${CC} -c ${CFLAGS} -I${LFT_DIR}${INCS_DIR} -I${MLX_DIR} -I${INCS_DIR} -o $@ $<
@@ -97,12 +100,12 @@ endif
#------------------------------------------------------------------------------#
all:
ifeq (${OS}, Darwin)
- @$(MAKE) --no-print-directory -C ${MLX_DIR} all
+ @$(MAKE) --jobs 5 --no-print-directory -C ${MLX_DIR} all
endif
ifdef ASAN
- @$(MAKE) --no-print-directory -C ${LFT_DIR} all ASAN=1
+ @$(MAKE) --jobs 5 --no-print-directory -C ${LFT_DIR} all ASAN=1
else
- @$(MAKE) --no-print-directory -C ${LFT_DIR} all
+ @$(MAKE) --jobs 5 --no-print-directory -C ${LFT_DIR} all
endif
@$(MAKE) ${NAME}
#------------------------------------------------------------------------------#