xref: /freebsd/contrib/bsddialog/Makefile (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1# PUBLIC DOMAIN - NO WARRANTY, see:
2#     <http://creativecommons.org/publicdomain/zero/1.0/>
3#
4# Written in 2023 by Alfonso Sabato Siciliano
5
6OUTPUT =  bsddialog
7export VERSION=1.0
8.CURDIR ?= ${CURDIR}
9LIBPATH = ${.CURDIR}/lib
10LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so
11UTILITYPATH = ${.CURDIR}/utility
12
13RM= rm -f
14LN = ln -s -f
15
16### cli options ###
17# port/pkg Makefile: 'MAKE_ARGS = -DNORPATH'
18NORPATH ?=
19export DISABLERPATH=${NORPATH}
20# `make -DDEBUG`
21# `gmake DEBUG=1`
22DEBUG ?=
23export ENABLEDEBUG=${DEBUG}
24
25all : ${OUTPUT}
26
27${OUTPUT}: ${LIBBSDDIALOG}
28	${MAKE} -C ${UTILITYPATH} LIBPATH=${LIBPATH}
29	${LN} ${UTILITYPATH}/${OUTPUT} ${.CURDIR}/${OUTPUT}
30
31${LIBBSDDIALOG}:
32	${MAKE} -C ${LIBPATH}
33
34clean:
35	${MAKE} -C ${LIBPATH} clean
36	${MAKE} -C ${UTILITYPATH} clean
37	${RM} ${OUTPUT} *.core
38
39