[Letux-kernel] Question to Kbuild specialists: build multiple kenrel moduled from single directory/Makefile?

H. Nikolaus Schaller hns at goldelico.com
Thu Oct 27 16:27:50 CEST 2016


Hi,
is it somehow possible to write a Kbuild Makefile
so that it builds the same code multiple times
with different CONFIGs or -DDEFINE into separate
modules?

The idea is to build all variants of the pvr-sgx
code (release / debug, revision 110/120/121/125).

So that we get a total of 8 .ko modules from the
same source.

Most likely this can not be done by standard
Kbuild mechanisms but in the end it is still a
Makefile.

So could it be possible by recursively calling
itself like:

all:
	CONFIG=bla; make
	CONFIG=ble; make
	CONTIG=bli; make

etc?

BR,
Nikolaus



More information about the Letux-kernel mailing list