Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 02b5550

Browse files
authored
Bugfix : add missing link to libscopmath (#307)
- libscopmath.a was linked to libcorenrnmech with shared library but was missing in case of static library - ar doesnt provide way to link two static libraries together. Hence extrat objects and then combined those together. fixes #303
1 parent e7934b0 commit 02b5550

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

external/mod2c

extra/nrnivmodl_core_makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ $(coremech_lib): $(mod_func_o) $(dimplic_o) $(mod_c_objs) $(mod_ispc_objs) build
135135
$(CXX_LINK_SHARED) $(INCFLAGS) -I $(incdir) enginemech.o -o ${coremech_lib} ${_SONAME} \
136136
$(mod_func_o) $(dimplic_o) $(mod_c_objs) $(mod_ispc_objs) $(libdir)/libscopmath.a $(CORENRNLIB_FLAGS) -Wl,-rpath,$(libdir) $(LDFLAGS);\
137137
else\
138-
ar cq ${coremech_lib} enginemech.o $(mod_func_o) $(dimplic_o) $(mod_c_objs) $(mod_ispc_objs);\
138+
mkdir -p $(OBJS_DIR)/scopmath_obj && cd $(OBJS_DIR)/scopmath_obj && ar -x $(libdir)/libscopmath.a && cd -;\
139+
ar cq ${coremech_lib} enginemech.o $(mod_func_o) $(dimplic_o) $(OBJS_DIR)/scopmath_obj/*.o $(mod_c_objs) $(mod_ispc_objs);\
139140
fi
140141
(rm -f $(OUTPUT)/.libs/libcorenrnmech$(library_suffix) ; mkdir -p $(OUTPUT)/.libs ; ln -s ../../${coremech_lib} $(OUTPUT)/.libs/libcorenrnmech$(library_suffix))
141142

0 commit comments

Comments
 (0)