|
| 1 | +# |
| 2 | +# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana |
| 3 | +# University Research and Technology |
| 4 | +# Corporation. All rights reserved. |
| 5 | +# Copyright (c) 2004-2013 The University of Tennessee and The University |
| 6 | +# of Tennessee Research Foundation. All rights |
| 7 | +# reserved. |
| 8 | +# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, |
| 9 | +# University of Stuttgart. All rights reserved. |
| 10 | +# Copyright (c) 2004-2005 The Regents of the University of California. |
| 11 | +# All rights reserved. |
| 12 | +# Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. |
| 13 | +# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. |
| 14 | +# Copyright (c) 2015 Intel, Inc. All rights reserved. |
| 15 | +# Copyright (c) 2017 Los Alamos National Security, LLC. All rights |
| 16 | +# reserved. |
| 17 | +# Copyright (c) 2019 Hewlett Packard Enterprise. All rights reserved. |
| 18 | +# $COPYRIGHT$ |
| 19 | +# |
| 20 | +# Additional copyrights may follow |
| 21 | +# |
| 22 | +# $HEADER$ |
| 23 | +# |
| 24 | +# A word of explanation... |
| 25 | +# |
| 26 | +# This library is linked against various MCA components because the |
| 27 | +# support for ofis is needed in various places. |
| 28 | +# |
| 29 | +# Note that building this common component statically and linking |
| 30 | +# against other dynamic components is *not* supported! |
| 31 | + |
| 32 | +AM_CPPFLAGS = $(opal_ofi_CPPFLAGS) |
| 33 | + |
| 34 | +# Header files |
| 35 | + |
| 36 | +headers = \ |
| 37 | + common_ofi.h |
| 38 | + |
| 39 | +# Source files |
| 40 | + |
| 41 | +sources = \ |
| 42 | + common_ofi.c |
| 43 | + |
| 44 | +# As per above, we'll either have an installable or noinst result. |
| 45 | +# The installable one should follow the same MCA prefix naming rules |
| 46 | +# (i.e., libmca_<type>_<name>.la). The noinst one can be named |
| 47 | +# whatever it wants, although libmca_<type>_<name>_noinst.la is |
| 48 | +# recommended. |
| 49 | + |
| 50 | +# To simplify components that link to this library, we will *always* |
| 51 | +# have an output libtool library named libmca_<type>_<name>.la -- even |
| 52 | +# for case 2) described above (i.e., so there's no conditional logic |
| 53 | +# necessary in component Makefile.am's that link to this library). |
| 54 | +# Hence, if we're creating a noinst version of this library (i.e., |
| 55 | +# case 2), we sym link it to the libmca_<type>_<name>.la name |
| 56 | +# (libtool will do the Right Things under the covers). See the |
| 57 | +# all-local and clean-local rules, below, for how this is effected. |
| 58 | + |
| 59 | +lib_LTLIBRARIES = |
| 60 | +noinst_LTLIBRARIES = |
| 61 | +comp_inst = lib@OPAL_LIB_PREFIX@mca_common_ofi.la |
| 62 | +comp_noinst = lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst.la |
| 63 | + |
| 64 | + |
| 65 | +if MCA_BUILD_opal_common_ofi_DSO |
| 66 | +lib_LTLIBRARIES += $(comp_inst) |
| 67 | +else |
| 68 | +noinst_LTLIBRARIES += $(comp_noinst) |
| 69 | +endif |
| 70 | + |
| 71 | +lib@OPAL_LIB_PREFIX@mca_common_ofi_la_SOURCES = $(headers) $(sources) |
| 72 | +lib@OPAL_LIB_PREFIX@mca_common_ofi_la_LDFLAGS = \ |
| 73 | + $(opal_ofi_LDFLAGS) \ |
| 74 | + -version-info $(libmca_opal_common_ofi_so_version) |
| 75 | +lib@OPAL_LIB_PREFIX@mca_common_ofi_la_LIBADD = $(opal_ofi_LIBS) |
| 76 | + |
| 77 | +lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_SOURCES = $(headers) $(sources) |
| 78 | +lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LDFLAGS = $(opal_ofi_LDFLAGS) |
| 79 | +lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LIBADD = $(opal_ofi_LIBS) |
| 80 | + |
| 81 | +# Conditionally install the header files |
| 82 | + |
| 83 | +if WANT_INSTALL_HEADERS |
| 84 | +opaldir = $(opalincludedir)/$(subdir) |
| 85 | +opal_HEADERS = $(headers) |
| 86 | +endif |
| 87 | + |
| 88 | +# These two rules will sym link the "noinst" libtool library filename |
| 89 | +# to the installable libtool library filename in the case where we are |
| 90 | +# compiling this component statically (case 2), described above). |
| 91 | + |
| 92 | +V=0 |
| 93 | +OMPI_V_LN_SCOMP = $(ompi__v_LN_SCOMP_$V) |
| 94 | +ompi__v_LN_SCOMP_ = $(ompi__v_LN_SCOMP_$AM_DEFAULT_VERBOSITY) |
| 95 | +ompi__v_LN_SCOMP_0 = @echo " LN_S " `basename $(comp_inst)`; |
| 96 | + |
| 97 | +all-local: |
| 98 | + $(OMPI_V_LN_SCOMP) if test -z "$(lib_LTLIBRARIES)"; then \ |
| 99 | + rm -f "$(comp_inst)"; \ |
| 100 | + $(LN_S) "$(comp_noinst)" "$(comp_inst)"; \ |
| 101 | + fi |
| 102 | + |
| 103 | +clean-local: |
| 104 | + if test -z "$(lib_LTLIBRARIES)"; then \ |
| 105 | + rm -f "$(comp_inst)"; \ |
| 106 | + fi |
0 commit comments