ti-calibrator-wl18xx: Add support for normal libnl
Make the recipe buildable using either libnl or libnl-tiny, depending on packageconfig, so that each distro can choose. id:376256 (cherry picked from commit 098d75b21fb8a6d1bdf2be381073db34573d1f91)
This commit is contained in:
parent
999dce5a07
commit
e473b9341d
|
|
@ -0,0 +1,31 @@
|
||||||
|
From 8b599149801f6f45c1c406f594bba594bacd7b79 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexandre Bard <alexandre.bard@netmodule.com>
|
||||||
|
Date: Tue, 14 Mar 2023 10:30:02 +0100
|
||||||
|
Subject: [PATCH] Makefile: Make buildable from yocto
|
||||||
|
|
||||||
|
We want to use CC and CFLAGS given by yocto
|
||||||
|
|
||||||
|
NFSROOT is undefined and uneeded
|
||||||
|
---
|
||||||
|
Makefile | 6 ++----
|
||||||
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 3439637..570434a 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -1,12 +1,10 @@
|
||||||
|
-CC = $(CROSS_COMPILE)gcc
|
||||||
|
-CFLAGS = -O2 -Wall
|
||||||
|
-CFLAGS += -I$(NFSROOT)/usr/include -I$(NFSROOT)/include
|
||||||
|
+CC ?= $(CROSS_COMPILE)gcc
|
||||||
|
+CFLAGS ?= -O2 -Wall
|
||||||
|
|
||||||
|
ifdef NLROOT
|
||||||
|
CFLAGS += -I${NLROOT}
|
||||||
|
endif
|
||||||
|
|
||||||
|
-LDFLAGS += -L$(NFSROOT)/lib
|
||||||
|
LIBS += -lm
|
||||||
|
|
||||||
|
ifeq ($(NLVER),3)
|
||||||
|
|
@ -7,38 +7,31 @@ SRC_URI = "git://git.ti.com/git/wilink8-wlan/18xx-ti-utils.git;protocol=http \
|
||||||
file://wgod-ng \
|
file://wgod-ng \
|
||||||
file://btgod-ng \
|
file://btgod-ng \
|
||||||
file://0001-FIX-port-to-OE.patch \
|
file://0001-FIX-port-to-OE.patch \
|
||||||
|
file://0001-Makefile-Make-buildable-from-yocto.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
PV = "1.0+git${SRCPV}"
|
PV = "1.0+git${SRCPV}"
|
||||||
SRCREV = "87af888fe6f7b8fa5926a38a752f65451afe5f24"
|
SRCREV = "87af888fe6f7b8fa5926a38a752f65451afe5f24"
|
||||||
|
|
||||||
inherit pkgconfig
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
DEPENDS = "libnl-tiny"
|
PACKAGECONFIG ?= "libnl-tiny"
|
||||||
|
|
||||||
LDFLAGS += " -Wl,--gc-sections -flto"
|
PACKAGECONFIG[libnl] = ",,libnl,,"
|
||||||
|
PACKAGECONFIG[libnl-tiny] = ",,libnl-tiny,,"
|
||||||
|
|
||||||
export CROSS_COMPILE = "${TARGET_PREFIX}"
|
# Special handling for libnl-tiny
|
||||||
|
OVERRIDES_append = ":${@bb.utils.contains("PACKAGECONFIG", "libnl-tiny", "libnl-tiny", "", d)}"
|
||||||
|
|
||||||
EXTRA_OEMAKE = " \
|
EXTRA_OEMAKE = "NLVER=3"
|
||||||
CFLAGS="${CFLAGS} -I${STAGING_DIR_TARGET}/usr/include/libnl-tiny -DCONFIG_LIBNL20 -D_GNU_SOURCE -DCONFIG_LIBNL_TINY -ffunction-sections -fdata-sections" \
|
EXTRA_OEMAKE_libnl-tiny = "NLVER=2 LIBS="-lnl-tiny""
|
||||||
LDFLAGS="${LDFLAGS} -L${STAGING_LIBDIR} -Wl,--gc-sections -flto" \
|
|
||||||
LIBS="${LIBS} -lnl-tiny" \
|
|
||||||
CC="${CC}" \
|
|
||||||
NLVER=2" \
|
|
||||||
NL1FOUND="" NL2FOUND=Y \
|
|
||||||
NLLIBNAME="libnl-tiny"
|
|
||||||
|
|
||||||
#export EXTRA_OEMAKE = " \
|
LIBNL_INCDIR = "libnl3"
|
||||||
# ${CFLAGS} \
|
LIBNL_INCDIR_libnl-tiny = "libnl-tiny"
|
||||||
# -I${STAGING_DIR_TARGET}/usr/include/libnl-tiny \
|
|
||||||
# -lnl-tiny \
|
CFLAGS += "-I${STAGING_INCDIR}/${LIBNL_INCDIR} \
|
||||||
# -DCONFIG_LIBNL20 \
|
-D_GNU_SOURCE \
|
||||||
# -DCONFIG_LIBNL_TINY \
|
"
|
||||||
# -D_GNU_SOURCE \
|
|
||||||
#"
|
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
install -d ${D}${bindir}
|
install -d ${D}${bindir}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue