public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Sam Ravnborg <sam@ravnborg.org>, linux-kernel@vger.kernel.org
Subject: Re: External module Makefile with generated C file
Date: Sat, 27 Jan 2007 16:42:31 -0200	[thread overview]
Message-ID: <45BB9D17.50902@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0701271929220.22295@yvahk01.tjqt.qr>

Jan Engelhardt wrote:
>> ctracer_methods.o: ctracer_methods.c
>>     
>
> $(obj)/ctracer_methods.o: $(src)/ctracer_methods.c
>
> $(src)/ctracer_methods.c:
>   ...
>
>
>
> I don't know if $(obj) or $(src) is the right thing, but something along
> these lines is required for OOT.
>   

Thanks, that did the trick, resulting Makefile:

obj-m := ctracer.o

ctracer-y := ctracer_methods.o ctracer_jprobe.o

# Files generated that shall be removed upon make clean
clean-files := ctracer_methods.c

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

default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
        rm -f *.mod.c *.ko *.o ctracer_methods.c

$(obj)/ctracer_methods.o: ctracer_methods.c

$(src)/ctracer_methods.c:
        ctracer /usr/lib/debug/lib/modules/$(shell uname -r)/vmlinux 
$(CLASS) > $@

- Arnaldo



      reply	other threads:[~2007-01-27 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-27 18:15 External module Makefile with generated C file Arnaldo Carvalho de Melo
2007-01-27 18:30 ` Jan Engelhardt
2007-01-27 18:42   ` Arnaldo Carvalho de Melo [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=45BB9D17.50902@redhat.com \
    --to=acme@redhat.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /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