iot_programe Makefile hacking
/*****************************************************************************
* iot_programe Makefile hacking
* 说明:
* 富林这边编写的demo,看一下其Makefile是怎么处理所有的源代码的,有生成动态、
* 静态链接库,以及直接编译输出,其实模块化编译的模式还是很好的。
*
* 2017-8-12 深圳 龙华樟坑村 曾剑锋
****************************************************************************/ 一、参考文档:
. Linux GCC编译使用动态、静态链接库
http://blog.csdn.net/a600423444/article/details/7206015 二、Makefile
all:
make -C gpio_led/main all
... clean:
make -C gpio_led/main clean
... 三、gpio_led/main/Makefile
CC = arm-linux-gnueabihf-gcc all:
make -C ../src
# use share library
$(CC) main.c -o gpio_led -L ../src/ -lgpio_led # directory compile with source code
$(CC) main.c ../src/gpio_led.c -o my_gpio_led clean:
rm gpio_led my_gpio_led -rf
make -C ../src clean 四、gpio_led/src/Makefile
CC = arm-linux-gnueabihf-gcc
AR = arm-linux-gnueabihf-ar all:
# output share library
$(CC) gpio_led.c -fPIC -shared -o libgpio_led.so # output static library
$(CC) -c gpio_led.c -o libgpio_led.o -I ../include
$(AR) rcv libgpio_led.a libgpio_led.o clean:
rm *.so *.o *.a
iot_programe Makefile hacking的更多相关文章
- ti processor sdk linux am335x evm Makefile hacking
# # ti processor sdk linux am335x evm Makefile hacking # 说明: # 本文主要对TI的sdk中的Makefile脚本进行解读,是为了了解其工作机 ...
- I.MX6 U-Boot mkconfig hacking
/**************************************************************************** * I.MX6 U-Boot mkconfi ...
- Makefile 變數替換
Makefile SUBDIRS = xxx aaa BUILDSUBDIRS = $(SUBDIRS:%=build-%) CLEANSUBDIRS = $(SUBDIRS:%=clean-%) . ...
- Linux kernel config and makefile system
转载自:http://blog.csdn.net/dreamxu/article/details/6125545 http://www-900.ibm.com/developerWorks/cn/li ...
- LibOpenCM3(二) 项目模板 Makefile分析
目录 LibOpenCM3(一) Linux下命令行开发环境配置 LibOpenCM3(二) 项目模板 Makefile分析 LibOpenCM3 项目模板 项目模板地址: https://githu ...
- 说说Makefile那些事儿
说说Makefile那些事儿 |扬说|透过现象看本质 工作至今,一直对Makefile半知半解.突然某天幡然醒悟,觉得此举极为不妥,只得洗心革面从头学来,以前许多不明觉厉之处顿时茅塞顿开,想想好记性不 ...
- 编写一个通用的Makefile文件
1.1在这之前,我们需要了解程序的编译过程 a.预处理:检查语法错误,展开宏,包含头文件等 b.编译:*.c-->*.S c.汇编:*.S-->*.o d.链接:.o +库文件=*.exe ...
- 编写简单的Makefile文件
makefile中的编写内容如下: www:hello.c x.h gcc hello.c -o hello clean: rm hello www:hello.c x.h 表示生成www这个文件需 ...
- ★Kali信息收集~ 1.Google Hacking + Github Hacking
一.google hacking site site:cnblogs.com 毒逆天 intitle intitle:login allintitle allintitle:index of alli ...
随机推荐
- Mac系统安装MyEclipse
参考链接 http://blog.csdn.net/jin_kwok/article/details/51925523
- shiro对事务的影响
记一个 No transaction aspect-managed TransactionStatus in scope 错误的解决方法 昨天出现一个BUG,事务没有加回滚成功,修改管理员密码事务没有 ...
- LightOJ 1341 Aladdin and the Flying Carpet(唯一分解定理)
http://lightoj.com/volume_showproblem.php?problem=1341 题意:给你矩形的面积(矩形的边长都是正整数),让你求最小的边大于等于b的矩形的个数. 思路 ...
- NPM Scripts 2 -- rimraf copyfiles imagemin usemin htmlmin uglifyjs
NPM Scripts Part 2 Objectives and Outcomes In this exercise you will learn to build a distribution f ...
- 贯众云平台脚本编写之判断、循环以及shell命令的使用
最近使用贯众云平台工具写脚本,进行Ui界面的自动化测试.刚开始接触,确实碰到不少的问题,稍微难点的就是判断语句,循环语句以及shell命令的使用,尤其是对于咱们测试这样比较少接触代码的人来说. 其实吧 ...
- redis——redis主从复制
和MySQL主从复制的原因一样,Redis虽然读取写入的速度都特别快,但是也会产生读压力特别大的情况.为了分担读压力,Redis支持主从复制,Redis的主从结构可以采用一主多从或者级联结构,Redi ...
- nginx 日志搜集解决方案
# nginx 日志搜集解决方案 ## 系统环境描述 ``` java8 logstash --监控nginx日志文件 ``` ## 技术描述 ``` 通过logstash监控nginx access ...
- IntelliJ IDEA 2017 主题安装及配置
主题哪里下的? 网站:http://www.riaway.com/ 主题怎么安装? 然后选择文件,找到下载的主题,按步骤,重启之后即可使用: 主题如何配置? 以下所有配置基于 IntelliJ IDE ...
- ubuntu14.04安装hadoop2.6.0(伪分布模式)
版本:虚拟机下安装的ubuntu14.04(64位),hadoop-2.6.0 下面是hadoop2.6.0的官方英文教程: http://hadoop.apache.org/docs/r2.6.0/ ...
- Jenkins基础复习