xref: /freebsd/contrib/bsddialog/utility/Makefile (revision c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e)
1# PUBLIC DOMAIN - NO WARRANTY, see:
2#     <http://creativecommons.org/publicdomain/zero/1.0/>
3#
4# Written in 2021 by Alfonso Sabato Siciliano
5
6OUTPUT =  bsddialog
7SOURCES = bsddialog.c util_builders.c util_cli.c util_theme.c
8OBJECTS = ${SOURCES:.c=.o}
9
10.if defined(DEBUG)
11CFLAGS += -g
12.endif
13CFLAGS += -I${LIBPATH} -std=gnu99 -Wall -Wextra -Werror
14
15.if defined(NORPATH)
16LDFLAGS += -ltinfow -L${LIBPATH} -lbsddialog
17.else
18LDFLAGS += -ltinfow -Wl,-rpath=${LIBPATH} -L${LIBPATH} -lbsddialog
19.endif
20
21INSTALL = install
22RM = rm -f
23
24all : ${OUTPUT}
25
26${OUTPUT}: ${OBJECTS}
27	${CC} ${LDFLAGS} ${OBJECTS} -o ${.PREFIX}
28
29.c.o:
30	${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
31
32clean:
33	${RM} ${OUTPUT} *.o *~ *.core *.gz
34