/******************************************************************************
This file is part of libemb.
libemb is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libemb is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with libemb. If not, see http://www.gnu.org/licenses/.
Project: Embedme
Author : FergusZeng
Copyright 2014 @ ShenZhen ,China
*******************************************************************************/
Embedme项目简介:
Embedme是一个基于linux的嵌入式应用类库,包括线程,线程池,定时器,事件分发,消息
队列,socket,HttpClient,JSON,SqliteWrapper,Tuple,MD5,CRC,文件,目录,共享
内存,互斥锁,串口,日志,配置等开发中常用的模块。Embedme集成了cJson,sqlite,tinyxml,
libconfig++等优秀的开源库,并将这些库封装成非常人性化的C++接口,同时Embedme为嵌入式
linux应用程序常使用的功能接口提供一个小巧简洁的C++封装库libemb,它可以帮助您快速的
构建稳定的嵌入式应用程序,省去广大码农造轮子的重复劳动。libemb库已应用在多个实际项
目中,可以放心使用,欢迎各位同行fork本开源库,期待您的建议和开源贡献。
注意事项:
本软件遵循LGPL协议,请自觉遵守该协议,否则将追究您的法律责任!
如果您使用此源码,请务必保留README在您的工程代码目录下!!!!!!!
此工程文件夹意在提供一个基于libemb库的通用工程构建模板,方便用
户快速构建嵌入式应用程序。请用户不要随意更改工程目录结构树及
Makefile文件。
目录树结构:
|---app
|---libemb
|---opensource
|---output
|---Makefile
app 应用程序源代码存放目录.
libemb 为embedme库文件夹,如果您只是使用libemb库,请不要删除或修改
该文件夹内的任何文件.
opensource 目录用于集成外部开源库.
output目录为输出目录,用于存储编译过程中间文件及目标文件.
在编译前请先确认已安装autoconf,automake,libtool等工具,否则无法编译成功,
如遇编译错误,请自行查看错误提示,判断是否是工具未安装。
使用说明(更多详情可以使用make help查看帮助)
1.先编译开源公用库:
make opensource
2.编译libemb库:
make libemb
3.最后编译应用程序app:
make app
您也可以一次性编译整个工程:
#make all
如果您需要将该项目移植到其他平台,编译时需要加上HOST参数,如移植到arm平台,
交叉编译器的host为arm-linux,则使用如下命令进行编译:
#make all HOST=arm-linux
默认为静态编译方式,如果您需要动态编译,请使用:
#make all SHARED=yes
如果您需要清理工程进行重新编译,请使用:
#make clean
您可以在inc或src目录中任意创建子目录以方便管理源代码,增加子目录
和源代码后,您需要将子目录及文件添加到Makefile的ADD_INCLUDE_DIR变量和
PROJECT_SRC变量中,这样您才能正确编译。