栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

ubuntu 交叉编译mosquitto-auth-plug-0.1.3

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ubuntu 交叉编译mosquitto-auth-plug-0.1.3

下载编译源文件mosquitto-auth-plug-0.1.3.tar.gz

tar解压,进入目录,修改config.mk文件

内容如下

# Select your backends from this list
BACKEND_CDB ?= no
BACKEND_MYSQL ?= no
BACKEND_SQLITE ?= no
BACKEND_REDIS ?= yes
BACKEND_POSTGRES ?= no
BACKEND_LDAP ?= no
BACKEND_HTTP ?= no
BACKEND_JWT ?= no
BACKEND_MONGO ?= no
BACKEND_FILES ?= no
BACKEND_MEMCACHED ?= no

#CC =aarch64-linux-gnu-gcc 
#CXX=aarch64-linux-gnu-g++
CC =/home/forlinx/work/edgeOS/build/toolchain/gcc-linaro-11.2.1-2022.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
CXX=/home/forlinx/work/edgeOS/build/toolchain/gcc-linaro-11.2.1-2022.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++



# Specify the path to the Mosquitto sources here
# MOSQUITTO_SRC = /usr/local/Cellar/mosquitto/1.4.12
MOSQUITTO_SRC = /home/forlinx/work/tool/mosquitto/mosquitto-1.5.8

# Specify the path the OpenSSL here
OPENSSLDIR = /home/forlinx/work/tool/openssl/out

# Add support for django hashers algorithm name
SUPPORT_DJANGO_HASHERS ?= no

# Specify optional/additional linker/compiler flags here
# On macOS, add
#	CFG_LDFLAGS = -undefined dynamic_lookup
# as described in https://github.com/eclipse/mosquitto/issues/244
#
# CFG_LDFLAGS = -undefined dynamic_lookup  -L/usr/local/Cellar/openssl/1.0.2l/lib
# CFG_CFLAGS = -I/usr/local/Cellar/openssl/1.0.2l/include -I/usr/local/Cellar/mosquitto/1.4.12/include
#

CFG_LDFLAGS = -L/home/forlinx/work/tool/openssl/out/lib -L/home/forlinx/work/tool/mosquitto/out/lib -L/home/forlinx/work/tool/hiredis/out/lib
CFG_CFLAGS = -I/home/forlinx/work/tool/openssl/out/include -I/home/forlinx/work/tool/mosquitto/out/include -I/home/forlinx/work/tool/hiredis/out/include

修改地方注解:

GCC和G++的路径

CC =/home/forlinx/work/edgeOS/build/toolchain/gcc-linaro-11.2.1-2022.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
CXX=/home/forlinx/work/edgeOS/build/toolchain/gcc-linaro-11.2.1-2022.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++

交叉编译的mosquitto-1.5.8源码路径

MOSQUITTO_SRC = /home/forlinx/work/tool/mosquitto/mosquitto-1.5.8

交叉编译openssl的输出路径

OPENSSLDIR = /home/forlinx/work/tool/openssl/out

openssl、mosquitto、hiredis的交叉编译的lib和includ路径

CFG_LDFLAGS = -L/home/forlinx/work/tool/openssl/out/lib -L/home/forlinx/work/tool/mosquitto/out/lib -L/home/forlinx/work/tool/hiredis/out/lib
CFG_CFLAGS = -I/home/forlinx/work/tool/openssl/out/include -I/home/forlinx/work/tool/mosquitto/out/include -I/home/forlinx/work/tool/hiredis/out/include
 

最后make,生成auth-plug.so

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/880430.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号