Makefile revision 6320
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser#
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser# CDDL HEADER START
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser#
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser# The contents of this file are subject to the terms of the
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# Common Development and Distribution License (the "License").
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# You may not use this file except in compliance with the License.
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser#
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# or http://www.opensolaris.org/os/licensing.
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser# See the License for the specific language governing permissions
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser# and limitations under the License.
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser#
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser# When distributing Covered Code, include this CDDL HEADER in each
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
54e339f91785368a7825b2edaad04c2177a1a382Scott Moser# If applicable, add the following below this CDDL HEADER, with the
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# fields enclosed by brackets "[]" replaced with your own identifying
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# information: Portions Copyright [yyyy] [name of copyright owner]
79159a86ddb51071055abd7ee08935bc65b9e7a9Scott Moser#
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# CDDL HEADER END
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser#
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser#
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPILER = gcc
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserinclude ../../../make-rules/shared-macros.mk
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_NAME= libsif
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_VERSION= 1.0
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_ARCHIVE_HASH= \
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser sha256:501858b4b9d45ebe163d9136f7fb4d08708aaf91cc97c40059ae2a1b4737239d
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_SERVER= download.oracle.com
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_ARCHIVE_URL= http://$(COMPONENT_SERVER)/otn-pub/oss/networking/$(COMPONENT_ARCHIVE)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserinclude $(WS_TOP)/make-rules/prep.mk
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserinclude $(WS_TOP)/make-rules/configure.mk
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserinclude ../ofed.mk
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserREMOVE_OLD_SRC= sif.h sif_user.h sif_int_user.h os_header.h psif_api.h psif_endian.h psif_hw_print.h psif_hw_data* psif_hw_setget* psif_hw_macro* kernel_types.h
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# --disable-libcheck is not a supported option for this component
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserDISABLE_LIBCHECK=
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserLIBS += -libverbs
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserLDFLAGS += -L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/infiniband
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCONFIGURE_ENV += CPPFLAGS=" -DSOLARIS $(CPPFLAGS) -I../../include/sif/ -I../../include/psifapi/ -I../../$(COMPONENT_SRC)/src/ "
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_PREP_ACTION += cd $(COMPONENT_SRC)/src/ ; rm $(REMOVE_OLD_SRC) ; cd - ; \
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser (cd $(@D); \
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser autoreconf -ivf ; \
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser aclocal --force ; \
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser libtoolize --copy --force --ltdl ; \
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser autoconf --force ; \
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser autoheader --force)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserCOMPONENT_POST_INSTALL_ACTION =\
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser $(RM) $(PROTO_DIR)/$(CONFIGURE_LIBDIR.32)/$(COMPONENT_NAME).la;\
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser $(RM) $(PROTO_DIR)/$(CONFIGURE_LIBDIR.64)/$(COMPONENT_NAME).la;\
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# common targets
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserbuild_sparc: $(BUILD_32_and_64)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserbuild_i386:
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser @echo "Not available."
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserbuild: build_$(MACH)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserinstall_sparc: $(INSTALL_32_and_64)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserinstall_i386:
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser @echo "Not available."
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserinstall: install_$(MACH)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser# we're sparc-only
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserifeq ($(MACH), i386)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott MoserPUBLISH_STAMP=
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moserendif
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Mosertest: $(NO_TESTS)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Mosersystem-test: $(NO_TESTS)
65d8ae9c4a66f5ca85289c02dc06d63261c84619Scott Moser