sent/Makefile

58 lines
1.3 KiB
Makefile
Raw Permalink Normal View History

2014-06-22 22:39:21 +00:00
# sent - plain text presentation tool
# See LICENSE file for copyright and license details.
include config.mk
2015-04-05 13:48:47 +00:00
SRC = sent.c drw.c util.c
2014-06-22 22:39:21 +00:00
OBJ = ${SRC:.c=.o}
2015-01-19 03:27:54 +00:00
all: options sent
2014-06-22 22:39:21 +00:00
options:
@echo sent build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
@echo CC $<
@${CC} -c ${CFLAGS} $<
2020-09-13 15:08:07 +00:00
${OBJ}: config.mk
2014-06-22 22:39:21 +00:00
sent: ${OBJ}
@echo CC -o $@
@${CC} -o $@ ${OBJ} ${LDFLAGS}
cscope: ${SRC} config.h
@echo cScope
2014-06-23 09:55:38 +00:00
@cscope -R -b || echo cScope not installed
2014-06-22 22:39:21 +00:00
clean:
@echo cleaning
@rm -f sent ${OBJ} sent-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@mkdir -p sent-${VERSION}
2020-09-13 15:08:07 +00:00
@cp -R LICENSE Makefile config.mk config.h ${SRC} sent-${VERSION}
2014-06-22 22:39:21 +00:00
@tar -cf sent-${VERSION}.tar sent-${VERSION}
@gzip sent-${VERSION}.tar
@rm -rf sent-${VERSION}
install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f sent ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/sent
2016-08-12 09:36:15 +00:00
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@cp sent.1 ${DESTDIR}${MANPREFIX}/man1/sent.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/sent.1
2014-06-22 22:39:21 +00:00
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/sent
.PHONY: all options clean dist install uninstall cscope