2020-05-16 00:02:23 +02:00
|
|
|
include config.mk
|
|
|
|
|
2021-01-10 19:35:34 +01:00
|
|
|
bindir = ${DESTDIR}${PREFIX}
|
|
|
|
mandir = ${DESTDIR}${MANPREFIX}
|
|
|
|
|
2020-05-16 00:02:23 +02:00
|
|
|
SRCS = ${PROG}.c
|
|
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
|
|
|
|
all: ${PROG}
|
|
|
|
|
|
|
|
${PROG}: ${OBJS}
|
|
|
|
${CC} -o $@ ${OBJS} ${LDFLAGS}
|
|
|
|
|
2020-07-30 05:25:55 +02:00
|
|
|
${OBJS}: config.h ${PROG}.h
|
2020-05-16 00:02:23 +02:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
${CC} ${CFLAGS} -c $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm ${OBJS} ${PROG}
|
|
|
|
|
|
|
|
install: all
|
2021-01-10 19:35:34 +01:00
|
|
|
mkdir -p ${bindir}/bin
|
|
|
|
install -m 755 ${PROG} ${bindir}/bin/${PROG}
|
|
|
|
mkdir -p ${mandir}/man1
|
|
|
|
install -m 644 ${PROG}.1 ${mandir}/man1/${PROG}.1
|
2020-05-16 00:02:23 +02:00
|
|
|
|
|
|
|
uninstall:
|
2021-01-10 19:35:34 +01:00
|
|
|
rm -f ${bindir}/bin/${PROG}
|
|
|
|
rm -f ${mandir}/man1/${PROG}.1
|
2020-05-16 00:02:23 +02:00
|
|
|
|
|
|
|
.PHONY: all clean install uninstall
|