All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: zippel@linux-m68k.org
Cc: <linux-kernel@vger.kernel.org>
Cc: sam@ravnborg.org, kbuild-devel@lists.sourceforge.net
Subject: [PATCH 1/3] [kbuild] Allow building of standalone .so libraries
Date: Mon, 12 Dec 2005 01:46:01 +0100	[thread overview]
Message-ID: <20051212004601.31263.49854.stgit@machine.or.cz> (raw)
In-Reply-To: <20051212004159.31263.89669.stgit@machine.or.cz>

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 <pasky@suse.cz>
---

 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))
 


  reply	other threads:[~2005-12-12  0:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-12  0:41 [PATCH 0/3] Link lxdialog with mconf directly Petr Baudis
2005-12-12  0:46 ` Petr Baudis [this message]
2005-12-12  0:46 ` [PATCH 2/3] [kbuild] Possibility to sanely link against off-directory .so Petr Baudis
2005-12-12  0:46 ` [PATCH 3/3] [kconfig] Direct use of lxdialog routines by menuconfig Petr Baudis
2005-12-12  3:18   ` Kurt Wall
2005-12-12 11:20     ` Petr Baudis
2005-12-13  2:59       ` Kurt Wall
2005-12-14 22:18   ` Roman Zippel
2005-12-16 20:29     ` Sam Ravnborg
2005-12-14 22:57   ` Jesper Juhl
2005-12-12 19:14 ` [PATCH 0/3] Link lxdialog with mconf directly Sam Ravnborg
2005-12-12 20:08   ` Petr Baudis
2005-12-12 20:40     ` Sam Ravnborg
2005-12-16 21:26     ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051212004601.31263.49854.stgit@machine.or.cz \
    --to=pasky@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.