4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
21 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
24 # Since we are building these as a set and not packaging them individually at
25 # this time, each OFED component should install in a common prototype directory
26 # so we override PROTO_DIR
27 PROTO_DIR
= $(WS_COMPONENTS
)/open-fabrics
/prototype
/$(MACH
)
29 # OFED only builds with GCC
32 PATH
=/usr
/sfw
/bin
:/usr
/bin
:/usr
/gnu
/bin
34 CPPFLAGS
+= "-Wformat=2"
35 CFLAGS
+= -D_REENTRANT
37 # Since we are not currently packaging the various OFED components separately
38 # and we still need headers and to link with the components that we are
39 # building, we need to point the compiler and linker at a common proto area
40 # for OFED component headers and libraries.
41 SHARED_INCLUDES
+= -I
$(PROTO_DIR
)/usr
/include
43 # We need to insert the shared "proto" area include directories at the front
44 # of any compile line to preempt the system headers. It seems that the "best"
45 # way to do this is to augment the C/C++ compiler macros. YUCK!!!!
46 CC
+= $(SHARED_INCLUDES
)
47 CXX
+= $(SHARED_INCLUDES
)
50 # This is generally required, but must be overridable
51 DISABLE_LIBCHECK
= --disable-libcheck
53 CONFIGURE_ENV
+= CFLAGS
="$(CFLAGS)"
54 CONFIGURE_ENV
+= LD_OPTIONS
="-R$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))"
56 COMPONENT_INSTALL_ENV
+= LDFLAGS
="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))"
58 COMPONENT_BUILD_ENV
+= CPPFLAGS
="$(CPPFLAGS)"
59 COMPONENT_BUILD_ENV
+= LIBS
="$(LIBS)"
60 COMPONENT_BUILD_ENV
+= LDFLAGS
="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) $(LIBS)"
62 COMPONENT_BUILD_ARGS
+= LDFLAGS
="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) $(LIBS)"
64 CONFIGURE_OPTIONS
+= --disable-static
65 CONFIGURE_OPTIONS
+= $(DISABLE_LIBCHECK
)
67 CLEAN_PATHS
+= $(BUILD_DIR
)