summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoruint <abhinav.prsai@gmail.com>2025-12-14 15:09:02 +0000
committeruint <abhinav.prsai@gmail.com>2025-12-14 15:12:28 +0000
commit58f64b93eda84a1a362353e6b9bab90c3cca00ae (patch)
tree45608237c61c5397245bb4700fdd802b6d209bae /Makefile
parent2db04189e64c629b92da1863f06048488905a474 (diff)
add boilerplate
.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f0a2c11
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,42 @@
+# tools
+CC = cc
+
+# paths
+PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/share/man
+
+# libs
+LIBS = -lX11
+
+# flags
+# CPPFLAGS =
+CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os ${CPPFLAGS} -fdiagnostics-color=always
+LDFLAGS = ${LIBS}
+
+# uncomment this block for OpenBSD
+# CFLAGS += -I/usr/X11R6/include
+# LDFLAGS += -L/usr/X11R6/lib
+
+# files
+SRC = xnap.c
+
+all: xnap
+
+# rules
+sxwm: ${OBJ}
+ ${CC} -o xnap ${LDFLAGS}
+
+clean:
+ rm -rf xnap
+
+install: all
+ # TODO
+
+uninstall:
+ # TODO
+
+clangd:
+ rm -f compile_flags.txt
+ for f in ${CFLAGS}; do echo $$f >> compile_flags.txt; done
+
+.PHONY: all clean install uninstall clangd