[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45BB9D17.50902@redhat.com>
Date: Sat, 27 Jan 2007 16:42:31 -0200
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Jan Engelhardt <jengelh@...ux01.gwdg.de>
CC: Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org
Subject: Re: External module Makefile with generated C file
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists