aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-10-12 21:22:52 +0200
committerThomas Voss <mail@thomasvoss.com> 2022-10-12 21:22:52 +0200
commitdc7876329938d20b8a21704abb7dbbb29dc6667d (patch)
tree41d0efbaeac2bf38071190547c41c0c39401b42d
parent2ab5ae681b6906286f9971b3be01af94a6d86dcd (diff)
Initiate new go module
-rw-r--r--Makefile33
-rw-r--r--go.mod3
2 files changed, 14 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
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..18027e0
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module git.thomasvoss.com/mast
+
+go 1.19