summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
blob: 97313d7e2497879764e7d3b59f36c76eed546fcb (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
SUMMARY = "Fortran Hello World"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

DEPENDS = "libgfortran"

SRC_URI = "file://hello.f95"

# These set flags that Fortran doesn't support
SECURITY_CFLAGS = ""
SECURITY_LDFLAGS = ""

do_compile() {
	${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
}

do_install() {
	install -d ${D}${bindir}
	install ${B}/fortran-hello ${D}${bindir}
}

python () {
    if not d.getVar("FORTRAN"):
        raise bb.parse.SkipRecipe("Fortran isn't enabled")
}