[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / usr.bin / bc

File: [local] / src / usr.bin / bc / Makefile (download)

Revision 1.8, Sat Oct 10 19:28:54 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.7: +5 -4 lines

Rather than invoking fork/execve of dc(1) on a pipe, compile in the dc(1)
code directly and use it as a subfunction.  This refactoring allows use of
pledge "stdio rpath proc tty" in the main bc(1) process before fork, pledge
"stdio rpath tty" after fork, and fully reduced to "stdio" in the dc(1)
child.

This requires two recent to the kernel code (allowing sigsuspend(),
and kill() self as pid 0).
ok otto

#	$OpenBSD: Makefile,v 1.8 2015/10/10 19:28:54 deraadt Exp $

PROG=		bc
SRCS=		bc.y scan.l tty.c dc.c bcode.c inout.c mem.c stack.c
CPPFLAGS+=	-I. -I${.CURDIR}
CFLAGS+=	-Wall -Wno-unused
YFLAGS+=
LDADD+=		-ledit -lcurses -lcrypto
DPADD+=		${LIBEDIT} ${LIBCURSES} ${LIBCRYPTO}

.PATH:		${.CURDIR}/../dc

beforeinstall:
	install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/bc.library \
	    ${DESTDIR}/usr/share/misc

.include <bsd.prog.mk>