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 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3