Results 1 to 4 of 4

Thread: ERROR **No rule to make target `modules` Stop

  1. #1
    varunnayyar NNTP User

    Default ERROR **No rule to make target `modules` Stop

    I am trying to make my kernel space program (I am using suse linux 11.0)

    Here is my Makefile

    obj -m:= new.o

    default:
    $(MAKE) -C /lib/modules/$(shell uname -r)/build M=`pwd` modules

    I am getting following Error

    make[1]: Entering directory `/usr/src/linux-2.6.25.5-1.1-obj/x86_64/default'
    make[1]: *** No rule to make target `modules'. Stop.
    make[1]: Leaving directory `/usr/src/linux-2.6.25.5-1.1-obj/x86_64/default'
    make: *** [default] Error 2

    please help me out.

  2. #2
    yangzhichina NNTP User

    Default Re: ERROR **No rule to make target `modules` Stop

    Your path is wrong. It is not /lib/modules/$(shell uname -r)/build. In my system, what my wrote down is /usr/src/linux-obj/i586/debug. It works. Of course, you should make sure the kernel source and kernel objs are installed.

    My Makefile is as fellow: (openSUSE 11.1)

    # Makefile
    #

    obj-m := new.o

    all:
    make -C /usr/src/linux-obj/i586/debug M=`pwd` modules

    clean:
    make -C /usr/src/linux-obj/i586/debug M=`pwd` clean


    I think it should work for you.

  3. #3

    Thumbs up Re: ERROR **No rule to make target `modules` Stop

    # Makefile
    #

    obj-m := new.o

    all:
    <------->make -C /usr/src/linux-obj/i586/debug M=`pwd` modules

    clean:
    <------->make -C /usr/src/linux-obj/i586/debug M=`pwd` clean



    Give tab space before the make command and Check your path where you kept source tree.

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: ERROR **No rule to make target `modules` Stop

    On 2012-07-07 18:46, manickaraj wrote:

    > Give tab space before the make command and Check your path where you
    > kept source tree.


    Please notice that this is a thread abandoned in 2009.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •