build system static linking fix
authorken <ken@mihrtec.com>
Thu, 22 Sep 2016 21:07:17 +0000 (14:07 -0700)
committerken <ken@mihrtec.com>
Thu, 22 Sep 2016 21:07:17 +0000 (14:07 -0700)
src/Makefile

index c00b077..d7c3be9 100644 (file)
@@ -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)))\
 )