aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 13:32:40 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-05 13:32:40 +0100
commitd1097088999c538601158805cf77250d51513f98 (patch)
tree731f010c02189ff0df4530640a2d30e50160a80a /Makefile
parentScale (diff)
download42-cub3d-d1097088999c538601158805cf77250d51513f98.tar.gz
42-cub3d-d1097088999c538601158805cf77250d51513f98.tar.bz2
42-cub3d-d1097088999c538601158805cf77250d51513f98.tar.xz
42-cub3d-d1097088999c538601158805cf77250d51513f98.tar.zst
42-cub3d-d1097088999c538601158805cf77250d51513f98.zip
Don't mess with me boy
Diffstat (limited to '')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5a9900b..4b7afbb 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@ SRCS_NAME += ft_exit.c
SRCS_NAME += ft_drawsquare.c
SRCS_NAME += ft_parse_map.c
SRCS_NAME += ft_select_get.c
+SRCS_NAME += ft_get_screen_size.c
SRCS_NAME += ft_get_res.c
SRCS_NAME += ft_get_tex.c
SRCS_NAME += ft_get_sprite.c
@@ -50,6 +51,7 @@ CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -Werror
CFLAGS += -pedantic
+CFLAGS += -DFT_SCR_SIZE=\"${SCR_SZE}\"
ifdef ASAN
CFLAGS += ${DEBUG}
CFLAGS += ${FSANITIZE}
@@ -69,10 +71,14 @@ endif
MKDIR = mkdir -p
RM = rm -rf
OS = $(shell uname)
+ifeq (${OS}, Darwin)
+ SCR_SZE = $(shell xdpyinfo | grep dimensions | awk '{print $$2}')
+endif
#==============================================================================#
#--------------------------------- 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 $@ $<