# Set up lib inclusions, and scan for built libs
c_FLAGS += -I$(LIBINC_DIR)
c_OBJ := $($(c_C)_OBJ)
-# If we have a linker, include 'LIB_DIR' in the paths it looks in
-$(foreach lang,$(LANGS),$(if $($($(lang)_C)_LD),$(eval\
-$(lang)_FLAGS += -L$(LIB_DIR)\
-)))
# Modules are any directories other than 'DRIVER_MODULE' in './' and produce a
# single object file in './' containing all of the module's symbols and
# binaries.
# adding '-lLIBNAME' options to the language flags if the linker has them, or to
# the list of missing libraries for this language if the linker cannot find them.
# If this compiler has no linker, mark all libs as missing
+# $($1_SOBS:$(LIB_DIR)/lib%.so=%))
$(eval $1_LD_LIBS := $(sort $1_LD_LIBS))
$(if $($($1_C)_LD),\
-$(eval $1_LD_LIBS := $($($1_C)_LDLIBS) $($1_SOBS:$(LIB_DIR)/lib%.so=%))\
+$(eval $1_LD_LIBS := $($($1_C)_LDLIBS))\
$(foreach lib,$($1_LIBS),\
$(if $(findstring $(lib),$($1_LD_LIBS)),\
$(eval $1_FLAGS += -l$(lib)),\
$(eval $1_MISSING_LIBS += $(lib))\
-$(eval $1_FLAGS += $(LIB_DIR)/lib$(lib).so)\
+$(eval $1_FLAGS += $(LIB_DIR)/lib$(lib).a)\
)),\
$(eval $1_MISSING_LIBS := $(filter-out $($1_LD_LIBS),$($1_LIBS)))\
)