summaryrefslogtreecommitdiff
path: root/sysutils/atf-master/Makefile
blob: 32ae352d3c65be61a5829283c0e9998cc67ed459 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PORTNAME=	atf
PORTVERSION?=	${ATF_VERSION}
PORTREVISION=	1
CATEGORIES=	sysutils
PKGNAMESUFFIX?=	-${PLAT}

MAINTAINER=	uboot@FreeBSD.org
COMMENT=	ARM TF-A for platform ${PLAT}

LICENSE=	BSD3CLAUSE

BUILD_DEPENDS+=	aarch64-none-elf-gcc:devel/aarch64-none-elf-gcc

USES=	gmake

USE_GITHUB=	yes
GH_ACCOUNT=	ARM-software
GH_PROJECT=	arm-trusted-firmware
GH_TAGNAME=	${ATF_VERSION}

SSP_UNSAFE=	yes
MAKE_ENV+=	CROSS_COMPILE="aarch64-none-elf-"
ATF_TARGET?=	bl31
ALL_TARGET=	ARCH="aarch64" PLAT=${PLAT} V=1 CFLAGS= HOSTCC=${CC} ${ATF_TARGET}

# Default to the latest release
ATF_VERSION?=	v2.8.0

PLIST_FILES?=	${PREFIX}/share/${PORTNAME}-${PLAT}/${BL31:T}
.if defined(FIP)
PLIST_FILES+=	${PREFIX}/share/${PORTNAME}-${PLAT}/${FIP:T}
.endif

DESCR?=		${.CURDIR}/pkg-descr

NO_ARCH=	yes

LDFLAGS+=	--no-warn-rwx-segments

.if !defined(PLAT)
PLAT=		NONE
IGNORE=		is a metaport; there is nothing to build
.endif

do-install:
	${MKDIR} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/
	${INSTALL_DATA} ${WRKSRC}/build/${PLAT}/release/${BL31} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/
.if defined(FIP)
	${INSTALL_DATA} ${WRKSRC}/build/${PLAT}/release/${FIP} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/
.endif

.include <bsd.port.mk>