aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f645188..22a5a05 100644
--- a/Makefile
+++ b/Makefile
@@ -52,8 +52,8 @@ MKDIR = mkdir -p
RM = rm -rf
OS = $(shell uname)
ifeq (${OS}, Darwin)
- SCR_SZE = $(shell osascript -e 'tell application "Finder" to get bounds\
- of window of desktop' | tr ',' 'x' | tr -d '\n' | tr -d ' ' | cut -c 5-)
+ SCR_SZE = $(shell osascript -e 'tell application "Finder" to get bounds of\
+ window of desktop' | tr ',' 'x' | tr -d '\n' | tr -d ' ' | cut -c 5-)
else
SCR_SZE = $(shell xdpyinfo | grep dimensions | awk '{print $$2}')
endif
@@ -66,11 +66,18 @@ CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -Werror
CFLAGS += -pedantic
-CFLAGS += -DFT_SCR_SIZE=\"${SCR_SZE}\"
ifdef ASAN
CFLAGS += ${DEBUG}
CFLAGS += ${FSANITIZE}
endif
+CDEFS = -DFT_SCR_SIZE=\"${SCR_SZE}\"
+ifeq (${OS}, Linux)
+ CDEFS += -DFT_W_KEY=119
+ CDEFS += -DFT_A_KEY=97
+ CDEFS += -DFT_S_KEY=115
+ CDEFS += -DFT_D_KEY=100
+ CDEFS += -DFT_ESC_KEY=65307
+endif
#------------------------------------------------------------------------------#
DEBUG = -glldb
FSANITIZE = -fsanitize=address
@@ -89,7 +96,7 @@ ifeq (${OS}, Darwin)
${CC} -c ${CFLAGS} -I${LFT_DIR}${INCS_DIR} -I${MLX_DIR} -I${INCS_DIR} -o $@ $<
else
${CC} -c ${CFLAGS} -I${LFT_DIR}${INCS_DIR} -I${INCS_DIR} \
--DFT_W_KEY=119 -DFT_A_KEY=97 -DFT_S_KEY=115 -DFT_D_KEY=100 -DFT_ESC_KEY=65307 \
+ \
-o $@ $<
endif
#------------------------------------------------------------------------------#