Compilation de module helloworld

Bonjour,

Je tape mon programme helloworld, puis je tape le makefile et finalement je tape la commande make, il m'affiche ce message:

make: Rien à faire pour

S'il vous plait, aidez-moi

Merci d'avance.

2 réponses

  • Votes
  • Date
  • Date décroissante
  1. voilà le programme ==============>
    #include <linux/module.h>
    #include <linux/kernel.h>
    int init_module(void)
    {
    printk(KERN_INFO "Hello world 1.\n");
    /*
    * * A non 0 return means init_module failed; module can't be loaded.
    * */
    return 0;
    }
    void cleanup_module(void)
    {
    printk(KERN_INFO "Goodbye world 1.\n");
    }
    et voilà le makefile
    obj-m = hello.o
    KVERSION = $(shell uname -r)
    all:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
    clean:
    make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean