From 58f64b93eda84a1a362353e6b9bab90c3cca00ae Mon Sep 17 00:00:00 2001 From: uint Date: Sun, 14 Dec 2025 15:09:02 +0000 Subject: add boilerplate . --- .gitignore | 3 +++ Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ xnap.c | 8 ++++++++ 3 files changed, 53 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 xnap.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b43b96 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +xnap +compile_flags.txt +*.swp 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 diff --git a/xnap.c b/xnap.c new file mode 100644 index 0000000..29b0e2e --- /dev/null +++ b/xnap.c @@ -0,0 +1,8 @@ +#include + +#include + +int main(void) +{ + return EXIT_SUCCESS; +} -- cgit v1.2.3