Blame TestTools/Makefile

Packit 857059
# BEGIN_ICS_COPYRIGHT8 ****************************************
Packit 857059
# 
Packit 857059
# Copyright (c) 2015, 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
Packit 857059
# Makefile for TestTools
Packit 857059
Packit 857059
# Include Make Control Settings
Packit 857059
include $(TL_DIR)/$(PROJ_FILE_DIR)/Makesettings.project
Packit 857059
Packit 857059
# This makefile is an oddball, it is the only test Makefile
Packit 857059
# which actually builds code.
Packit 857059
# even then it only builds some scripts and a tclIndex file.
Packit 857059
# hence for simplicity it is handcoded and does not use any makerules
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		= # TestTools$(EXE_SUFFIX)
Packit 857059
# list of sub directories to build
Packit 857059
DIRS			= 
Packit 857059
# C files (.c)
Packit 857059
CFILES			= \
Packit 857059
				qlgc_fork.c \
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
TCL_SOURCES		= proc_mgr.exp tools.exp target.exp chassis.exp basic.exp \
Packit 857059
			   		network.exp install.exp ib.exp extmng.exp mpi.exp opa_to_xml.exp common_funcs.exp sm_control.exp switch_methods.exp
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		= 
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) 
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	= 
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	= $(LIB_PREFIX)qlgc_fork$(SHLIB_SUFFIX)
Packit 857059
CMD_TARGETS_EXE		= $(EXECUTABLE)
Packit 857059
CMD_TARGETS_MISC	= tclIndex front
Packit 857059
# files to remove during clean phase
Packit 857059
CLEAN_TARGETS_MISC	=  
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=$(CMD_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
CLOCAL=-DUSE_TCL_STUBS $(CPIC)
Packit 857059
# tcl.h is located in /usr/include for RedHat and in /usr/include/tcl for Ubuntu
Packit 857059
LOCAL_INCLUDE_DIRS = /usr/include/tcl
Packit 857059
LOCALLIBS=$(shell if [ -e /usr/lib64/libtclstub.a -o -e /usr/lib/libtclstub.a -o -e /usr/lib/x86_64-linux-gnu/libtclstub.a ]; then echo tclstub; \
Packit 857059
		elif [ -e /usr/lib64/libtclstub8.6.a -o -e /usr/lib/libtclstub8.6.a -o -e /usr/lib/x86_64-linux-gnu/libtclstub8.6.a ]; then echo tclstub8.6; \
Packit 857059
		elif [ -e /usr/lib64/libtclstub8.5.a -o -e /usr/lib/libtclstub8.5.a -o -e /usr/lib/x86_64-linux-gnu/libtclstub8.5.a ]; then echo tclstub8.5; \
Packit 857059
		else echo tclstub8.4; fi)
Packit 857059
Packit 857059
# Include Make Rules definitions and rules
Packit 857059
include $(TL_DIR)/$(PROJ_FILE_DIR)/Makerules.project
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
# 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
ifeq "$(BUILD_TARGET)" "PPC64"
Packit 857059
# must build for 32 bit on PPC64, 64 bit TCL library not available
Packit 857059
LDMACH=-m32
Packit 857059
%.o: %.c
Packit 857059
	$(VS)$(CC) $(subst -m64,-m32,$(CFLAGS)) -c $<
Packit 857059
endif
Packit 857059
Packit 857059
# used to copy CMD_TARGETS from this directory to $TL_DIR
Packit 857059
$(TL_DIR)/%: %
Packit 857059
	rm -f $@
Packit 857059
	cp $^ $@
Packit 857059
# index for autoloading Tcl procedures, remove first in case a symlink
Packit 857059
tclIndex: $(TCL_SOURCES)
Packit 857059
	rm -f tclIndex
Packit 857059
	echo auto_mkindex . $^|tclsh
Packit 857059
	echo '# [ICS VERSION STRING: unknown]' >> tclIndex
Packit 857059
	cat qlgc_fork.pkgIndex >> tclIndex
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_IBTOOLS_DIR) tclIndex $(TCL_SOURCES) front ibtools.exp $(CMD_TARGETS_SHLIB)
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
#=============================================================================#