mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Dragoslav Zaric <zaricdragoslav@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Makefile for kernel modules
Date: Mon, 4 Oct 2010 10:32:07 +0800	[thread overview]
Message-ID: <20101004023207.GB5189@cr0.nay.redhat.com> (raw)
In-Reply-To: <AANLkTikKjP-VLkygYbyg8THiCuM=vBfGaqq49+cuBj6u@mail.gmail.com>

On Sat, Oct 02, 2010 at 09:20:16PM +0400, Dragoslav Zaric wrote:
...
>
>But if I have two kernel modules source files, for example, start.c
>and stop.c, my Makefile will look like this:
>---------------------------------------------------------------------------
>obj-m += startstop.o
>startstop-objs := start.o stop.o

startstop-objs should be startstop-y

>
>all:
>	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
>clean:
>	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
>---------------------------------------------------------------------------
>But this does not work on my machine, it runs without errors but does
>not produce startstop.ko file.
>Also, when I run make on my machine, first line that appears is:
>---------------------------------------------------------------------------
>make -C /lib/modules/2.6.33.7-rt29/build
>M=/home/maiev/work/modules/parts modules
>---------------------------------------------------------------------------
>
>So, does anybody know what are lines for manual kernel module
>compilation using probably gcc,
>without 'obj-m +=' or at least how Makefile should look for multiple
>kernel module source files ???
>

Please read Documentation/kbuild/modules.txt.

Thanks.

      parent reply	other threads:[~2010-10-04  2:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-02 17:20 Dragoslav Zaric
2010-10-02 17:53 ` Davidlohr Bueso
2010-10-04  2:32 ` Américo Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101004023207.GB5189@cr0.nay.redhat.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zaricdragoslav@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®