mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
nmk: build.mk -- Add @libso-y helper
To link dynamic libs (libcompel for example). Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
4a19618ea2
commit
6094b643dc
1 changed files with 12 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ ld_flags :=
|
|||
cleanup-y :=
|
||||
mrproper-y :=
|
||||
objdirs :=
|
||||
libso-y :=
|
||||
|
||||
MAKECMDGOALS := $(call uniq,$(MAKECMDGOALS))
|
||||
|
||||
|
|
@ -219,6 +220,17 @@ cleanup-y += $(obj)/$(1)
|
|||
endef
|
||||
$(foreach t,$(hostprogs-y),$(eval $(call gen-host-rules,$(t))))
|
||||
|
||||
#
|
||||
# Dynamic library linking.
|
||||
define gen-so-link-rules
|
||||
$(call objectify,$(1)).so: $(call objectify,$($(1)-objs)) $(src-makefile)
|
||||
$$(call msg-link, $$@)
|
||||
$$(Q) $$(CC) -shared $$(ldflags-so) $$(LDFLAGS) $$(LDFLAGS_$$(@F)) -o $$@ $(call objectify,$($(1)-objs))
|
||||
all-y += $(call objectify,$(1)).so
|
||||
cleanup-y += $(call objectify,$(1)).so
|
||||
endef
|
||||
$(foreach t,$(libso-y),$(eval $(call gen-so-link-rules,$(t))))
|
||||
|
||||
#
|
||||
# Figure out if the target we're building needs deps to include.
|
||||
define collect-deps
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue