From 6779a321925e1e002aa7846beb70b31ceacd7727 Mon Sep 17 00:00:00 2001 From: ken Date: Thu, 22 Sep 2016 14:07:17 -0700 Subject: [PATCH] build system static linking fix --- src/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Makefile b/src/Makefile index c00b077..d7c3be9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -73,10 +73,6 @@ MAKE_DIRS := $(LIB_DIR) $(LIBDL_DIR) $(LCLLIB_DIR) # 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. @@ -363,14 +359,15 @@ $(eval $1_LIBS := $(shell echo "$($1_LIBS)" | awk \ # 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)))\ ) -- 2.18.0