summaryrefslogtreecommitdiff
path: root/recipes/nandlogical/nandlogical-klibc-static_1.0.0.bb
blob: 8c3ca9da7944e0beb19ddcbeb4eedffda15d7e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require nandlogical_${PV}.bb

SRC_URI_append = " file://nandlogical.c \
		    file://mtd-user.h \
		    file://mtd-abi.h \
		    "
DEPENDS += "klibc"

export CC = ${TARGET_PREFIX}klcc

# standard oe cflags don't work with klcc
export CFLAGS = ""
export CPPFLAGS = ""
export LDFLAGS = ""

do_configure_prepend() {
    sed -i 's:<mtd/mtd-user.h>:"mtd-user.h":g' '${S}/nandlogical.c'
    sed -i 's:<mtd/mtd-abi.h>:"mtd-abi.h":g' '${S}/mtd-user.h'
}

do_compile() {
        ${CC} nandlogical.c -o nandlogical ${CFLAGS} ${LDFLAGS} -static
}