catpoint/Makefile

69 lines
1.4 KiB
Makefile
Raw Permalink Normal View History

2017-03-17 17:03:24 +01:00
# catpoint - simple presentation software
# See LICENSE file for copyright and license details.
2015-08-27 23:54:58 +02:00
.POSIX:
2015-08-27 23:54:58 +02:00
NAME = catpoint
2020-12-20 19:01:30 +01:00
VERSION = 0.2
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
# use system flags.
CATPOINT_CFLAGS = ${CFLAGS}
CATPOINT_CPPFLAGS = ${CPPFLAGS} -D_DEFAULT_SOURCE
CATPOINT_LDFLAGS = ${LDFLAGS} -lncursesw
# Gentoo
#CATPOINT_LDFLAGS = ${LDFLAGS} -lncursesw -ltinfow
SRC = ${NAME}.c
MAN1 = ${NAME}.1
BIN = ${NAME}
2017-03-17 17:03:24 +01:00
OBJ = ${SRC:.c=.o}
all: catpoint
2017-03-17 17:03:24 +01:00
options:
@echo ${NAME} build options:
2017-03-17 17:03:24 +01:00
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
config.h:
cp config.def.h config.h
.c.o:
${CC} -c ${CATPOINT_CFLAGS} ${CATPOINT_CPPFLAGS} $<
2017-03-17 17:03:24 +01:00
${OBJ}:
2017-03-17 17:03:24 +01:00
catpoint: ${OBJ}
${CC} -o $@ ${OBJ} ${CATPOINT_LDFLAGS}
2015-08-27 23:54:58 +02:00
clean:
rm -f ${BIN} ${OBJ} ${NAME}-${VERSION}.tar.gz
2017-03-17 17:03:24 +01:00
dist:
mkdir -p ${NAME}-${VERSION}
cp -R LICENSE Makefile README.md TOOLS PATH-MAX-LIMIT.md ${SRC} \
${MAN1} showoff ${NAME}-${VERSION}
tar -cf - "${NAME}-${VERSION}" | \
gzip -c > ${NAME}-${VERSION}.tar.gz
rm -rf ${NAME}-${VERSION}
2017-03-17 17:03:24 +01:00
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/${BIN}
mkdir -p ${DESTDIR}${MANPREFIX}/man1
cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1/${MAN1}
chmod 644 ${DESTDIR}${MANPREFIX}/man1/${MAN1}
2017-03-17 17:03:24 +01:00
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/${BIN}
rm -f ${DESTDIR}${MANPREFIX}/man1/${MAN1}
2017-03-17 17:03:24 +01:00
.PHONY: all options clean dist install uninstall