ofed.mk revision 2238
335N/A#
335N/A# CDDL HEADER START
335N/A#
335N/A# The contents of this file are subject to the terms of the
335N/A# Common Development and Distribution License (the "License").
335N/A# You may not use this file except in compliance with the License.
335N/A#
335N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
335N/A# or http://www.opensolaris.org/os/licensing.
335N/A# See the License for the specific language governing permissions
335N/A# and limitations under the License.
335N/A#
335N/A# When distributing Covered Code, include this CDDL HEADER in each
335N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
335N/A# If applicable, add the following below this CDDL HEADER, with the
335N/A# fields enclosed by brackets "[]" replaced with your own identifying
335N/A# information: Portions Copyright [yyyy] [name of copyright owner]
335N/A#
335N/A# CDDL HEADER END
335N/A#
335N/A# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
335N/A#
335N/A
335N/A# Since we are building these as a set and not packaging them individually at
335N/A# this time, each OFED component should install in a common prototype directory
335N/A# so we override PROTO_DIR
335N/APROTO_DIR = $(WS_COMPONENTS)/open-fabrics/prototype/$(MACH)
335N/A
335N/A# OFED only builds with GCC
335N/ACOMPILER=gcc3
335N/A
335N/APATH=$(GCC3_ROOT)/bin:/usr/bin:/usr/gnu/bin
335N/Aifeq ($(strip $(PARFAIT_BUILD)),yes)
335N/APATH=$(PARFAIT_TOOLS_GCC3):$(GCC3_ROOT)/bin:/usr/bin
335N/Aendif
335N/A
335N/ACPPFLAGS += "-Wformat=2"
335N/ACFLAGS += -D_REENTRANT
335N/A
335N/A# Since we are not currently packaging the various OFED components separately
335N/A# and we still need headers and to link with the components that we are
335N/A# building, we need to point the compiler and linker at a common proto area
335N/A# for OFED component headers and libraries.
335N/ASHARED_INCLUDES += -I$(PROTO_DIR)/usr/include
335N/A
335N/A# We need to insert the shared "proto" area include directories at the front
335N/A# of any compile line to preempt the system headers. It seems that the "best"
335N/A# way to do this is to augment the C/C++ compiler macros. YUCK!!!!
335N/ACC += $(SHARED_INCLUDES)
335N/ACXX += $(SHARED_INCLUDES)
335N/A
335N/A
335N/A# This is generally required, but must be overridable
335N/ADISABLE_LIBCHECK = --disable-libcheck
335N/A
335N/ACONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += LD_OPTIONS="-R$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))"
COMPONENT_INSTALL_ENV += LDFLAGS="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))"
COMPONENT_BUILD_ENV += CPPFLAGS="$(CPPFLAGS)"
COMPONENT_BUILD_ENV += LIBS="$(LIBS)"
COMPONENT_BUILD_ENV += LDFLAGS="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) $(LIBS)"
COMPONENT_BUILD_ARGS += LDFLAGS="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) $(LIBS)"
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += $(DISABLE_LIBCHECK)
CLEAN_PATHS += $(BUILD_DIR)