Problem inkluding *.h files when compiling module
Robert Staven
robert at stopthespam_remove.staven.no
Thu May 3 03:46:03 EST 2007
I suspect this is slightly 'off topic' but have seen similar threads in
the lists archive so I go for it.
Testing some code (UDP by sockets example), and it compiles and works
great on both host(i386) and target (mpc8250)
I move the code to a module I'm working on and when I compile (for the
embedded platform) some of the needed header files is not found.
I suspect this is cause I'm missing some basic understanding of how
gcc/makefile/compiling modules works. But can't find any useful info.
Snip from my makefile:
KDIR := /home/mykernel/linuxppc-2.6
SDIR := /home/prog/sdlc
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(SDIR) modules
The KDIR is the problem, header files not found is under this dir (or
sub dirs).
But KDIR is supposed to point to my kernel source, isn't it?
Checking with gcc I find the places to look for my header files:
# powerpc-linux-gcc -print-search-dirs
<snip>
libraries: =
/opt/amltd/powerpc-linux/gcc-3.4.3-glibc-2.3.5/lib/gcc/powerpc-linux/3.4.3/:
/usr/lib/gcc/powerpc-linux/3.4.3/:
/opt/amltd/powerpc-linux/gcc-3.4.3-glibc-2.3.5/lib/gcc/powerpc-linux/3.4.3/../../../../powerpc-linux/lib/powerpc-linux/3.4.3/:
/opt/amltd/powerpc-linux/gcc-3.4.3-glibc-2.3.5/lib/gcc/powerpc-linux/3.4.3/../../../../powerpc-linux/lib/
But these dirs dosn't have my kernel source (as needed by KDIR)?
Any way to give the makefile several paths to search for files needed?
Grateful for any tips, places to find info or more relevant mail-lists!
br
Robert Staven
More information about the Linuxppc-embedded
mailing list