author | Craig Mohrman <craig.mohrman@oracle.com> |
Mon, 11 May 2015 10:44:02 -0700 | |
branch | s11u2-sru |
changeset 4270 | 279415c50b97 |
parent 2855 | 576d5a7857b7 |
child 4996 | 739983ef315c |
permissions | -rw-r--r-- |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
1 |
# |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
2 |
# CDDL HEADER START |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
3 |
# |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
4 |
# The contents of this file are subject to the terms of the |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
5 |
# Common Development and Distribution License (the "License"). |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
6 |
# You may not use this file except in compliance with the License. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
7 |
# |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
9 |
# or http://www.opensolaris.org/os/licensing. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
10 |
# See the License for the specific language governing permissions |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
11 |
# and limitations under the License. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
12 |
# |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
18 |
# |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
19 |
# CDDL HEADER END |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
20 |
# |
2855
576d5a7857b7
16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
920
diff
changeset
|
21 |
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
22 |
# |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
23 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
24 |
# Since we are building these as a set and not packaging them individually at |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
25 |
# this time, each OFED component should install in a common prototype directory |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
26 |
# so we override PROTO_DIR |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
27 |
PROTO_DIR = $(WS_COMPONENTS)/open-fabrics/prototype/$(MACH) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
28 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
29 |
# OFED only builds with GCC |
2855
576d5a7857b7
16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
920
diff
changeset
|
30 |
COMPILER=gcc3 |
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
31 |
|
2855
576d5a7857b7
16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
920
diff
changeset
|
32 |
PATH=$(GCC3_ROOT)/bin:/usr/bin:/usr/gnu/bin |
576d5a7857b7
16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
920
diff
changeset
|
33 |
ifeq ($(strip $(PARFAIT_BUILD)),yes) |
576d5a7857b7
16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
920
diff
changeset
|
34 |
PATH=$(PARFAIT_TOOLS_GCC3):$(GCC3_ROOT)/bin:/usr/bin |
576d5a7857b7
16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
920
diff
changeset
|
35 |
endif |
519
64d5e70ee0eb
7086596 userland problems on 173
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
369
diff
changeset
|
36 |
|
369
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
37 |
CPPFLAGS += "-Wformat=2" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
38 |
CFLAGS += -D_REENTRANT |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
39 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
40 |
# Since we are not currently packaging the various OFED components separately |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
41 |
# and we still need headers and to link with the components that we are |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
42 |
# building, we need to point the compiler and linker at a common proto area |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
43 |
# for OFED component headers and libraries. |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
44 |
SHARED_INCLUDES += -I$(PROTO_DIR)/usr/include |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
45 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
46 |
# We need to insert the shared "proto" area include directories at the front |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
47 |
# of any compile line to preempt the system headers. It seems that the "best" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
48 |
# way to do this is to augment the C/C++ compiler macros. YUCK!!!! |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
49 |
CC += $(SHARED_INCLUDES) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
50 |
CXX += $(SHARED_INCLUDES) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
51 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
52 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
53 |
# This is generally required, but must be overridable |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
54 |
DISABLE_LIBCHECK = --disable-libcheck |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
55 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
56 |
CONFIGURE_ENV += CFLAGS="$(CFLAGS)" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
57 |
CONFIGURE_ENV += LD_OPTIONS="-R$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
58 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
59 |
COMPONENT_INSTALL_ENV += LDFLAGS="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
60 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
61 |
COMPONENT_BUILD_ENV += CPPFLAGS="$(CPPFLAGS)" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
62 |
COMPONENT_BUILD_ENV += LIBS="$(LIBS)" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
63 |
COMPONENT_BUILD_ENV += LDFLAGS="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) $(LIBS)" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
64 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
65 |
COMPONENT_BUILD_ARGS += LDFLAGS="-L$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) $(LIBS)" |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
66 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
67 |
CONFIGURE_OPTIONS += --disable-static |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
68 |
CONFIGURE_OPTIONS += $(DISABLE_LIBCHECK) |
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
69 |
|
cc8c00719da9
PSARC 2011/165 OFUV update of existing components
Boris Chiu <Boris.Chiu@Sun.COM>
parents:
diff
changeset
|
70 |
CLEAN_PATHS += $(BUILD_DIR) |