加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

libnl和libopenssl,hostapd交叉编译

发布时间:2020-12-14 00:45:31 所属栏目:Linux 来源:网络整理
导读:1.nl: mkdir __install ./configure CC=arm-linux-gnueabihf-gcc ?? ?--prefix=$(pwd)/__install ?? ?--host=arm-linux-gnueabihf ?? ?CFLAGS=-I/usr/include make make install ? 2.openssl: mkdir __install ./config no-asm shared --prefix=$(pwd)

1.nl:

mkdir __install

./configure CC=arm-linux-gnueabihf-gcc
?? ?--prefix=$(pwd)/__install
?? ?--host=arm-linux-gnueabihf
?? ?CFLAGS=-I/usr/include

make

make install

?

2.openssl:

mkdir __install

./config no-asm shared --prefix=$(pwd)/__install
?? ?--cross-compile-prefix=arm-linux-gnueabihf-

make

make install

?

3.hostapd:

[email?protected]:~/Documents/wifi_ap/hostapd-2.8/hostapd$ git df Makefile
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 6e263c5..f7309a7 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1,6 +1,4 @@
-ifndef CC
-CC=gcc
-endif
+CC=arm-linux-gnueabihf-gcc

?ifndef CFLAGS
?CFLAGS = -MMD -O2 -Wall -g
@@ -24,6 +22,9 @@ endif
?CFLAGS += $(EXTRA_CFLAGS)
?CFLAGS += -I$(abspath ../src)
?CFLAGS += -I$(abspath ../src/utils)
+CFLAGS += -I$(abspath ../../openssl-1.0.2r/__install/include)
+LDFLAGS += -L$(abspath ../../openssl-1.0.2r/__install/lib)
+LDFLAGS += -L$(abspath ../../libnl-3.2.25/__install/lib)

?export BINDIR ?= /usr/local/bin/

?

make

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读