lkml.org 
[lkml]   [2007]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-27 19:43    [W:0.098 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site