diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | Makefile | 42 | ||||
| -rw-r--r-- | xnap.c | 8 |
3 files changed, 53 insertions, 0 deletions
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 @@ -0,0 +1,8 @@ +#include <stdlib.h> + +#include <X11/Xlib.h> + +int main(void) +{ + return EXIT_SUCCESS; +} |
