LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Problem inkluding *.h files when compiling module
@ 2007-05-02 17:46 Robert Staven
  0 siblings, 0 replies; only message in thread
From: Robert Staven @ 2007-05-02 17:46 UTC (permalink / raw)
  To: linuxppc-embedded

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-02 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02 17:46 Problem inkluding *.h files when compiling module Robert Staven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox