Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

# $NetBSD: Makefile.prog,v 1.2 2013/09/29 13:34:37 christos Exp $
.include "../Makefile.inc"

PROG=${.CURDIR:T}
.if "${PROG:M*sealdata}" != ""
.PATH.c: ${DIST}/src/cmds
.else
.PATH.c: ${DIST}/src/tpm_mgmt
.endif

.if "${PROG:Mtpm_nv*}" != ""
SRCS=${PROG}.c tpm_nvcommon.c
.elif ${PROG} == "tpm_setoperatorauth"
.elif ${PROG} == "tpm_changeownerauth"
SRCS=tpm_changeauth.c
.elif ${PROG} == "tpm_setpresence"
SRCS=tpm_present.c
.elif ${PROG} == "tpm_setactive"
SRCS=tpm_activate.c
.elif ${PROG:Mtpm_set*} != ""
SRCS=${PROG:S/set//}.c
.endif

LIBTPMUTILSOBJDIR!=  cd ${.CURDIR}/../../lib/libtpm_utils && ${PRINTOBJDIR}

.if ${PROG} == "tpm_unsealdata"
DPADD+=${LIBTPM_UNSEAL}
LDADD+=-ltpm_unseal
.endif
DPADD+=${LIBTSPI}
LDADD+=-L${LIBTPMUTILSOBJDIR} -ltpm_utils -ltspi

DPADD+=${LIBCRYPTO}
LDADD+=-lcrypto

.if ${PROG} != "tpm_version" && ${PROG:M*sealdata} == ""
BINDIR=/usr/sbin
.if ${PROG} != "tpm_restrictsrk"
.SUFFIXES: .8
.PATH.8: ${DIST}/man/man8
MAN+=${PROG}.8
.else
NOMAN=yes
MAN=
#MLINKS+=tpm_restrictpubek.8 tpm_restrictsrk.8
.endif
.else
BINDIR=/usr/bin
.if ${PROG} != "tpm_unsealdata"
.SUFFIXES: .1
.PATH.1: ${DIST}/man/man1
MAN+=${PROG}.1
.else
NOMAN=yes
MAN=
.endif
.endif

.include <bsd.prog.mk>