Blame IbaTools/FastFabric/Makefile

Packit 857059
# BEGIN_ICS_COPYRIGHT8 ****************************************
Packit 857059
# 
Packit 857059
# Copyright (c) 2015-2017, Intel Corporation
Packit 857059
# 
Packit 857059
# Redistribution and use in source and binary forms, with or without
Packit 857059
# modification, are permitted provided that the following conditions are met:
Packit 857059
# 
Packit 857059
#     * Redistributions of source code must retain the above copyright notice,
Packit 857059
#       this list of conditions and the following disclaimer.
Packit 857059
#     * Redistributions in binary form must reproduce the above copyright
Packit 857059
#       notice, this list of conditions and the following disclaimer in the
Packit 857059
#       documentation and/or other materials provided with the distribution.
Packit 857059
#     * Neither the name of Intel Corporation nor the names of its contributors
Packit 857059
#       may be used to endorse or promote products derived from this software
Packit 857059
#       without specific prior written permission.
Packit 857059
# 
Packit 857059
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Packit 857059
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 857059
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Packit 857059
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
Packit 857059
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 857059
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Packit 857059
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Packit 857059
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Packit 857059
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit 857059
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 857059
# 
Packit 857059
# END_ICS_COPYRIGHT8   ****************************************
Packit 857059
Packit 857059
# Makefile for cluster_tools
Packit 857059
Packit 857059
# Include Make Control Settings
Packit 857059
include $(TL_DIR)/$(PROJ_FILE_DIR)/Makesettings.project
Packit 857059
Packit 857059
#=============================================================================#
Packit 857059
# Definitions:
Packit 857059
#-----------------------------------------------------------------------------#
Packit 857059
Packit 857059
# Name of SubProjects
Packit 857059
DS_SUBPROJECTS	= 
Packit 857059
# name of executable or downloadable image
Packit 857059
EXECUTABLE		= #$(BUILDDIR)/FastFabric$(EXE_SUFFIX)
Packit 857059
# list of sub directories to build
Packit 857059
DIRS			= 
Packit 857059
# C files (.c)
Packit 857059
CFILES			= \
Packit 857059
				# Add more c files here
Packit 857059
# C++ files (.cpp)
Packit 857059
CCFILES			= \
Packit 857059
				# Add more cpp files here
Packit 857059
# lex files (.lex)
Packit 857059
LFILES			= \
Packit 857059
				# Add more lex files here
Packit 857059
# archive library files (basename, $ARFILES will add MOD_LIB_DIR/prefix and suffix)
Packit 857059
LIBFILES=
Packit 857059
# Windows Resource Files (.rc)
Packit 857059
RSCFILES		=
Packit 857059
# Windows IDL File (.idl)
Packit 857059
IDLFILE			=
Packit 857059
# Windows Linker Module Definitions (.def) file for dll's
Packit 857059
DEFFILE			=
Packit 857059
# targets to build during INCLUDES phase (add public includes here)
Packit 857059
INCLUDE_TARGETS	= \
Packit 857059
				# Add more h hpp files here
Packit 857059
# Non-compiled files
Packit 857059
MISC_FILES		= switches allhosts-sample chassis-sample esm_chassis-sample \
Packit 857059
				hosts-sample switches-sample ports-sample osid_wrapper \
Packit 857059
				mac_to_dhcp opa_ca_openssl.cnf opa_comp_openssl.cnf \
Packit 857059
				opa_ca_openssl.cnf-sample opa_comp_openssl.cnf-sample
Packit 857059
# expect files
Packit 857059
TCL_SOURCES		= chassis_reboot.exp reboot.exp sacache.exp load.exp \
Packit 857059
				chassis_upgrade.exp chassis_fmconfig.exp chassis_fmcontrol.exp \
Packit 857059
				chassis_fmgetconfig.exp chassis_fmgetsecurityfiles.exp \
Packit 857059
				chassis_fmsecurityfiles.exp upgrade.exp configipoib.exp \
Packit 857059
				mpiperf.exp mpiperfdeviation.exp ipoibping.exp ff_function.exp \
Packit 857059
				switch_upgrade.exp switch_dump.exp switch_reboot.exp \
Packit 857059
				switch_info.exp switch_hwvpd.exp switch_ping.exp \
Packit 857059
				switch_fwverify.exp switch_capture.exp chassis_configure.exp \
Packit 857059
				switch_configure.exp switch_getconfig.exp chassis_getconfig.exp
