移植libnfc到arm 开发板 ( porting libnfc to arm)

来源:互联网 发布:c语言输出文件名 编辑:程序博客网 时间:2024/06/06 02:14

  移植过程比我想象的要简单的多的多,一行代码都没改,改改配置参数就行了微笑


1、下载libnfc源码

svn checkout http://libnfc.googlecode.com/svn/trunk/ libnfc-read-only
2、生成configure

autoreconf -is

3、配置交叉编译 (前提是交叉编译环境好配置好)

./configure --host=arm-linux --enable-serial-autoprobe  --with-drivers=pn532_uart --enable-static --prefix=/usr/local/arm/4.3.2/arm-none-linux-gnueabi/
--host 指明目标平台 arm-linux
--enable-static 静态链接以减少依赖库带来的各种麻烦

--prefix 这里我填的是 交叉编译工具的路径,安装到这里,以后编译arm上依赖libnfc的程序时才不会提示无头文件

4、编译、安装

make ; make install

5、将编译出的库考到arm板里即可使用了

我写的读乘车卡程序也成功移植到了arm板上 ,arm上显示中文都是口,所以改成Chinglish了大笑




 

原创粉丝点击