aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 11 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index fe6c48f..6d70e94 100644
--- a/Makefile
+++ b/Makefile
@@ -1,28 +1,17 @@
.POSIX:
-target = mstatus
+PREFIX = /usr
+DPREFIX = ${DESTDIR}${PREFIX}
+MANDIR = ${DPREFIX}/share/man
-CC = cc
-CFLAGS = -O3 -std=c11 -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Werror
-LDFLAGS = -lX11
-
-PREFIX = /usr/local
-
-HAS_DWM = false
-
-all: ${target}
-${target}: mstatus.c
- ${HAS_DWM} \
- && ${CC} ${CFLAGS} ${LDFLAGS} -DHAS_DWM -o $@ $< \
- || ${CC} ${CFLAGS} -o $@ $<
-
-clean:
- rm -f ${target} ${objects}
+all: mast
+mast: mast.go
+ go build
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
+ mkdir -p ${DPREFIX}/bin ${MANDIR}/man1
+ cp mast ${DPREFIX}/bin
+ cp mast.1 ${MANDIR}/man1
-uninstall:
- rm -f ${DESTDIR}${PREFIX}/bin/${target} ${DESTDIR}${PREFIX}/share/man/man1/${target}.1
+clean:
+ rm -f mast