summaryrefslogtreecommitdiff
path: root/regress/sys/arch/i386/ldt/Makefile
blob: c0d1dfa81b2823b3c137ac382ab24994aa1ffefa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#	$OpenBSD: Makefile,v 1.8 2014/07/16 20:04:21 okan Exp $
#	$NetBSD: Makefile,v 1.3 1995/04/20 22:42:19 cgd Exp $
#
# C Optimizer (-O) breaks this program - don't use !!
CFLAGS=-g
PROG=	testldt

DPADD+=	${LIBARCH}
LDADD+=	-li386

USERLDT_ENABLE!=sysctl -n machdep.userldt

.ifmake !obj && !clean && !cleandir && !depend && !regress
.INTERRUPT:
	-@${SUDO} sysctl -q machdep.userldt=${USERLDT_ENABLE}

.END:
	-@${SUDO} sysctl -q machdep.userldt=${USERLDT_ENABLE}
.endif

.if ${MACHINE_ARCH} != "i386"
REGRESS_SKIP="yes"
.endif

do-testldt:	${PROG}
	@${SUDO} sysctl -q machdep.userldt=1
	./${PROG}

REGRESS_TARGETS=do-testldt
REGRESS_ROOT_TARGETS=${REGRESS_TARGETS}
.PHONY: ${REGRESS_TARGETS}

.include <bsd.regress.mk>