From 32df818c67f148f7b849147a3ce8880d0f871592 Mon Sep 17 00:00:00 2001 From: r1w1s1 Date: Sun, 14 Dec 2025 22:42:13 -0300 Subject: Makefile: respect CPPFLAGS and CFLAGS when building --- Makefile | 12 ++++++------ 1 file 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 -- cgit v1.2.3