1 # PUBLIC DOMAIN - NO WARRANTY, see:
2 # <http://creativecommons.org/publicdomain/zero/1.0/>
4 # Written in 2021 by Alfonso Sabato Siciliano
8 OBJECTS= ${SOURCES:.c=.o}
9 LIBPATH= ${.CURDIR}/lib
10 LIBBSDDIALOG= ${LIBPATH}/libbsddialog.so
12 CFLAGS+= -I${LIBPATH} -std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter
15 CFLAGS= -g -Wall -I${LIBPATH}
18 LDFLAGS+= -Wl,-rpath=${LIBPATH} -L${LIBPATH} -lbsddialog
20 BINDIR= /usr/local/bin
23 MANDIR= /usr/local/share/man/man1
30 ${OUTPUT}: ${LIBBSDDIALOG} ${OBJECTS}
31 ${CC} ${LDFLAGS} ${OBJECTS} -o ${.PREFIX}
34 make -C ${LIBPATH} ${LIBDEBUG}
37 ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
40 ${INSTALL} -s -m 555 ${OUTPUT} ${BINDIR}
41 ${GZIP} ${MAN} > ${MAN}.gz
42 ${INSTALL} -m 444 ${MAN}.gz ${MANDIR}
45 ${RM} ${BINDIR}/${OUTPUT}
46 ${RM} ${MANDIR}/${MAN}.gz
49 make -C ${LIBPATH} clean
50 ${RM} ${OUTPUT} *.o *~ *.core ${MAN}.gz