summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoruint <72694427+uint23@users.noreply.github.com>2025-12-15 18:09:44 +0000
committerGitHub <noreply@github.com>2025-12-15 18:09:44 +0000
commit7797bd2983f9eabe4c76752509fd058ed5853344 (patch)
tree81478d4bfc9b152b4c259de85a6cb7eb8d83c38e /Makefile
parent3f455db8ad07ca1cba56ad02ebb5f17368d346cc (diff)
parent9d5460c1c69ffd14350a1016d98a0b1c20e1dd7d (diff)
Merge pull request #2 from r1w1s1/fix-build-and-docs
Fix build flags handling and clarify documentation
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