mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
Use create-dir for installing dynamic libraries
This commit is contained in:
parent
ed0a8dd71a
commit
79b7c596a9
2 changed files with 5 additions and 4 deletions
|
@ -4,7 +4,7 @@ define create-dir =
|
||||||
ifndef $(1)_SEEN
|
ifndef $(1)_SEEN
|
||||||
$(1)_SEEN = 1
|
$(1)_SEEN = 1
|
||||||
$(1):
|
$(1):
|
||||||
install -d $(1)
|
$(QUIET) install -d $(1)
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -18,6 +18,6 @@ define install-file-in =
|
||||||
$$(eval $$(call create-dir,$(1)))
|
$$(eval $$(call create-dir,$(1)))
|
||||||
|
|
||||||
$(1)/$(notdir $(2)): $(2) | $(1)
|
$(1)/$(notdir $(2)): $(2) | $(1)
|
||||||
install -t $(1) $(2)
|
$(QUIET) install -t $(1) $(2)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -56,8 +56,9 @@ define build-library =
|
||||||
|
|
||||||
_libs_final := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_INSTALL_PATH))
|
_libs_final := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_INSTALL_PATH))
|
||||||
|
|
||||||
$$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final)
|
$$(eval $$(call create-dir,$$($(1)_INSTALL_DIR)))
|
||||||
install -d $$($(1)_INSTALL_DIR)
|
|
||||||
|
$$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $$($(1)_INSTALL_DIR)
|
||||||
$(QUIET) $(CXX) -o $$@ -shared $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
|
$(QUIET) $(CXX) -o $$@ -shared $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
|
||||||
|
|
||||||
$(1)_LDFLAGS_USE_INSTALLED += -L$$($(1)_INSTALL_DIR) -Wl,-rpath,$$($(1)_INSTALL_DIR) -l$$(patsubst lib%,%,$$(strip $$($(1)_NAME)))
|
$(1)_LDFLAGS_USE_INSTALLED += -L$$($(1)_INSTALL_DIR) -Wl,-rpath,$$($(1)_INSTALL_DIR) -l$$(patsubst lib%,%,$$(strip $$($(1)_NAME)))
|
||||||
|
|
Loading…
Reference in a new issue