3904
- 收藏
- 点赞
- 分享
- 举报
【已解决】makefile嵌套调用问题
本帖最后由 hanfei69882 于 2016-12-20 16:28 编辑
目标:去除编译警告
在顶层makefile里面编译子目录下的代码会有警告,调用方法如下
$(MAKE) -C $(OSDRV_DIR)/tools/board/reg-tools-1.0.0 >/dev/null
在shell窗口进入目录直接make命令是没有警告的
头疼几天了,有明白的朋友指点一下:handshake
警告log如下
[code]make -C /home/fly/share/trunk/osdrv/tools/board/reg-tools-1.0.0 >/dev/null
source/tools/hil2s.c: In function ‘hil2s’:
source/tools/hil2s.c:123:3: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
second = atoi(argv[1]);
^
source/tools/i2c_ops.c: In function ‘i2c_read’:
source/tools/i2c_ops.c:79:3: warning: passing argument 2 of ‘StrToNumber’ from incompatible pointer type [enabled by default]
if (StrToNumber(argv, &tmp)) {
^
In file included from source/tools/i2c_ops.c:12:0:
include/utils/strfunc.h:33:19: note: expected ‘U32 *’ but argument is of type ‘unsigned int *’
EXTERNFUNC HI_RET StrToNumber(IN CHAR *str , OUT U32 * ulValue);
^
source/tools/i2c_ops.c: In function ‘i2c_write’:
source/tools/i2c_ops.c:202:3: warning: passing argument 2 of ‘StrToNumber’ from incompatible pointer type [enabled by default]
if (StrToNumber(argv, &tmp)) {
^
In file included from source/tools/i2c_ops.c:12:0:
include/utils/strfunc.h:33:19: note: expected ‘U32 *’ but argument is of type ‘unsigned int *’
EXTERNFUNC HI_RET StrToNumber(IN CHAR *str , OUT U32 * ulValue);
^
source/tools/ssp_rw.c: In function ‘ssp_read’:
source/tools/ssp_rw.c:322:3: warning: passing argument 1 of ‘reverse8’ from incompatible pointer type [enabled by default]
reverse8(&tmp, 1);
^
source/tools/ssp_rw.c:131:6: note: expected ‘unsigned char *’ but argument is of type ‘int *’
void reverse8(unsigned char *buf, unsigned int len)
^
[/code]
直接make log如下
[code]osdrv/tools/board/reg-tools-1.0.0$ make V=1
arm-hisiv300-linux-gcc -o "btools" source/hi_message.o source/hi_thread.o source/hi_dbg.o source/cmdshell.o source/argparser.o source/strfunc.o source/memmap.o -lpthread -lrt -mcpu=arm926ej-s source/btools.o source/himd.o source/himm.o source/himc.o source/hivd.o source/hiddrs.o source/hil2s.o source/hii2c.o source/i2c_ops.o source/ssp_rw.o
arm-hisiv300-linux-strip btools
ln -s btools himd
ln -s btools himd.l
ln -s btools himm
ln -s btools himc
ln -s btools hiddrs
ln -s btools hil2s
ln -s btools hier
ln -s btools hiew
ln -s btools i2c_read
ln -s btools i2c_write
ln -s btools ssp_read
ln -s btools ssp_write
mkdir -p bin/
mv hi* bin
mv i2c* bin
mv ssp* bin
mv btools bin
[/code]
目标:去除编译警告
在顶层makefile里面编译子目录下的代码会有警告,调用方法如下
$(MAKE) -C $(OSDRV_DIR)/tools/board/reg-tools-1.0.0 >/dev/null
在shell窗口进入目录直接make命令是没有警告的
头疼几天了,有明白的朋友指点一下:handshake
警告log如下
[code]make -C /home/fly/share/trunk/osdrv/tools/board/reg-tools-1.0.0 >/dev/null
source/tools/hil2s.c: In function ‘hil2s’:
source/tools/hil2s.c:123:3: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
second = atoi(argv[1]);
^
source/tools/i2c_ops.c: In function ‘i2c_read’:
source/tools/i2c_ops.c:79:3: warning: passing argument 2 of ‘StrToNumber’ from incompatible pointer type [enabled by default]
if (StrToNumber(argv, &tmp)) {
^
In file included from source/tools/i2c_ops.c:12:0:
include/utils/strfunc.h:33:19: note: expected ‘U32 *’ but argument is of type ‘unsigned int *’
EXTERNFUNC HI_RET StrToNumber(IN CHAR *str , OUT U32 * ulValue);
^
source/tools/i2c_ops.c: In function ‘i2c_write’:
source/tools/i2c_ops.c:202:3: warning: passing argument 2 of ‘StrToNumber’ from incompatible pointer type [enabled by default]
if (StrToNumber(argv, &tmp)) {
^
In file included from source/tools/i2c_ops.c:12:0:
include/utils/strfunc.h:33:19: note: expected ‘U32 *’ but argument is of type ‘unsigned int *’
EXTERNFUNC HI_RET StrToNumber(IN CHAR *str , OUT U32 * ulValue);
^
source/tools/ssp_rw.c: In function ‘ssp_read’:
source/tools/ssp_rw.c:322:3: warning: passing argument 1 of ‘reverse8’ from incompatible pointer type [enabled by default]
reverse8(&tmp, 1);
^
source/tools/ssp_rw.c:131:6: note: expected ‘unsigned char *’ but argument is of type ‘int *’
void reverse8(unsigned char *buf, unsigned int len)
^
[/code]
直接make log如下
[code]osdrv/tools/board/reg-tools-1.0.0$ make V=1
arm-hisiv300-linux-gcc -o "btools" source/hi_message.o source/hi_thread.o source/hi_dbg.o source/cmdshell.o source/argparser.o source/strfunc.o source/memmap.o -lpthread -lrt -mcpu=arm926ej-s source/btools.o source/himd.o source/himm.o source/himc.o source/hivd.o source/hiddrs.o source/hil2s.o source/hii2c.o source/i2c_ops.o source/ssp_rw.o
arm-hisiv300-linux-strip btools
ln -s btools himd
ln -s btools himd.l
ln -s btools himm
ln -s btools himc
ln -s btools hiddrs
ln -s btools hil2s
ln -s btools hier
ln -s btools hiew
ln -s btools i2c_read
ln -s btools i2c_write
ln -s btools ssp_read
ln -s btools ssp_write
mkdir -p bin/
mv hi* bin
mv i2c* bin
mv ssp* bin
mv btools bin
[/code]
我来回答
回答1个
时间排序
认可量排序
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2016-10-14 11:06:48
-
2016-03-17 00:21:44
-
2016-10-26 11:55:21
-
2019-01-07 17:00:59
-
2015-01-15 10:30:55
-
2017-07-04 21:43:48
-
2016-10-28 10:34:01
-
2016-07-19 14:15:45
-
2016-04-18 17:28:35
-
2016-08-05 16:27:37
-
2018-06-25 22:00:13
-
2015-09-08 14:06:59
-
2018-06-20 10:49:43
-
2017-04-27 18:38:30
-
2012-12-05 14:02:38
-
2016-07-10 22:33:25
-
22018-12-27 18:56:09
-
2014-10-20 10:16:51
-
2019-12-09 19:08:12
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
-
10求HI3519DV500_SDK_V2.0.1.1
-
5有偿求HI3516DV500 + OV5647驱动
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认