I had the same problem with XFS. Code split over multiple directories,
code in the sub directories had to be compiled for modules but not be
installed as a module, instead the sub directory objects are linked
into the parent directory then the whole is installed as one module.
Is that your problem?
In the parent Makefile
--------
O_TARGET := foo.o
obj-m := $(O_TARGET)
foo_subdirs := sub directory list
subdir-$(CONFIG_FOO_DRV) += $(foo_subdirs)
obj-y += $(foreach dir,$(foo_subdirs),$(dir)/$(dir).o)
....
include $(TOPDIR)/Rules.make
# This is really nasty, but Rules.make was never designed for multi directory
# modules and it can race on parallel build. Keith Owens.
foo.o: $(patsubst %,_modsubdir_%,$(subdir-m))
--------
In each sub directory
--------
O_TARGET := $(notdir $(CURDIR)).o
ifneq ($(MAKECMDGOALS),modules_install)
obj-m := $(O_TARGET)
endif
obj-y += list of sub directory objects
--------
This is so much easier in kbuild 2.5 :).
-
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/