2
3
Fork 0
A simple shell with simple goals https://git.rawtext.club/sloum/slosh
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
789 B

GOCMD := go
BINARY := slosh
PREFIX := /usr/local
EXEC_PREFIX := ${PREFIX}
BINDIR := ${EXEC_PREFIX}/bin
LIBDIR := ${EXEC_PREFIX}/lib
LIBDIR_LOCAL:= $(or ${XDG_DATA_HOME}, ~/.local/share)
DATAROOTDIR := ${EXEC_PREFIX}/share
MANDIR := ${DATAROOTDIR}/man
MAN1DIR := ${MANDIR}/man1
.PHONY: build
build:
${GOCMD} build -ldflags "-w -s" -o ${BINARY}
.PHONY: install
install: install-bin install-man clean
.PHONY: install-bin
install-bin: build
install -d ${DESTDIR}${BINDIR}
install -m 0755 ./${BINARY} ${DESTDIR}${BINDIR}
.PHONY: install-man
install-man: ${BINARY}.1
gzip -k ./${BINARY}.1
install -d ${DESTDIR}${MAN1DIR}
install -m 0644 ./${BINARY}.1.gz ${DESTDIR}${MAN1DIR}
.PHONY: clean
clean:
${GOCMD} clean
rm -f ./${BINARY}.1.gz 2> /dev/null
rm -f ./${BINARY}_* 2> /dev/null