commit ee8386422fc2f15468353cfbb817293126364e74 parent 7e8dec3dc1eda2ca965a07323dec6e197bf3126a Author: Claudio Alessi <smoppy@gmail.com> Date: Sat, 30 Jan 2016 19:55:52 +0100 Move "snore" to $APPNAME. Also fix the description. Diffstat:
M | Makefile | | | 35 | ++++++++++++++++++----------------- |
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,15 +1,16 @@ -# snore - simple executor +# snore - sleep with feedback # See LICENSE file for copyright and license details. include config.mk -SRC = snore.c +APPNAME=snore +SRC = ${APPNAME}.c OBJ = ${SRC:.c=.o} -all: options snore +all: options ${APPNAME} options: - @echo snore build options: + @echo ${APPNAME} build options: @echo "CFLAGS = ${CFLAGS}" @echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" @@ -20,37 +21,37 @@ options: ${OBJ}: config.mk -snore: ${OBJ} +${APPNAME}: ${OBJ} @echo CC -o $@ @${CC} -o $@ ${OBJ} ${LDFLAGS} clean: @echo cleaning - @rm -f snore ${OBJ} snore-${VERSION}.tar.gz + @rm -f ${APPNAME} ${OBJ} ${APPNAME}-${VERSION}.tar.gz dist: clean @echo creating dist tarball - @mkdir -p snore-${VERSION} + @mkdir -p ${APPNAME}-${VERSION} @cp -R LICENSE Makefile README config.mk \ - snore.1 ${SRC} snore-${VERSION} - @tar -cf snore-${VERSION}.tar snore-${VERSION} - @gzip snore-${VERSION}.tar - @rm -rf snore-${VERSION} + ${APPNAME}.1 ${SRC} ${APPNAME}-${VERSION} + @tar -cf ${APPNAME}-${VERSION}.tar ${APPNAME}-${VERSION} + @gzip ${APPNAME}-${VERSION}.tar + @rm -rf ${APPNAME}-${VERSION} install: all @echo installing executable file to ${DESTDIR}${PREFIX}/bin @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f snore ${DESTDIR}${PREFIX}/bin - @chmod 755 ${DESTDIR}${PREFIX}/bin/snore + @cp -f ${APPNAME} ${DESTDIR}${PREFIX}/bin + @chmod 755 ${DESTDIR}${PREFIX}/bin/${APPNAME} @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @sed "s/VERSION/${VERSION}/g" < snore.1 > ${DESTDIR}${MANPREFIX}/man1/snore.1 - @chmod 644 ${DESTDIR}${MANPREFIX}/man1/snore.1 + @sed "s/VERSION/${VERSION}/g" < ${APPNAME}.1 > ${DESTDIR}${MANPREFIX}/man1/${APPNAME}.1 + @chmod 644 ${DESTDIR}${MANPREFIX}/man1/${APPNAME}.1 uninstall: @echo removing executable file from ${DESTDIR}${PREFIX}/bin - @rm -f ${DESTDIR}${PREFIX}/bin/snore + @rm -f ${DESTDIR}${PREFIX}/bin/${APPNAME} @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 - @rm -f ${DESTDIR}${MANPREFIX}/man1/snore.1 + @rm -f ${DESTDIR}${MANPREFIX}/man1/${APPNAME}.1 .PHONY: all options clean dist install uninstall