From dc7876329938d20b8a21704abb7dbbb29dc6667d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 12 Oct 2022 21:22:52 +0200 Subject: Initiate new go module --- Makefile | 33 +++++++++++---------------------- go.mod | 3 +++ 2 files changed, 14 insertions(+), 22 deletions(-) create mode 100644 go.mod 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 -- cgit v1.2.3