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