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
|
|
|
|
2020-12-20 15:36:50 +01:00
|
|
|
.POSIX:
|
2015-08-27 23:54:58 +02:00
|
|
|
|
2020-12-20 15:36:50 +01:00
|
|
|
NAME = catpoint
|
|
|
|
VERSION = 1.0
|
|
|
|
|
|
|
|
# paths
|
|
|
|
PREFIX = /usr/local
|
|
|
|
MANPREFIX = ${PREFIX}/share/man
|
|
|
|
|
|
|
|
# use system flags.
|
|
|
|
CATPOINT_CFLAGS = ${CFLAGS}
|
|
|
|
CATPOINT_CPPFLAGS = ${CPPFLAGS}
|
|
|
|
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}
|
|
|
|
|
2020-12-20 15:36:50 +01:00
|
|
|
all: catpoint
|
2017-03-17 17:03:24 +01:00
|
|
|
|
|
|
|
options:
|
2020-12-20 15:36:50 +01:00
|
|
|
@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:
|
2020-12-20 15:36:50 +01:00
|
|
|
${CC} -c ${CATPOINT_CFLAGS} ${CATPOINT_CPPFLAGS} $<
|
2017-03-17 17:03:24 +01:00
|
|
|
|
2020-12-20 15:36:50 +01:00
|
|
|
${OBJ}:
|
2017-03-17 17:03:24 +01:00
|
|
|
|
|
|
|
catpoint: ${OBJ}
|
2020-12-20 15:36:50 +01:00
|
|
|
${CC} -o $@ ${OBJ} ${CATPOINT_LDFLAGS}
|
2015-08-27 23:54:58 +02:00
|
|
|
|
|
|
|
clean:
|
2020-12-20 15:36:50 +01:00
|
|
|
rm -f ${BIN} ${OBJ} ${NAME}-${VERSION}.tar.gz
|
2017-03-17 17:03:24 +01:00
|
|
|
|
2020-12-20 15:36:50 +01:00
|
|
|
dist:
|
|
|
|
mkdir -p ${NAME}-${VERSION}
|
|
|
|
cp -R LICENSE Makefile README.md TOOLS ${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
|
2020-12-20 15:36:50 +01:00
|
|
|
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:
|
2020-12-20 15:36:50 +01:00
|
|
|
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
|
|
|
|
|