Add makefile. - teed - A multiplex relay tee(1) daemon. HTML git clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/teed DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit e58c0a5292801fc56ee598a7e60e311593550e4b DIR parent f2f794584857bf0d32fb7c154bb7ef89893aa11c HTML Author: Christoph Lohmann <20h@r-36.net> Date: Mon, 7 Aug 2023 12:12:48 +0200 Add makefile. Diffstat: A Makefile | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+), 0 deletions(-) --- DIR diff --git a/Makefile b/Makefile @@ -0,0 +1,48 @@ +# teed - a tee(1) like multiplexer using unix sockets +# See LICENSE file for copyright and license details. +.POSIX: + +NAME = teed +VERSION = 0.1 + +PREFIX = /usr/local +BINDIR = ${PREFIX}/bin +MANDIR = ${PREFIX}/share/man/man8 + +TEED_CFLAGS = -D_DEFAULT_SOURCE -I. -I/usr/include ${CFLAGS} +TEED_LDFLAGS = -L/usr/lib -L. ${LDFLAGS} + +SRC = teed.c +OBJ = ${SRC:.c=.o} + +all: ${NAME} + +.c.o: + ${CC} ${TEED_CFLAGS} -c $< + +${OBJ}: + +${NAME}: ${OBJ} + ${CC} -o $@ ${OBJ} ${TEED_LDFLAGS} + +clean: + rm -f ${NAME} ${OBJ} + +install: all + mkdir -p "${DESTDIR}${BINDIR}" + cp -f ${NAME} "${DESTDIR}${BINDIR}" + chmod 755 "${DESTDIR}${BINDIR}/${NAME}" + # TODO: Make a manpage. + #mkdir -p "${DESTDIR}${MANDIR}" + #cp -f ${NAME}.8 "${DESTDIR}${MANDIR}" + #chmod 644 "${DESTDIR}${MANDIR}/${NAME}.8" + +uninstall: + rm -f "${DESTDIR}${BINDIR}/${NAME}" + #rm -f "${DESTDIR}${MANDIR}/${NAME}.8" + +telemetry: + printf "/telemetry/teed/installed\r\n" | nc bitreich.org 70 + +.PHONY: all clean install uninstall +