Packit 857059
# all source files
Packit 857059
SOURCES			= $(CFILES) $(CCFILES) $(LFILES) $(RSCFILES) $(IDLFILE)
Packit 857059
# Source files to include in DSP File
Packit 857059
DSP_SOURCES		= $(INCLUDE_TARGETS) $(SOURCES) $(MISC_FILES) \
Packit 857059
				  $(RSCFILES) $(DEFFILE) $(MAKEFILE)  $(TCL_SOURCES)
Packit 857059
# all object files
Packit 857059
OBJECTS			= $(CFILES:.c=$(OBJ_SUFFIX)) $(CCFILES:.cpp=$(OBJ_SUFFIX)) \
Packit 857059
				  $(LFILES:.lex=$(OBJ_SUFFIX))
Packit 857059
RSCOBJECTS		= $(RSCFILES:.rc=$(RES_SUFFIX))
Packit 857059
# targets to build during LIBS phase
Packit 857059
LIB_TARGETS_IMPLIB	=
Packit 857059
LIB_TARGETS_ARLIB	= # $(LIB_PREFIX)ResourceTest$(ARLIB_SUFFIX)
Packit 857059
LIB_TARGETS_EXP		= $(LIB_TARGETS_IMPLIB:$(ARLIB_SUFFIX)=$(EXP_SUFFIX))
Packit 857059
LIB_TARGETS_MISC	= 
Packit 857059
# targets to build during CMDS phase
Packit 857059
CMD_TARGETS_SHLIB	= 
Packit 857059
CMD_TARGETS_EXE		= $(EXECUTABLE)
Packit 857059
CMD_TARGETS_MISC	= opasetupssh opascpall opauploadall opadownloadall opapingall opacmdall opashowallports opacaptureall opahostadmin opachassisadmin opaswitchadmin tcl_proc ff_funcs opafastfabric.conf.def opafastfabric.conf-sample opafabricanalysis opahostsmanalysis opaesmanalysis opachassisanalysis opaallanalysis opafastfabric opaswenableall opaswdisableall opaexpandfile show_counts opacablehealthcron opa-cablehealth
Packit 857059
# files to remove during clean phase
Packit 857059
CLEAN_TARGETS_MISC  = opatest
Packit 857059
CLEAN_TARGETS       = $(OBJECTS) $(RSCOBJECTS) $(IDL_TARGETS) $(CLEAN_TARGETS_MISC)
Packit 857059
# other files to remove during clobber phase
Packit 857059
CLOBBER_TARGETS_MISC=
Packit 857059
# sub-directory to install to within bin
Packit 857059
BIN_SUBDIR		= 
Packit 857059
# sub-directory to install to within include
Packit 857059
INCLUDE_SUBDIR		=
Packit 857059
Packit 857059
# Additional Settings
Packit 857059
#CLOCALDEBUG	= User defined C debugging compilation flags [Empty]
Packit 857059
#CCLOCALDEBUG	= User defined C++ debugging compilation flags [Empty]
Packit 857059
#CLOCAL	= User defined C flags for compiling [Empty]
Packit 857059
#CCLOCAL	= User defined C++ flags for compiling [Empty]
Packit 857059
#BSCLOCAL	= User flags for Browse File Builder [Empty]
Packit 857059
#DEPENDLOCAL	= user defined makedepend flags [Empty]
Packit 857059
#LINTLOCAL	= User defined lint flags [Empty]
Packit 857059
#LOCAL_INCLUDE_DIRS	= User include directories to search for C/C++ headers [Empty]
Packit 857059
#LDLOCAL	= User defined C flags for linking [Empty]
Packit 857059
#IMPLIBLOCAL	= User flags for Object Lirary Manager [Empty]
Packit 857059
#MIDLLOCAL	= User flags for IDL compiler [Empty]
Packit 857059
#RSCLOCAL	= User flags for resource compiler [Empty]
Packit 857059
#LOCALDEPLIBS	= User libraries to include in dependencies [Empty]
Packit 857059
#LOCALLIBS		= User libraries to use when linking [Empty]
Packit 857059
#				(in addition to LOCALDEPLIBS)
Packit 857059
#LOCAL_LIB_DIRS	= User library directories for libpaths [Empty]
Packit 857059
Packit 857059
CLOCAL = $(CPIE)
Packit 857059
Packit 857059
# Include Make Rules definitions and rules
Packit 857059
include $(TL_DIR)/IbaTools/Makerules.module
Packit 857059
Packit 857059
#=============================================================================#
Packit 857059
# Overrides:
Packit 857059
#-----------------------------------------------------------------------------#
Packit 857059
#CCOPT			=	# C++ optimization flags, default lets build config decide
Packit 857059
#COPT			=	# C optimization flags, default lets build config decide
Packit 857059
#SUBSYSTEM = Subsystem to build for (none, console or windows) [none]
Packit 857059
#					 (Windows Only)
Packit 857059
#USEMFC	= How Windows MFC should be used (none, static, shared, no_mfc) [none]
Packit 857059
#				(Windows Only)
Packit 857059
#=============================================================================#
Packit 857059
Packit 857059
#=============================================================================#
Packit 857059
# Rules:
Packit 857059
#-----------------------------------------------------------------------------#
Packit 857059
#$(BUILDDIR)/opafastfabric.conf: opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK) $(BUILDDIR)
Packit 857059
opafastfabric.conf.def: opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK)
Packit 857059
	if [ "$(BUILD_TARGET_OS_VENDOR_VERSION)" = "ES123" ]; then \
