From d1097088999c538601158805cf77250d51513f98 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 5 Feb 2020 13:32:40 +0100 Subject: Don't mess with me boy --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') 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 $@ $< -- cgit v1.2.3