免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1664 | 回复: 0
打印 上一主题 下一主题

熟悉makefile skyeye的来!没有input file(有点长) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-14 19:04 |只看该作者 |倒序浏览
makefile编译求助:

我现在模仿skyeye的整个工程结构在自己写些东西,对于makefile是刚开始真正的开始自己动手写。在实际过有些问题,不知道明白为什么,问题如下:

1.工程结构是这样的:

1.1 图





1.2
[root@localhost ea2]# ls arch/ebsa110/
sa110_init.c  sa110_init.c.bak  sa110_init.h  sa110_init.h.bak  start.S

[root@localhost ea2]# ls kernel/ucos/
CVS  includes.h  os_cfg.h  os_core.c  os_cpu_a.S  os_cpu_c.c  os_cpu.h  os_mbox.c  os_mem.c  os_mutex.c  os_q.c  os_sem.c  os_task.c  os_time.c  ucos_ii.h

[root@localhost ea2]# ls samples/
dir.make  dir.make.bak  rules.make  rules.make.bak  samples.lds  ucos_test

[root@localhost ea2]# ls samples/ucos_test/
main_entry.c  main_entry.c.bak  makefile  makefile.bak

2.现在进入samples/ucos_test进行make
结果是:
[root@localhost ucos_test]# make
+ compiling c file with .depend ... :
gcc -c -Wall -Wstrict-prototypes -Wno-trigraphs -g -fno-strict-aliasing -fno-common -fno-common -pipe -fno-builtin -I../../kernel/ucos/ -I../../arch/ebsa110/
gcc: no input files
make: *** [start.o] Error 1

3.在samples/ucos_test下面的makefile有下面的
# include the all-project-shared file
include ../rules.make
,另外, 在上一级的rule.make中有下面的命令,也就是实际运行的命令:

# define rules for build *.c & *.S files
%.o:
        @echo + compiling c file with .depend ... : $<
        @echo $(CC) -c $(CPFLAGS) $(INCDIR) $(<:.o=.c)
        @$(CC) -c $(CPFLAGS) $(INCDIR) $(<:.o=.c)
        @echo

从echo的信息来看,是这句
@$(CC) -c $(CPFLAGS) $(INCDIR) $(<:.o=.c)有问题,gcc说没有文件输入。但是,从echo的路径来看,相应的文件夹下面是有文件的啊?
刚接触,不知道这个路径应该是怎么组织的。望达人指教下。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP