2023-11-29 21:19:53 +09:00
|
|
|
NAME=sp
|
2023-11-29 22:16:09 +09:00
|
|
|
VERSION=1.0.0
|
2023-11-29 21:19:53 +09:00
|
|
|
# Linux、Haiku、かIllumos = /usr、FreeBSDかOpenBSD = /usr/local、NetBSD = /usr/pkg
|
|
|
|
PREFIX=/usr
|
|
|
|
CC=cc
|
2023-11-30 00:27:53 +09:00
|
|
|
FILES=main.c showpass.c yankpass.c addpass.c delpass.c listpass.c genpass.c initpass.c
|
2023-11-29 21:19:53 +09:00
|
|
|
CFLAGS=-Wall -Wextra -g
|
|
|
|
LDFLAGS=-lgpgme
|
|
|
|
|
|
|
|
all:
|
|
|
|
${CC} ${CFLAGS} -o ${NAME} ${FILES} ${LDFLAGS}
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f ${NAME}
|
|
|
|
|
2023-11-30 08:15:37 +09:00
|
|
|
dist: clean
|
|
|
|
mkdir -p ${NAME}-${VERSION}
|
|
|
|
cp -R LICENSE.txt Makefile README.md CHANGELOG.md\
|
|
|
|
*.c *.h ${NAME}-${VERSION}
|
|
|
|
tar zcfv ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION}
|
|
|
|
rm -rf ${NAME}-${VERSION}
|
|
|
|
|
2023-11-29 21:19:53 +09:00
|
|
|
install: all
|
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
|
|
cp -f ${NAME} ${DESTDIR}${PREFIX}/bin
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/${NAME}
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f ${DESTDIR}${PREFIX}/bin/${NAME}
|
|
|
|
|
2023-11-30 08:15:37 +09:00
|
|
|
.PHONY: all clean dist install uninstall
|