From 5e3fe6d8528a307a410ac647d2a11dfaa6de9192 Mon Sep 17 00:00:00 2001 From: Adrian Chiris Date: Tue, 22 Mar 2016 11:32:37 +0200 Subject: [PATCH] - changed INCLUDE automake variable in makefiles to AM_CPPFLAGS since its deprecated and displays warnnings - added Makefile to common folder - changed the installation dir of mtcr_ul to be prefixed with the package name (added hook in spec file to link the old location) --- Makefile.am | 2 +- cmdif/Makefile.am | 2 +- cmdparser/Makefile.am | 2 -- common/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++ configure.ac | 7 ++++--- dev_mgt/Makefile.am | 2 +- flint/Makefile.am | 2 +- mflash/Makefile.am | 6 ++++-- mft_utils/Makefile.am | 2 +- mlxconfig/Makefile.am | 2 +- mlxfwops/lib/Makefile.am | 2 +- mstdump/crd_lib/Makefile.am | 2 +- mstdump/crd_main/Makefile.am | 2 +- mstflint.spec.in | 13 +++++++++++-- mtcr_ul/Makefile.am | 8 ++++---- reg_access/Makefile.am | 4 ++-- small_utils/Makefile.am | 2 +- tools_crypto/Makefile.am | 2 +- tools_layouts/Makefile.am | 5 +++-- tools_res_mgmt/Makefile.am | 2 +- 20 files changed, 76 insertions(+), 29 deletions(-) create mode 100644 common/Makefile.am diff --git a/Makefile.am b/Makefile.am index c559d55..2da1619 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,7 +30,7 @@ # SOFTWARE. #-- -SUBDIRS = mft_utils $(TOOLS_CRYPTO) tools_layouts mtcr_ul reg_access cmdif dev_mgt tools_res_mgmt mflash mlxconfig mlxfwops cmdparser flint small_utils mstdump +SUBDIRS = common mft_utils $(TOOLS_CRYPTO) tools_layouts mtcr_ul reg_access cmdif dev_mgt tools_res_mgmt mflash mlxconfig mlxfwops cmdparser flint small_utils mstdump man_MANS = man/mstflint.1 man/mstconfig.1 man/mstmcra.1 man/mstmread.1 man/mstmwrite.1 man/mstmtserver.1 man/mstregdump.1 man/mstvpd.1 diff --git a/cmdif/Makefile.am b/cmdif/Makefile.am index 45615f8..c6315d0 100644 --- a/cmdif/Makefile.am +++ b/cmdif/Makefile.am @@ -34,7 +34,7 @@ USER_DIR = $(top_srcdir) MTCR_DIR = $(USER_DIR)/include/mtcr_ul TOOLS_LAYOUTS_DIR = $(USER_DIR)/tools_layouts -INCLUDES = -I. -I../common -I../tools_layouts -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul +AM_CPPFLAGS = -I. -I../common -I../tools_layouts -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) -DCMDIF_EXPORTS CMDIF_VERSION = 1 diff --git a/cmdparser/Makefile.am b/cmdparser/Makefile.am index 9696f71..952a074 100644 --- a/cmdparser/Makefile.am +++ b/cmdparser/Makefile.am @@ -32,8 +32,6 @@ # Makefile.am -- Process this file with automake to produce Makefile.in -INCLUDES = - AM_CPPFLAGS = -W -g -MP -MD -fPIC noinst_LIBRARIES = libcmdparser.a diff --git a/common/Makefile.am b/common/Makefile.am new file mode 100644 index 0000000..982c5aa --- /dev/null +++ b/common/Makefile.am @@ -0,0 +1,36 @@ +#-- +# Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved. +# +# This software is available to you under a choice of one of two +# licenses. You may choose to be licensed under the terms of the GNU +# General Public License (GPL) Version 2, available from the file +# COPYING in the main directory of this source tree, or the +# OpenIB.org BSD license below: +# +# Redistribution and use in source and binary forms, with or +# without modification, are permitted provided that the following +# conditions are met: +# +# - Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# - Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +#-- + +# Makefile.am -- Process this file with automake to produce Makefile.in + +noinst_HEADERS=compatibility.h bit_slice.h tools_utils.h tools_utils.h tools_version.h + diff --git a/configure.ac b/configure.ac index 94c19da..b3b0c58 100644 --- a/configure.ac +++ b/configure.ac @@ -10,11 +10,12 @@ AC_SUBST([VERSION]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR([README]) -AM_INIT_AUTOMAKE(mstflint, 4.3.0) +AM_INIT_AUTOMAKE dnl Checks for programs AC_PROG_CC AC_PROG_CXX +AM_PROG_AR AC_PROG_LIBTOOL AC_CONFIG_HEADERS( config.h ) @@ -85,6 +86,6 @@ AS_IF([test "x$enable_cs" = "xyes"], [ AC_CONFIG_FILES(tools_crypto/Makefile) ]) -AC_OUTPUT( Makefile mft_utils/Makefile mtcr_ul/Makefile dev_mgt/Makefile tools_layouts/Makefile reg_access/Makefile cmdif/Makefile tools_res_mgmt/Makefile \ - mlxconfig/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile flint/Makefile \ +AC_OUTPUT( Makefile common/Makefile mft_utils/Makefile mtcr_ul/Makefile dev_mgt/Makefile tools_layouts/Makefile reg_access/Makefile \ + cmdif/Makefile tools_res_mgmt/Makefile mlxconfig/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile flint/Makefile \ small_utils/Makefile mstdump/Makefile mstdump/crd_lib/Makefile mstdump/crd_main/Makefile mstdump/mstdump_dbs/Makefile ) diff --git a/dev_mgt/Makefile.am b/dev_mgt/Makefile.am index 703a27a..147f7aa 100644 --- a/dev_mgt/Makefile.am +++ b/dev_mgt/Makefile.am @@ -32,7 +32,7 @@ # Makefile.am -- Process this file with automake to produce Makefile.in -INCLUDES = -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/include/mtcr_ul +AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/include/mtcr_ul AM_CFLAGS = -W -Wall -g -MP -MD -Wswitch-enum $(COMPILER_FPIC) -DMTCR_EXPORT noinst_LIBRARIES = libdev_mgt.a diff --git a/flint/Makefile.am b/flint/Makefile.am index e4c032e..d2cb8c5 100755 --- a/flint/Makefile.am +++ b/flint/Makefile.am @@ -39,7 +39,7 @@ LAYOUTS_DIR = $(top_srcdir)/tools_layouts MFT_UTILS_DIR = $(top_srcdir)/mft_utils CMDIF_DIR = $(top_srcdir)/cmdif -INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(MTCR_DIR) -I$(MFLASH_DIR) -I$(COMMON_DIR) \ +AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(MTCR_DIR) -I$(MFLASH_DIR) -I$(COMMON_DIR) \ -I$(LAYOUTS_DIR) -I$(MFT_UTILS_DIR) -I$(MTCR_INC_DIR) mstflint_CXXFLAGS = -Wall -W -g -MP -MD -pipe -DEXTERNAL diff --git a/mflash/Makefile.am b/mflash/Makefile.am index 950cabd..44ac7cc 100644 --- a/mflash/Makefile.am +++ b/mflash/Makefile.am @@ -31,13 +31,15 @@ #-- # Makefile.am -- Process this file with automake to produce Makefile.in -INCLUDES= -I. -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -I$(top_srcdir)/tools_layouts -I$(top_srcdir)/reg_access \ +AM_CPPFLAGS = -I. -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -I$(top_srcdir)/tools_layouts -I$(top_srcdir)/reg_access \ -I$(top_srcdir)/cmdif -I$(top_srcdir)/tools_res_mgmt AM_CFLAGS = -MD -pipe -Wall -W -DMST_UL -g ${MFLASH_INBAND_FLAG} -noinst_LIBRARIES = libmflash.a +noinst_LTLIBRARIES = libmflash.a libmflash_a_SOURCES = mflash.c mflash.h\ mflash_pack_layer.c mflash_pack_layer.h mflash_access_layer.c mflash_access_layer.h\ mflash_types.h mlash_common_structs.h + +noinst_HEADERS = mflash.h mflash_types.h mflash_common_structs.h diff --git a/mft_utils/Makefile.am b/mft_utils/Makefile.am index ad9ad8e..ebb3bf3 100644 --- a/mft_utils/Makefile.am +++ b/mft_utils/Makefile.am @@ -32,7 +32,7 @@ # Makefile.am -- Process this file with automake to produce Makefile.in USER_DIR = $(top_srcdir) -INCLUDES = -I. -I$(USER_DIR)/common +AM_CPPFLAGS = -I. -I$(USER_DIR)/common AM_CFLAGS = -MD -pipe -Wall -W -Werror diff --git a/mlxconfig/Makefile.am b/mlxconfig/Makefile.am index 798d4dd..c9189aa 100755 --- a/mlxconfig/Makefile.am +++ b/mlxconfig/Makefile.am @@ -42,7 +42,7 @@ UTILS_LIB = $(USER_DIR)/mft_utils/libmftutils.a CMDIF_DIR = $(USER_DIR)/cmdif -INCLUDES = -I. -I$(USER_DIR) -I$(top_srcdir)/include/mtcr_ul -I$(MTCR_DIR) -I$(COMMON_DIR) $(WIN64_INC)\ +AM_CPPFLAGS = -I. -I$(USER_DIR) -I$(top_srcdir)/include/mtcr_ul -I$(MTCR_DIR) -I$(COMMON_DIR) $(WIN64_INC)\ -I $(LAYOUTS_DIR) -I $(UTILS_DIR) -I$(DEV_MGT_DIR) -I$(CMDIF_DIR) AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe diff --git a/mlxfwops/lib/Makefile.am b/mlxfwops/lib/Makefile.am index 8cf9e15..c309507 100755 --- a/mlxfwops/lib/Makefile.am +++ b/mlxfwops/lib/Makefile.am @@ -40,7 +40,7 @@ LAYOUTS_DIR = $(top_srcdir)/tools_layouts UTILS_LIB = $(top_srcdir)/mft_utils UEFI_COMMON_DIR = $(top_srcdir)/mlxfwops/uefi_c -INCLUDES = -I$(srcdir) -I$(MTCR_INC_DIR) -I$(MFLASH_DIR) -I$(top_srcdir)/ext_libs/json -I$(MINIXZ_DIR)\ +AM_CPPFLAGS = -I$(srcdir) -I$(MTCR_INC_DIR) -I$(MFLASH_DIR) -I$(top_srcdir)/ext_libs/json -I$(MINIXZ_DIR)\ -I$(COMMON_DIR) -I $(LAYOUTS_DIR) -I$(top_srcdir)/common -I$(UTILS_LIB) -I$(UEFI_COMMON_DIR) MLXFWOPS_VERSION = 1 diff --git a/mstdump/crd_lib/Makefile.am b/mstdump/crd_lib/Makefile.am index f3e405b..c884184 100755 --- a/mstdump/crd_lib/Makefile.am +++ b/mstdump/crd_lib/Makefile.am @@ -33,7 +33,7 @@ # Makefile.am -- Process this file with automake to produce Makefile.in -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common AM_CFLAGS = -Wall -W -g -MP -MD -pipe -Wno-unused-function $(COMPILER_FPIC) -DMTCR_EXPORT -DMST_UL -DDATA_PATH=\"$(pkgdatadir)\" noinst_LIBRARIES = libcrdump.a diff --git a/mstdump/crd_main/Makefile.am b/mstdump/crd_main/Makefile.am index 0c096d4..dd7b32e 100755 --- a/mstdump/crd_main/Makefile.am +++ b/mstdump/crd_main/Makefile.am @@ -31,7 +31,7 @@ #-- # Makefile.am -- Process this file with automake to produce Makefile.in -INCLUDES = -I$(top_srcdir) -I$(srcdir)/../crd_lib -I$(top_srcdir)/include/mtcr_ul +AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)/../crd_lib -I$(top_srcdir)/include/mtcr_ul AM_CFLAGS = -MD -pipe -g -Wall -W bin_PROGRAMS = mstregdump diff --git a/mstflint.spec.in b/mstflint.spec.in index 866fa96..12d622f 100644 --- a/mstflint.spec.in +++ b/mstflint.spec.in @@ -83,11 +83,20 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/mstmcra %{_bindir}/mstconfig %{_bindir}/hca_self_test.ofed -%{_includedir}/mtcr_ul/mtcr.h -%{_libdir}/libmtcr_ul.a + +%{_includedir}/mstfllint/mtcr.h +%{_libdir}/mstflint/libmtcr_ul.a + %{_datadir}/mstflint %{_mandir}/man1/* +%post +# link mtcr_ul to old include path +mkdir -p %{_includedir}/mtcr_ul +ln -s %{_includedir}/mstflint/mtcr.h %{_includedir}/mtcr_ul/mtcr.h +# link mtcr_ul to old lib path +ln -s %{_libdir}/mstflint/libmtcr_ul.a %{_libdir}/libmtcr_ul.a + %changelog * Mon Jan 11 2016 Adrian Chiris MFT 4.3.0 Updates diff --git a/mtcr_ul/Makefile.am b/mtcr_ul/Makefile.am index f72a2e6..3323c25 100644 --- a/mtcr_ul/Makefile.am +++ b/mtcr_ul/Makefile.am @@ -31,9 +31,9 @@ #-- # Makefile.am -- Process this file with automake to produce Makefile.in -INCLUDES = -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common +AM_CPPFLAGS = -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -lib_LIBRARIES = libmtcr_ul.a +pkglib_LIBRARIES = libmtcr_ul.a libmtcr_ul_a_SOURCES = mtcr_ul.c mtcr_ib.h mtcr_int_defs.h\ mtcr_ib_res_mgt.h mtcr_ib_res_mgt.c\ @@ -49,6 +49,6 @@ else libmtcr_ul_a_CFLAGS += -DNO_INBAND endif -libraryincludedir=$(includedir)/mtcr_ul -libraryinclude_HEADERS = $(top_srcdir)/include/mtcr_ul/mtcr.h +libraryincludedir=$(includedir)/mstflint +libraryinclude_HEADERS = $(top_srcdir)/include/mtcr_ul/mtcr.h $(top_srcdir)/include/mtcr_ul/mtcr_com_defs.h diff --git a/reg_access/Makefile.am b/reg_access/Makefile.am index 7f78060..caa0993 100644 --- a/reg_access/Makefile.am +++ b/reg_access/Makefile.am @@ -36,11 +36,11 @@ COMMON_DIR = $(top_srcdir)/common LAYOUTS_DIR = $(top_srcdir)/tools_layouts USER_DIR = $(top_srcdir) -INCLUDES = -I. -I$(USER_DIR) -I$(srcdir) -I$(LAYOUTS_DIR) -I$(USER_DIR)/include/mtcr_ul +AM_CPPFLAGS = -I. -I$(USER_DIR) -I$(srcdir) -I$(LAYOUTS_DIR) -I$(USER_DIR)/include/mtcr_ul AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) -noinst_LIBRARIES = libreg_access.a +noinst_LTLIBRARIES = libreg_access.a libreg_access_a_SOURCES = reg_access.c reg_access.h libreg_access_a_DEPENDENCIES = $(USER_DIR)/tools_layouts/libtools_layouts.a diff --git a/small_utils/Makefile.am b/small_utils/Makefile.am index 838a724..24c36f9 100644 --- a/small_utils/Makefile.am +++ b/small_utils/Makefile.am @@ -30,7 +30,7 @@ # SOFTWARE. #-- -INCLUDES= -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common +AM_CPPFLAGS= -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common LDADD= ../mtcr_ul/libmtcr_ul.a -ldl diff --git a/tools_crypto/Makefile.am b/tools_crypto/Makefile.am index 7dc6082..784d94f 100644 --- a/tools_crypto/Makefile.am +++ b/tools_crypto/Makefile.am @@ -32,7 +32,7 @@ # Makefile.am -- Process this file with automake to produce Makefile.in USER_DIR = $(top_srcdir) -INCLUDES = -I$(USER_DIR) -I$(USER_DIR)/common +AM_CPPFLAGS = -I$(USER_DIR) -I$(USER_DIR)/common AM_CFLAGS = -MD -pipe -Wall -W -DMST_UL -g noinst_LIBRARIES = libtools_crypto.a diff --git a/tools_layouts/Makefile.am b/tools_layouts/Makefile.am index bc18f9b..7726c7f 100644 --- a/tools_layouts/Makefile.am +++ b/tools_layouts/Makefile.am @@ -31,9 +31,10 @@ #-- # Makefile.am -- Process this file with automake to produce Makefile.in -INCLUDES = -I$(top_srcdir)/mtcr_ul -I$(top_srcdir)/common +AM_CPPFLAGS = -I$(top_srcdir)/mtcr_ul -I$(top_srcdir)/common AM_CFLAGS = -Wall -W -g -MP -MD -pipe $(COMPILER_FPIC) -noinst_LIBRARIES = libtools_layouts.a + +noinst_LTLIBRARIES = libtools_layouts.a libtools_layouts_a_SOURCES = adb_to_c_utils.c adb_to_c_utils.h \ cibfw_layouts.c cibfw_layouts.h \ diff --git a/tools_res_mgmt/Makefile.am b/tools_res_mgmt/Makefile.am index 8231a87..4b513f4 100644 --- a/tools_res_mgmt/Makefile.am +++ b/tools_res_mgmt/Makefile.am @@ -33,7 +33,7 @@ USER_DIR = $(top_srcdir) MTCR_DIR = $(USER_DIR)/include/mtcr_ul -INCLUDES = -I. -I../common -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul +AM_CPPFLAGS = -I. -I../common -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) noinst_LIBRARIES = libtools_res_mgmt.a -- 2.46.0