summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorr1w1s1 <r1w1s1@fastmail.com>2025-12-14 22:42:13 -0300
committerr1w1s1 <r1w1s1@fastmail.com>2025-12-14 22:42:13 -0300
commit32df818c67f148f7b849147a3ce8880d0f871592 (patch)
tree9736ddfba09c0c7d9b540eb5d8af4ae3667d02c3 /Makefile
parent3f455db8ad07ca1cba56ad02ebb5f17368d346cc (diff)
Makefile: respect CPPFLAGS and CFLAGS when building
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 33ef70c..9c9151b 100644
--- a/Makefile
+++ b/Makefile
@@ -8,12 +8,12 @@ MANPREFIX = ${PREFIX}/share/man
# libs
# remove the Xinerama parts if you don't want Xinerama support
LIBS = -lX11 -lXinerama
-CPPFLAGS = -DXINERAMA
# flags
-# CFLAGS = -std=c99 -Wall -Wextra -O0 -g ${CPPFLAGS} -fdiagnostics-color=always # debug
-CFLAGS = -std=c99 -Wall -Wextra -Os ${CPPFLAGS} -fdiagnostics-color=always -I/usr/X11R6/include
-LDFLAGS = ${LIBS} -L/usr/X11R6/lib
+CPPFLAGS = -DXINERAMA
+# CFLAGS = -std=c99 -Wall -Wextra -O0 -g -fdiagnostics-color=always # debug
+CFLAGS = -std=c99 -Wall -Wextra -Os -fdiagnostics-color=always
+LDFLAGS = ${LIBS}
# files
SRC = xnap.c
@@ -22,7 +22,7 @@ all: xnap
# rules
xnap:
- ${CC} ${SRC} -o xnap ${LDFLAGS}
+ ${CC} ${CPPFLAGS} ${CFLAGS} ${SRC} -o xnap ${LDFLAGS}
clean:
rm -rf xnap
@@ -41,6 +41,6 @@ uninstall:
clangd:
rm -f compile_flags.txt
- for f in ${CFLAGS}; do echo $$f >> compile_flags.txt; done
+ for f in ${CPPFLAGS} ${CFLAGS}; do echo $$f >> compile_flags.txt; done
.PHONY: all clean install uninstall clangd