Re: simple module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Makefile:
>
> obj-m += hello-1.o
> all:
>         make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
> clean:
>         make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
>

There's a problem wit your make command...try this instead

obj-m += hello-1.o
all:
        make -C /lib/modules/`uname -r`/build M=$(PWD) modules
clean:
        make -C /lib/modules/`uname -r`/build M=$(PWD) clean

HTH,
-mandeep


>
>
>
> on make i get the following:
>
> [root@localhost Desktop]# make
> uname: extra operand `-r'
> Try `uname --help' for more information.
> uname: extra operand `-r'
> Try `uname --help' for more information.
> make: Nothing to be done for `all'.
>
>
>
> i just want hello world printed and when i do lsmod i want to see my module
>
>
>
>
>
>
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux