打印

熟悉makefile skyeye的来!没有input file(有点长)

[复制链接]
1370|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
luocolor|  楼主 | 2008-4-14 19:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
makefile编译求助:

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

1.工程结构是这样的:

1.1 图

https://bbs.21ic.com/upfiles/img/20084/200841419158599.jpg

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的路径来看,相应的文件夹下面是有文件的啊?
刚接触,不知道这个路径应该是怎么组织的。望达人指教下。

相关帖子

沙发
luocolor|  楼主 | 2008-4-14 19:03 | 只看该作者

图跑到最后了

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

40

主题

105

帖子

0

粉丝