mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Getting errors in compilation of Hello World!
@ 2005-02-09 14:36 Deepti Patel
  2005-02-09 14:59 ` linux-os
  0 siblings, 1 reply; 2+ messages in thread
From: Deepti Patel @ 2005-02-09 14:36 UTC (permalink / raw)
  To: linux-kernel

Hi all,
I am new to Linux. I am tring to load a module in kernel of 'Fedora core2'.
I wrote a simple Hello world program and tring to compile it with Makefile. I tried 3 differnt types of make file but still it is giving me error. I will really appritiate any help.
 
Here is my Hello world program:

    #include <linux/init.h>
    #include <linux/module.h>
    #include <linux/kernel.h>

    static int hello_init(void)
    {
        printk(KERN_ALERT "Hello, world\n");
        return 0;
    }

    static void hello_exit(void)
    {
        printk(KERN_ALERT "Goodbye, cruel world\n");
    }

    module_init(hello_init);
    module_exit(hello_exit);


Here is the Makefile:

ifneq ($(KERNELRELEASE),)
obj-m:= hello.o

else
KDIR:= /lib/modules/$(shell uname -r)/build
PWD:= $(shell pwd)

default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

Problem here is once I type the command "make" at the shell prompt it gives the following message :

$ make: Nothing to be done for 'default'


-- 
_______________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-09 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-09 14:36 Getting errors in compilation of Hello World! Deepti Patel
2005-02-09 14:59 ` linux-os

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

all inboxes | Powered by JetHome®