Hi,
ok, I have my kernel.c and some headerfiles in my own include directory... .
Do I only need to compile my kernel.c or also the headerfiles? And how do I manage, that the #include directory is not /usr/include?
How to compile my kernel
Re: How to compile my kernel
Well, if you includes are in the same directory as your kernel.c then simply include them like this(notice the quotes):
#include "whatever.h"
That will make the compiler look for the includes in the directory that your kernel.c is in.
Do I only need to compile my kernel.c or also the headerfiles?
Both. If you just say:
gcc kernel.c
or more likly:
gcc -c kernel.c
(then link kernel.o to a flat binary)
The includes should be automaticly compiled into kernel.o so they should stay when you link kernel.o
K.J.
#include "whatever.h"
That will make the compiler look for the includes in the directory that your kernel.c is in.
Do I only need to compile my kernel.c or also the headerfiles?
Both. If you just say:
gcc kernel.c
or more likly:
gcc -c kernel.c
(then link kernel.o to a flat binary)
The includes should be automaticly compiled into kernel.o so they should stay when you link kernel.o
K.J.