Hi , i want to compile a standalone kernel module for linux kernel version 2.6 or 3.0 . A basic Makefile goes like this : ================== 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 ==================== i want to add debugging symbols information ( using -g option ) also via CFLAGS usage flag . can i be guided how to modify this basic Makefile to add CFLAGS information for adding debugging symbols information . Regards Amit Nagal
you can pass KCONFIG environment variable or 'ccflags-y' variable in makefile. for more information please look at; http://lxr.linux.no/linux+v3.4.4/Documentation/kbuild/kbuild.txt http://lxr.linux.no/linux+v3.4.4/Documentation/kbuild/makefiles.txt On Thu, Jun 28, 2012 at 7:47 AM, Amit Nagal <helloin.amit@gmail.com> wrote:
Hi ,
i want to compile a standalone kernel module for linux kernel version 2.6 or 3.0 .
A basic Makefile goes like this :
================== 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
====================
i want to add debugging symbols information ( using -g option ) also via CFLAGS usage flag .
can i be guided how to modify this basic Makefile to add CFLAGS information for adding debugging symbols information .
Regards Amit Nagal
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (2)
-
Amit Nagal -
Sinan Nalkaya