Commit 93beda26 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

Link system libraries first

Because they may be needed by our own libraries.
parent 8e149bca
Pipeline #59 skipped
......@@ -63,6 +63,12 @@ define COMMON_REGISTER
$(1): $$(patsubst %,$(O)/.objs/$(3)%.o,$$($(2)_MODULES))
$(1): CFLAGS_ALL += $$($(2)_CFLAGS) $$(foreach CONFIG,$$($(2)_PKG_CONFIGS),$$(shell pkg-config --cflags $$(CONFIG))) $$(foreach CONFIG,$$($(2)_EXE_CONFIGS),$$(shell $$(CONFIG)-config --cflags))
$(1): LDFLAGS_ALL += $$($(2)_LDFLAGS) $$(foreach CONFIG,$$($(2)_PKG_CONFIGS),$$(shell pkg-config --libs $$(CONFIG))) $$(foreach CONFIG,$$($(2)_EXE_CONFIGS),$$(shell $$(CONFIG)-config --libs))
ifdef STATIC_GLOBAL
# TODO: The system libraries?
else
$(1): LINK_LIBRARIES += $$(addprefix -l,$$($(2)_SYSTEM_LIBS))
$(1): LINK_SO_LIBRARIES += $$(addprefix -l,$$($(2)_SO_LIBS))
endif
ifdef STATIC_LOCAL
$(1): LINK_LIBRARIES += $$(patsubst %,$(O)/lib/lib%.a,$$($(2)_LOCAL_LIBS))
$(1): $$(patsubst %,$(O)/lib/lib%.a,$$($(2)_LOCAL_LIBS))
......@@ -70,12 +76,6 @@ else
$(1): LINK_LIBRARIES += -L$(O)/lib -Wl,-R$(abspath $(O)/lib) $$(addprefix -l,$$($(2)_LOCAL_LIBS))
$(1): $$(patsubst %,$(O)/lib/lib%.so,$$($(2)_LOCAL_LIBS))
endif
ifdef STATIC_GLOBAL
# TODO: The system libraries?
else
$(1): LINK_LIBRARIES += $$(addprefix -l,$$($(2)_SYSTEM_LIBS))
$(1): LINK_SO_LIBRARIES += $$(addprefix -l,$$($(2)_SO_LIBS))
endif
endef
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment