lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 25 Feb 2009 21:08:11 +0800
From:	des <desperatephilosopher@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: module buid issue with kbuild

Hi,
I have an issue building my kernel modules, generally the makefile
should look like:

obj-m = my_mod.o
my_mod-objs := $(the_obj_file_list)

if I list the obj files explicitly like
the_obj_file_list := a/obj1.o b/obj2.o c/obj3.o, it seems fine

Sometime there are too many obj files to add, so I want make to search
it automatically, so I use:
#find each of the .c files
mods := $(sort $(dir $(shell find . -name '*.c' -print)))
sources := $(wildcard $(addsuffix *.c,$(mods)))
#make the obj file list
objects := $(subst .c,.o,$(sources))
#remove the prefixing ./
myobjects := $(subst ./,,$(objects))

obj-m = my_mod.o
my_mod-objs := $(myobjects)
$(myobjects) should be exactly the same as $(the_obj_file_list) above,
I printed them in the makefile.

Unfortunately this does not work, it gives error messages below:
make[2]: *** No rule to make target
`/home/user/workingdir/scripts/bin2c.s', needed by
`/home/user/workingdir/scripts/bin2c.o'.  Stop.

Obviously bin2c is not in my working dir, it is in the kbuild directory.

I wonder if there is any way at all to avoid to write the full obj
list, it's really annoying.

Thanks a lot.
If you reply this post, please also CC to this address.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