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