diff --git a/ompi/mca/op/avx/Makefile.am b/ompi/mca/op/avx/Makefile.am index 41dcf2e1834..63739f22988 100644 --- a/ompi/mca/op/avx/Makefile.am +++ b/ompi/mca/op/avx/Makefile.am @@ -20,6 +20,8 @@ # First, list all .h and .c sources. It is necessary to list all .h # files so that they will be picked up in the distribution tarball. +SUBDIRS = sub + sources = op_avx_component.c op_avx.h sources_extended = op_avx_functions.c diff --git a/ompi/mca/op/avx/configure.m4 b/ompi/mca/op/avx/configure.m4 index 09d8b374c8e..6986568c636 100644 --- a/ompi/mca/op/avx/configure.m4 +++ b/ompi/mca/op/avx/configure.m4 @@ -19,7 +19,7 @@ # ------------------------------------------------ # We can always build, unless we were explicitly disabled. AC_DEFUN([MCA_ompi_op_avx_CONFIG],[ - AC_CONFIG_FILES([ompi/mca/op/avx/Makefile]) + AC_CONFIG_FILES([ompi/mca/op/avx/Makefile ompi/mca/op/avx/sub/Makefile]) MCA_BUILD_OP_AVX_FLAGS="" MCA_BUILD_OP_AVX2_FLAGS="" diff --git a/ompi/mca/op/avx/sub/Makefile.am b/ompi/mca/op/avx/sub/Makefile.am new file mode 100644 index 00000000000..a0f9b4b22a5 --- /dev/null +++ b/ompi/mca/op/avx/sub/Makefile.am @@ -0,0 +1,20 @@ +noinst_LTLIBRARIES = + +if MCA_BUILD_ompi_op_has_avx2_support +noinst_LTLIBRARIES += libfoo.la +nodist_libfoo_la_SOURCES = foo.c +foo.c: + cd .. && env HOMEBREW_ARCHFLAGS=@MCA_BUILD_OP_AVX2_FLAGS@ make liblocal_ops_avx2.la + touch foo.c +endif + +if MCA_BUILD_ompi_op_has_avx512_support +noinst_LTLIBRARIES += libbar.la +nodist_libbar_la_SOURCES = bar.c +bar.c: + cd .. && env HOMEBREW_ARCHFLAGS=@MCA_BUILD_OP_AVX512_FLAGS@ make liblocal_ops_avx512.la + touch bar.c +endif + +clean-local: + rm -f foo.c bar.c