Results 1 to 4 of 4
Hi. I'm compiling a module for my linux kernel, and I'm working in the eclipse ganymede editor for C/C++.
Code:
obj-m += main.o
all:
make -C /lib/modules/$(shell uname -r)/build SUBDIRS=$(PWD) ...
- 11-05-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 7
Strange make
Hi. I'm compiling a module for my linux kernel, and I'm working in the eclipse ganymede editor for C/C++.
Giving the command to build all goes fine if I put makefile and other C files on Desktop, but if I try to compile inside Eclipse I get this message:Code:obj-m += main.o all: make -C /lib/modules/$(shell uname -r)/build SUBDIRS=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Why does this happen? What's the solution for this matter? Thank you allCode:**** Build of configuration Default for project OMEGA_module **** make all make -C /lib/modules/2.6.28-15-generic/build SUBDIRS=/home/user/Job /Workspace/Module modules make[1]: entering directory «/usr/src/linux-headers-2.6.28-15-generic» make[1]: *** No rule to create objective «/Workspace/Module». make[1]: exiting directory «/usr/src/linux-headers-2.6.28-15-generic» make: *** [all] Error 2
- 11-05-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
It looks like it is looking for a directory with a space in the name for SUBDIRS. You need to change the name of the direcory "/home/user/Job " to "/home/user/Job". Note that you will probably need to change some directory settings in your Eclipse environment as well that use the old version of the name (with the space) to use the new one.
Alternatively, you can enclose the PWD variable in the Makefile with double quotes so that the SUBDIRS variable is passed correctly to the subsequent call to make. Note that you would have to do this for all uses of the PWD variable.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-05-2009 #3Just Joined!
- Join Date
- Oct 2009
- Posts
- 7
The problem was just due to a phantomatic " " in the folder name, which I probably pressed when I created that directory, so make was interpreting that as a real space and searching for a target which was instead a part of a path.
Thank you!
- 11-05-2009 #4


Reply With Quote
