Skip to content

Commit

Permalink
Makefile.am: fix non static linkage
Browse files Browse the repository at this point in the history
I do not understand why some -static are enforced while dynamic
linkage could be used.
  • Loading branch information
vjardin authored and Vincent Jardin committed Nov 11, 2024
1 parent 37e382f commit 6562926
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cmdif/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ libcmdif_la_SOURCES = tools_cif.c tools_cif.h icmd_cif_common.c icmd_cif_common.
cmdif_pylibdir = $(libdir)/mstflint/python_tools/
cmdif_pylib_DATA = ${CCMDIF_SO} cmdif.py
${CCMDIF_SO}: libcmdif.la
$(CC) -g -Wall -pthread -shared ${CFLAGS} *.o -o ${CCMDIF_SO} \
$(top_builddir)/tools_layouts/.libs/libtools_layouts.a $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.a
$(CC) -g -Wall -pthread -shared ${CFLAGS} .libs/*.o -o ${CCMDIF_SO} \
$(top_builddir)/tools_layouts/.libs/libtools_layouts.a $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.so

CLEANFILES = ${CCMDIF_SO}
4 changes: 2 additions & 2 deletions dev_mgt/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ dev_mgt_pylib_DATA = c_dev_mgt.so
dist_dev_mgt_pylib_DATA = dev_mgt.py

c_dev_mgt.so: libdev_mgt.la
$(CC) -g -Wall -pthread -shared ${CFLAGS} tools_dev_types.o -o c_dev_mgt.so \
$(CC) -g -Wall -pthread -shared ${CFLAGS} .libs/tools_dev_types.o -o c_dev_mgt.so \
$(top_builddir)/reg_access/.libs/libreg_access.a \
$(top_builddir)/tools_layouts/.libs/libtools_layouts.a \
$(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.a
$(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.so

CLEANFILES = c_dev_mgt.so
2 changes: 1 addition & 1 deletion flint/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mstflint_DEPENDENCIES = \

LDADD_mstflint = ${LDL}

mstflint_LDFLAGS = -static
#mstflint_LDFLAGS = -static

if ENABLE_DC
LDADD_mstflint += -lz
Expand Down
2 changes: 1 addition & 1 deletion mlxconfig/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ mstconfig_DEPENDENCIES = \

mstconfig_LDADD = $(mstconfig_DEPENDENCIES) ${LDL}

mstconfig_LDFLAGS = -static
#mstconfig_LDFLAGS = -static

if DISABLE_XML2
AM_CXXFLAGS += -DDISABLE_XML2
Expand Down
2 changes: 1 addition & 1 deletion mstdump/crd_main/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ bin_PROGRAMS = mstregdump
mstregdump_SOURCES = mstdump.c
mstregdump_LDADD = ../crd_lib/libcrdump.a ../../dev_mgt/libdev_mgt.la ../../reg_access/libreg_access.la ../../tools_layouts/libtools_layouts.la \
../../${MTCR_CONF_DIR}/libmtcr_ul.la -lm ${LDL}
mstregdump_LDFLAGS = -static
#mstregdump_LDFLAGS = -static
mstregdump_CFLAGS = -DMSTDUMP_NAME=\"mstregdump\" -DDEV_EXAMPLE=\"0b:00.0\"
2 changes: 1 addition & 1 deletion mtcr_py/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ mtcr_pylibdir = $(libdir)/mstflint/python_tools/
mtcr_pylib_DATA = cmtcr.so
dist_mtcr_pylib_DATA = mtcr.py
cmtcr.so:
$(CC) -g -Wall -pthread -shared ${CFLAGS} -o cmtcr.so -Wl,--whole-archive $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.a -Wl,--no-whole-archive
$(CC) -g -Wall -pthread -shared ${CFLAGS} -o cmtcr.so $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.so

CLEANFILES = cmtcr.so
4 changes: 2 additions & 2 deletions reg_access/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ reg_access_pylib_DATA = ${RREG_ACCESS_SO}
dist_reg_access_pylib_DATA = regaccess.py regaccess_hca_ext_structs.py regaccess_switch_ext_structs.py

${RREG_ACCESS_SO}: libreg_access.la
$(CC) -g -Wall -pthread -shared ${CFLAGS} *.o -o ${RREG_ACCESS_SO} \
$(top_builddir)/tools_layouts/.libs/libtools_layouts.a $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.a
$(CC) -g -Wall -pthread -shared ${CFLAGS} .libs/*.o -o ${RREG_ACCESS_SO} \
$(top_builddir)/tools_layouts/.libs/libtools_layouts.a $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.so

CLEANFILES = ${RREG_ACCESS_SO}
4 changes: 2 additions & 2 deletions resourcetools/resourcedump_lib/src/sdk/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ libraryinclude_HEADERS = \
# if WIN_BUILD
# MTCR_LIB = $(MTCR_DIR)/.libs/libmtcr.dll.a
# else
MTCR_LIB = $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.a
MTCR_LIB = $(top_builddir)/${MTCR_CONF_DIR}/.libs/libmtcr_ul.so
# endif

if ENABLE_RDMEM
Expand All @@ -86,7 +86,7 @@ resource_dump_sdk_so_DEPS = \

# if !WIN_BUILD
libresource_dump_sdk.so: libresource_dump_sdk.la
$(CC) -Wall -pthread -shared ${CFLAGS} $(COMPILER_FPIC) libresource_dump_sdk_la-resource_dump_sdk.o \
$(CC) -Wall -pthread -shared ${CFLAGS} $(COMPILER_FPIC) .libs/libresource_dump_sdk_la-resource_dump_sdk.o \
-o libresource_dump_sdk.so ${AM_LDFLAGS} $(resource_dump_sdk_so_DEPS)
# else
# libresource_dump_sdk.dll: libresource_dump_sdk.la
Expand Down
14 changes: 7 additions & 7 deletions small_utils/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ bin_SCRIPTS = mstfwreset
mstmread_SOURCES = mread.c
mstmread_DEPENDENCIES = $(top_builddir)/${MTCR_CONF_DIR}/libmtcr_ul.la
mstmread_LDADD = $(mstmread_DEPENDENCIES) ${LDL}
mstmread_LDFLAGS = -static
#mstmread_LDFLAGS = -static

mstmwrite_SOURCES = mwrite.c
mstmwrite_DEPENDENCIES = $(top_builddir)/${MTCR_CONF_DIR}/libmtcr_ul.la
mstmwrite_LDADD = $(mstmwrite_DEPENDENCIES) ${LDL}
mstmwrite_LDFLAGS = -static
#mstmwrite_LDFLAGS = -static

mstvpd_SOURCES = vpd.c
mstvpd_DEPENDENCIES = $(top_builddir)/mvpd/libmvpd.la \
Expand All @@ -61,7 +61,7 @@ mstvpd_DEPENDENCIES = $(top_builddir)/mvpd/libmvpd.la \
$(top_builddir)/reg_access/libreg_access.la \
$(top_builddir)/tools_layouts/libtools_layouts.la
mstvpd_LDADD = $(mstvpd_DEPENDENCIES) ${LDL}
mstvpd_LDFLAGS = -static
#mstvpd_LDFLAGS = -static

mstcongestion_SOURCES = congestion.cpp
mstcongestion_DEPENDENCIES = $(top_builddir)/cmdif/libcmdif.la \
Expand All @@ -71,12 +71,12 @@ mstcongestion_DEPENDENCIES = $(top_builddir)/cmdif/libcmdif.la \
$(top_builddir)/cmdparser/libcmdparser.a \
$(top_builddir)/${MTCR_CONF_DIR}/libmtcr_ul.la
mstcongestion_LDADD = $(mstcongestion_DEPENDENCIES) ${LDL}
mstcongestion_LDFLAGS = -static
#mstcongestion_LDFLAGS = -static

mstmcra_SOURCES = mcra.c
mstmcra_DEPENDENCIES = $(top_builddir)/${MTCR_CONF_DIR}/libmtcr_ul.la
mstmcra_LDADD = $(mstmcra_DEPENDENCIES) ${LDL}
mstmcra_LDFLAGS = -static
#mstmcra_LDFLAGS = -static

if LINUX_BUILD
bin_PROGRAMS += mstfwctrl
Expand All @@ -86,14 +86,14 @@ mstfwctrl_DEPENDENCIES = $(top_builddir)/${MTCR_CONF_DIR}/libmtcr_ul.la \
$(top_builddir)/dev_mgt/libdev_mgt.la \
$(top_builddir)/reg_access/libreg_access.la
mstfwctrl_LDADD = $(mstfwctrl_DEPENDENCIES) ${LDL}
mstfwctrl_LDFLAGS = -static
#mstfwctrl_LDFLAGS = -static
endif

mstmtserver_SOURCES = mtserver.c tcp.c tcp.h
mstmtserver_CFLAGS = -DMST_UL
mstmtserver_DEPENDENCIES = $(top_builddir)/${MTCR_CONF_DIR}/libmtcr_ul.la
mstmtserver_LDADD = $(mstmtserver_DEPENDENCIES) ${LDL}
mstmtserver_LDFLAGS = -static
#mstmtserver_LDFLAGS = -static

SUBDIRS = mlxfwresetlib
MSTFWRESET_PYTHON_WRAPPER=mstfwreset
Expand Down

0 comments on commit 6562926

Please sign in to comment.