[ECOS] about makefile
张 亮
johnsonest@hotmail.com
Thu Sep 26 02:37:00 GMT 2002
Dear nickg,
i have difficulty in orgnizing my header file and source file with
makefile:
I create two folder ,named after "include" and "src" in current directory:
>ls
include src test.c
in test.c, i want to call codes in "include" and "src" folder:
#include <stdio.h>
#include "cs.h" //in include folder
int main()
{
....
...
call fucntions in file "cs.c" in folder "src"
...
}
to compile this
my makefile is:
HEADER_DIR = include
test: test.o cs.o
gcc -o test test.o cs.o
test.o: test.c cs.h
gcc -c test.c
cs.o : cs.c cs.h
gcc -c cs.c -I$(SOURCE_DIR)
clean:
-rm *.o
but:
>make
make: *** No rule to make target `cs.c', needed by `cs.o'. Stop.
in fact,my cs.c is a set of functions called each other,no entry function.
i am a newcomer about makefile,could you check my makefile ,tell me where
error occur?
thank you very much !!!!!!!!!!!!!
>From: Nick Garnett <nickg@ecoscentric.com>
>To: ÃÃ
ÃÃ <johnsonest@hotmail.com>
>CC: ecos-discuss@sources.redhat.com
>Subject: Re: [ECOS] Re: On ecos interrupt process
>Date: 25 Sep 2002 18:11:58 +0100
>
>ÃÃ
ÃÃ <johnsonest@hotmail.com> writes:
>
> > Hi,nickg!
> > thank you very much,I think i have grasped it!
> > Now,i want study linux source code and want to modify linux kernel
,
> > but lack of some directions,for example,how to establish linux debug
> > enviorment?
> > could you help me?
> >
>
>I know very little about the details of the Linux kernel -- it has
>little relevance to the kind of stuff I do. I believe that debugging
>the Linux kernel is not easy.
>
>--
>Nick Garnett - eCos Kernel Architect
>http://www.eCosCentric.com/
_________________________________________________________________
Ãëê»úµÃÃ
óÃýøÃý»Ã÷£¬ÃëùÃà MSN Messenger:
http://messenger.microsoft.com/cn/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list