This patch allows specifying .so libraries directly in 'hostprogs-y'. I need to create a .so library not linked to anything in the scripts/lxdialog/ directory.
Signed-off-by: Petr Baudis <[EMAIL PROTECTED]> --- scripts/Makefile.host | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 2d51970..ff1b54d 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -29,6 +29,12 @@ # conf.c is compiled as a c program, and conf.o is linked together with # libkconfig.so as the executable conf. # Note: Shared libraries consisting of C++ files are not supported +# +# hostprogs-y := liblxdialog.so +# liblxdialog-objs := checklist.o util.o +# Will create a "standalone" liblxdialog.so library in the directory, +# not linked against anything (useful when you want to link something +# to it later). __hostprogs := $(sort $(hostprogs-y)$(hostprogs-m)) @@ -39,7 +45,7 @@ obj-dirs := $(strip $(sort $(filter-out # C code # Executables compiled from a single .c file -host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) +host-csingle := $(foreach m,$(__hostprogs),$(if $($(m:.so=)-objs),,$(m))) # C executables linked based on several .o files host-cmulti := $(foreach m,$(__hostprogs),\ @@ -57,8 +63,10 @@ host-cxxmulti := $(foreach m,$(__hostpro host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs))) # Shared libaries (only .c supported) -# Shared libraries (.so) - all .so files referenced in "xxx-objs" -host-cshlib := $(sort $(filter %.so, $(host-cobjs))) +# Shared libraries (.so) - all .so files referenced in "xxx-objs", and +# also standalone .so's referenced in hostprogs. +host-cshlib := $(sort $(filter %.so, $(host-cobjs))) \ + $(sort $(filter %.so, $(__hostprogs))) # Remove .so files from "xxx-objs" host-cobjs := $(filter-out %.so,$(host-cobjs)) ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ kbuild-devel mailing list kbuild-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kbuild-devel