makefile编译求助:<br /><br />我现在模仿skyeye的整个工程结构在自己写些东西,对于makefile是刚开始真正的开始自己动手写。在实际过有些问题,不知道明白为什么,问题如下:<br /><br />1.工程结构是这样的:<br /><br />1.1 图<br /><br />http://bbs.21ic.com/upfiles/img/20084/200841419158599.jpg<br /><br />1.2 <br />[root@localhost ea2]# ls arch/ebsa110/<br />sa110_init.c sa110_init.c.bak sa110_init.h sa110_init.h.bak start.S<br /><br />[root@localhost ea2]# ls kernel/ucos/<br />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<br /><br />[root@localhost ea2]# ls samples/<br />dir.make dir.make.bak rules.make rules.make.bak samples.lds ucos_test<br /><br />[root@localhost ea2]# ls samples/ucos_test/<br />main_entry.c main_entry.c.bak makefile makefile.bak<br /><br />2.现在进入samples/ucos_test进行make<br />结果是:<br />[root@localhost ucos_test]# make<br />+ compiling c file with .depend ... :<br />gcc -c -Wall -Wstrict-prototypes -Wno-trigraphs -g -fno-strict-aliasing -fno-common -fno-common -pipe -fno-builtin -I../../kernel/ucos/ -I../../arch/ebsa110/<br />gcc: no input files<br />make: *** [start.o] Error 1<br /><br />3.在samples/ucos_test下面的makefile有下面的<br /># include the all-project-shared file <br />include ../rules.make<br />,另外, 在上一级的rule.make中有下面的命令,也就是实际运行的命令:<br /><br /># define rules for build *.c & *.S files<br />%.o:<br /> @echo + compiling c file with .depend ... : $< <br /> @echo $(CC) -c $(CPFLAGS) $(INCDIR) $(<:.o=.c)<br /> @$(CC) -c $(CPFLAGS) $(INCDIR) $(<:.o=.c)<br /> @echo<br /><br />从echo的信息来看,是这句<br />@$(CC) -c $(CPFLAGS) $(INCDIR) $(<:.o=.c)有问题,gcc说没有文件输入。但是,从echo的路径来看,相应的文件夹下面是有文件的啊?<br />刚接触,不知道这个路径应该是怎么组织的。望达人指教下。 |
|