aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com> 2021-08-04 11:23:55 +0200
committerMango0x45 <thomasvoss@live.com> 2021-08-04 11:23:55 +0200
commitae1db6545981f7bb55f0d0b662a18c55a0a8f1cf (patch)
tree7137923bae0439d6c3ce9619245c504255c5c8c0 /Makefile
Genesis commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
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