Packit 857059
		sed -i '/FF_IPOIB_CONNECTED=/s/no/yes/' $<; \
Packit 857059
	fi;
Packit 857059
	$(CP) $< $@
Packit 857059
	chmod a+x $@
Packit 857059
Packit 857059
opafastfabric.conf-sample: opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK)
Packit 857059
	$(CP) $< $@
Packit 857059
	chmod a+x $@
Packit 857059
Packit 857059
.SUFFIXES: .pl -sample
Packit 857059
%:%.pl
Packit 857059
	$(RM) $(RMFORCE) $@
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
%-sample:%
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
opaswenableall: opaswdisableall.sh
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
opafastfabric: opafastfabric.pl
Packit 857059
	$(SED) -e 's/THIS_IS_THE_IB_STACK_TYPE/$(IB_STACK)/' < $< > $@
Packit 857059
	$(CHMOD) a+x $@
Packit 857059
Packit 857059
opahostadmin: opatest
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
opachassisadmin: opatest
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
opaswitchadmin: opatest
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
opacablehealthcron: opacablehealthcron.sh
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
opa-cablehealth: opacablehealth.cron
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
switches:	ibnodes
Packit 857059
	$(CP) $< $@
Packit 857059
Packit 857059
osid_wrapper:
Packit 857059
	echo $(BUILD_TARGET_OS_ID) > osid_wrapper
Packit 857059
Packit 857059
# process Sub-directories
Packit 857059
include $(TL_DIR)/Makerules/Maketargets.toplevel
Packit 857059
Packit 857059
# build cmds and libs
Packit 857059
include $(TL_DIR)/Makerules/Maketargets.build
Packit 857059
Packit 857059
# install for includes, libs and cmds phases
Packit 857059
include $(TL_DIR)/Makerules/Maketargets.install
Packit 857059
Packit 857059
# install for stage phase
Packit 857059
#include $(TL_DIR)/Makerules/Maketargets.stage
Packit 857059
STAGE::
Packit 857059
	$(VS)$(STAGE_INSTALL) $(STAGE_INSTALL_DIR_OPT) $(PROJ_STAGE_FASTFABRIC_DIR) opasetupssh opascpall opauploadall opadownloadall opapingall opacmdall opashowallports opacaptureall opahostadmin opachassisadmin opaswitchadmin opafabricanalysis opahostsmanalysis opaesmanalysis opachassisanalysis opaallanalysis opafastfabric opaswenableall opaswdisableall opaexpandfile ff_funcs opafastfabric.conf.def show_counts opacablehealthcron
Packit 857059
	$(VS)$(STAGE_INSTALL) $(STAGE_INSTALL_DIR_OPT) $(PROJ_STAGE_IBTOOLS_DIR) tcl_proc $(TCL_SOURCES) opafastfabric.conf.def ff_funcs ports hosts allhosts switches chassis esm_chassis osid_wrapper
Packit 857059
	$(VS)$(STAGE_INSTALL) $(STAGE_INSTALL_DIR_OPT) $(PROJ_STAGE_FASTFABRIC_DIR)/samples allhosts-sample chassis-sample hosts-sample switches-sample ports-sample mac_to_dhcp opafastfabric.conf-sample opa_ca_openssl.cnf-sample opa_comp_openssl.cnf-sample esm_chassis-sample
Packit 857059
	$(VS)$(STAGE_INSTALL) $(STAGE_INSTALL_DIR_OPT) $(PROJ_STAGE_ETC_DIR)/cron.d opa-cablehealth
Packit 857059
Packit 857059
# Unit test execution
Packit 857059
#include $(TL_DIR)/Makerules/Maketargets.runtest
Packit 857059
Packit 857059
#=============================================================================#
Packit 857059
Packit 857059
#=============================================================================#
Packit 857059
# DO NOT DELETE THIS LINE -- make depend depends on it.
Packit 857059
#=============================================================================#