b9124a7354
Details: - The main thread runs editline(3) functions, that can block. - A separate thread is launched to monitor netgraph sockets. - The access to the descriptors is protected by a mutex. At runtime the monitoring thread owns the mutex. When the main thread reads a command from el_gets() it asks the monitoring thread to release a mutex and sleep until the main thread processes the command. This makes ngctl(8) depend on libedit, and libpthread. Thus, the new functionality isn't compiled in if release is being built with -DRELEASE_CRUNCH. PR: bin/87352 Reviewed by: ru, Nuno Antunes <nuno.antunes gmail.com>
24 lines
497 B
Makefile
24 lines
497 B
Makefile
# $FreeBSD$
|
|
# $Whistle: Makefile,v 1.3 1999/01/16 00:10:11 archie Exp $
|
|
|
|
PROG= ngctl
|
|
MAN= ngctl.8
|
|
SRCS= main.c mkpeer.c config.c connect.c dot.c name.c show.c list.c \
|
|
msg.c debug.c shutdown.c rmhook.c status.c types.c write.c
|
|
WARNS?= 3
|
|
|
|
.if defined(RELEASE_CRUNCH)
|
|
NGCTL_NO_LIBEDIT=
|
|
.endif
|
|
|
|
DPADD= ${LIBNETGRAPH}
|
|
LDADD= -lnetgraph
|
|
|
|
.if !defined(NGCTL_NO_LIBEDIT)
|
|
CFLAGS+= -DEDITLINE
|
|
DPADD+= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAP}
|
|
LDADD+= -pthread -ledit -ltermcap
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|