From 01a9d8e78d7cb51d15761ebe11f19b547f55e22a Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 11 Mar 2024 20:34:58 +0800
Subject: [PATCH] Update libgpiod and modules makefile

---
 modules/makefile                   |    7 ++++++-
 project/openlibs/libgpiod/build.sh |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/makefile b/modules/makefile
index dad362d..e1e04b5 100644
--- a/modules/makefile
+++ b/modules/makefile
@@ -12,6 +12,10 @@
 #
 #*******************************************************************************
 
+PWD=$(shell pwd)
+TOPDIR=${PWD}/../project/
+OPENLIBS_INCPATH=${TOPDIR}/openlibs/install/include
+OPENLIBS_LIBPATH=${TOPDIR}/openlibs/install/lib
 
 BUILD_ARCH=$(shell uname -m)
 ifneq ($(findstring $(BUILD_ARCH), "x86_64" "i386"),)
@@ -20,7 +24,8 @@
 
 CC=${CROSS_COMPILE}gcc
 
-LDFLAGS+=-lm -lgpiod
+CFLAGS+=-I${OPENLIBS_INCPATH}
+LDFLAGS+=-L${OPENLIBS_LIBPATH} -lm -lgpiod
 
 SRCFILES = $(wildcard *.c)
 BINARIES=$(SRCFILES:%.c=%)
diff --git a/project/openlibs/libgpiod/build.sh b/project/openlibs/libgpiod/build.sh
index d703b78..7811ddc 100755
--- a/project/openlibs/libgpiod/build.sh
+++ b/project/openlibs/libgpiod/build.sh
@@ -2,7 +2,7 @@
 
 # library name and version
 # Official: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
-LIB_NAME=libgpiod-1.6.4
+LIB_NAME=libgpiod-1.6.2
 PACK_SUFIX=tar.gz
 
 # LingYun source code FTP server

--
Gitblit v1.9.1