diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b4ba764 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +.POSIX: + +target = mstatus + +CC = cc +CFLAGS = -O3 -std=c11 -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes +LDFLAGS = -lX11 + +PREFIX = /usr/local + +all: ${target} +${target}: mstatus.c + ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $< + +.PHONY: clean install uninstall +clean: + rm -f ${target} ${objects} + +install: + mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${PREFIX}/share/man/man1 + cp -f ${target} ${DESTDIR}${PREFIX}/bin + cp -f ${target}.1 ${DESTDIR}${PREFIX}/share/man/man1 + +uninstall: + rm -f ${DESTDIR}${PREFIX}/bin/${target} ${DESTDIR}${PREFIX}/share/man/man1/${target}.1 |