author  Craig Mohrman <Craig.Mohrman@oracle.com> 
Mon, 28 Mar 2011 14:55:59 0700  
changeset 156  c2445b73a8b2 
parent 152  f0ba422362c2 
child 160  4eabca2bceee 
permissions  rwrr 
2  1 
# 
2 
# CDDL HEADER START 

3 
# 

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. 

7 
# 

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. 

12 
# 

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] 

18 
# 

19 
# CDDL HEADER END 

20 
# 

58
d8024c042a00
7011369 gmake complains about fresh userland bits
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
53
diff
changeset

21 
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 
2  22 
# 
23 

32
280a7444e782
automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
31
diff
changeset

24 
PATH=/usr/bin:/usr/gnu/bin 
280a7444e782
automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
31
diff
changeset

25 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

26 
# Default to looking for source archives on the internal mirror before we 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

27 
# hammer on the external repositories. 
145
1e2390f5555e
7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
142
diff
changeset

28 
export DOWNLOAD_SEARCH_PATH += http://userland.us.oracle.com/sourcearchives/ 
127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

29 

3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

30 
# The workspace starts at the mercurial root 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

31 
export WS_TOP ?= $(shell hg root) 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

32 

2  33 
CONSOLIDATION = userland 
145
1e2390f5555e
7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
142
diff
changeset

34 
PUBLISHER ?= $(CONSOLIDATION) 
26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

35 

38
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset

36 
ROOT = / 
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset

37 

29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

38 
# get the most recent build number from the last mercurial tag 
93
b579c7b1bb44
7016731 move zsh from sfw to userland
Danek Duvall <danek.duvall@oracle.com>
parents:
85
diff
changeset

39 
LAST_HG_TAG = $(shell hg tags q  grep build  head 1) 
29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

40 
LAST_BUILD_NUM = $(LAST_HG_TAG:build%=%) 
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

41 

26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

42 
OS_VERSION = $(shell uname r) 
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

43 
SOLARIS_VERSION = $(OS_VERSION:5.%=2.%) 
29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

44 
BUILD_NUM = 0.$(shell expr $(LAST_BUILD_NUM) + 1) 
26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

45 
BUILD_VERSION = $(OS_VERSION)$(BUILD_NUM) 
2  46 

38
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset

47 

2  48 
COMPILER = studio 
6
20f80c019d73
add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2
diff
changeset

49 
BITS = 32 
2  50 
PYTHON_VERSION = 2.6 
58
d8024c042a00
7011369 gmake complains about fresh userland bits
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
53
diff
changeset

51 
PYTHON_VERSIONS = 2.6 
2  52 

145
1e2390f5555e
7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
142
diff
changeset

53 
WS_LOGS = $(WS_TOP)/$(MACH)/logs 
1e2390f5555e
7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
142
diff
changeset

54 
WS_REPO = $(WS_TOP)/$(MACH)/repo 
34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

55 
WS_TOOLS = $(WS_TOP)/tools 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

56 
WS_MAKE_RULES = $(WS_TOP)/makerules 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

57 
WS_COMPONENTS = $(WS_TOP)/components 
49  58 
WS_INCORPORATIONS = $(WS_TOP)/incorporations 
145
1e2390f5555e
7020836 revert workaround in 7014413 now that pkglint doesn't complain
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
142
diff
changeset

59 
WS_LINT_CACHE = $(WS_TOP)/$(MACH)/pkglintcache 
2  60 

34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

61 
BASS_O_MATIC = $(WS_TOOLS)/bassomatic 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

62 

94
e2364cad23ff
7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
93
diff
changeset

63 
CLONEY = $(WS_TOOLS)/cloney 
e2364cad23ff
7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
93
diff
changeset

64 

156
c2445b73a8b2
6949695 Would like to have perl 5.12 (use CONFIG_SHELL)
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
152
diff
changeset

65 
CONFIG_SHELL = /bin/bash 
c2445b73a8b2
6949695 Would like to have perl 5.12 (use CONFIG_SHELL)
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
152
diff
changeset

66 

34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

67 
PKG_REPO = file:$(WS_REPO) 
59
7500d63edb42
7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
58
diff
changeset

68 

72
4c33a310f793
7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
70
diff
changeset

69 
COMPONENT_DIR = $(shell pwd) 
4c33a310f793
7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
70
diff
changeset

70 
SOURCE_DIR = $(COMPONENT_DIR)/$(COMPONENT_SRC) 
4c33a310f793
7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
70
diff
changeset

71 
BUILD_DIR = $(COMPONENT_DIR)/build 
59
7500d63edb42
7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
58
diff
changeset

72 
PROTO_DIR = $(BUILD_DIR)/prototype/$(MACH) 
2  73 

85
8098282b503b
7018226 move GNU screen to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
82
diff
changeset

74 
ETCDIR = /etc 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

75 
USRDIR = /usr 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

76 
BINDIR = /bin 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

77 
LIBDIR = /lib 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

78 
USRBINDIR = $(USRDIR)/bin 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

79 
USRLIBDIR = $(USRDIR)/lib 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

80 
USRSHAREDIR = $(USRDIR)/share 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

81 
USRSHAREMANDIR = $(USRSHAREDIR)/man 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

82 
USRSHAREMAN1DIR = $(USRSHAREMANDIR)/man1 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

83 
USRSHAREMAN3DIR = $(USRSHAREMANDIR)/man3 
152
f0ba422362c2
7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
151
diff
changeset

84 
USRSHAREMAN4DIR = $(USRSHAREMANDIR)/man4 
74
7e35801ce8b8
7016379 migrate elinks to userland
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
72
diff
changeset

85 
USRSHAREMAN5DIR = $(USRSHAREMANDIR)/man5 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

86 
USRLIBDIR64 = $(USRDIR)/lib/$(MACH64) 
85
8098282b503b
7018226 move GNU screen to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
82
diff
changeset

87 
PROTOETCDIR = $(PROTO_DIR)/$(ETCDIR) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

88 
PROTOUSRDIR = $(PROTO_DIR)/$(USRDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

89 
PROTOUSRBINDIR = $(PROTO_DIR)/$(USRBINDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

90 
PROTOUSRLIBDIR = $(PROTO_DIR)/$(USRLIBDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

91 
PROTOUSRLIBDIR64 = $(PROTO_DIR)/$(USRLIBDIR64) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

92 
PROTOUSRSHAREDIR = $(PROTO_DIR)/$(USRSHAREDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

93 
PROTOUSRSHAREMANDIR = $(PROTO_DIR)/$(USRSHAREMANDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

94 
PROTOUSRSHAREMAN1DIR = $(PROTO_DIR)/$(USRSHAREMAN1DIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

95 
PROTOUSRSHAREMAN3DIR = $(PROTO_DIR)/$(USRSHAREMAN3DIR) 
152
f0ba422362c2
7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
151
diff
changeset

96 
PROTOUSRSHAREMAN4DIR = $(PROTO_DIR)/$(USRSHAREMAN4DIR) 
f0ba422362c2
7030869 move git from sfw consolidation to userland consolidation
Craig Mohrman <Craig.Mohrman@oracle.com>
parents:
151
diff
changeset

97 
PROTOUSRSHAREMAN5DIR = $(PROTO_DIR)/$(USRSHAREMAN5DIR) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

98 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

99 

43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

100 
SFWBIN = /usr/sfw/bin 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

101 
SFWLIB = /usr/sfw/lib 
120
ef1efc113f13
7021528 move bison/gsed to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
116
diff
changeset

102 
SFWLIB64 = /usr/sfw/lib/$(MACH64) 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

103 
SFWSHARE = /usr/sfw/share 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

104 
SFWSHAREMAN = /usr/sfw/share/man 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

105 
SFWSHAREMAN1 = /usr/sfw/share/man/man1 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

106 
PROTOSFWBIN = $(PROTO_DIR)/$(SFWBIN) 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

107 
PROTOSFWLIB = $(PROTO_DIR)/$(SFWLIB) 
120
ef1efc113f13
7021528 move bison/gsed to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
116
diff
changeset

108 
PROTOSFWLIB64 = $(PROTO_DIR)/$(SFWLIB64) 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

109 
PROTOSFWSHARE = $(PROTO_DIR)/$(SFWSHARE) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

110 
PROTOSFWSHAREMAN = $(PROTO_DIR)/$(SFWSHAREMAN) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

111 
PROTOSFWSHAREMAN1 = $(PROTO_DIR)/$(SFWSHAREMAN1) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

112 

a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

113 
GNUBIN = /usr/gnu/bin 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

114 
GNUSHARE = /usr/gnu/share 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

115 
GNUSHAREMAN = /usr/gnu/share/man 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

116 
GNUSHAREMAN1 = /usr/gnu/share/man/man1 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

117 
PROTOGNUBIN = $(PROTO_DIR)/$(GNUBIN) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

118 
PROTOGNUSHARE = $(PROTO_DIR)/$(GNUSHARE) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

119 
PROTOGNUSHAREMAN = $(PROTO_DIR)/$(GNUSHAREMAN) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

120 
PROTOGNUSHAREMAN1 = $(PROTO_DIR)/$(GNUSHAREMAN1) 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

121 

16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

122 
# work around _TIME, _DATE, embedded date chatter in component builds 
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

123 
# to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME) 
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

124 
# to the appropriate {CONFIGUREBUILDINSTALL}_ENV 
34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

125 
CONSTANT_TIME = LD_PRELOAD_32=$(WS_TOOLS)/time$(MACH32).so 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

126 
CONSTANT_TIME += LD_PRELOAD_64=$(WS_TOOLS)/time$(MACH64).so 
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

127 
CONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT) 
6
20f80c019d73
add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2
diff
changeset

128 

12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

129 
# set MACH from uname p to either sparc or i386 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

130 
MACH = $(shell uname p) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

131 

41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

132 
# set MACH32 from MACH to either sparcv7 or i86 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

133 
MACH32_1 = $(MACH:sparc=sparcv7) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

134 
MACH32 = $(MACH32_1:i386=i86) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

135 

41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

136 
# set MACH64 from MACH to either sparcv9 or amd64 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

137 
MACH64_1 = $(MACH:sparc=sparcv9) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

138 
MACH64 = $(MACH64_1:i386=amd64) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

139 

61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

140 
BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

141 
BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

142 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

143 
BUILD_32 = $(BUILD_DIR_32)/.built 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

144 
BUILD_64 = $(BUILD_DIR_64)/.built 
12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

145 
BUILD_32_and_64 = $(BUILD_32) $(BUILD_64) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

146 

61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

147 
INSTALL_32 = $(BUILD_DIR_32)/.installed 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

148 
INSTALL_64 = $(BUILD_DIR_64)/.installed 
12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

149 
INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64) 
2  150 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

151 
TEST_32 = $(BUILD_DIR_32)/.tested 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

152 
TEST_64 = $(BUILD_DIR_64)/.tested 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

153 
TEST_32_and_64 = $(TEST_32) $(TEST_64) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

154 

40
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

155 
# BUILD_TOOLS is the root of all tools not normally installed on the system. 
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

156 
BUILD_TOOLS = /ws/onnvtools 
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

157 

84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

158 
SPRO_ROOT = $(BUILD_TOOLS)/SUNWspro 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

159 
SPRO_VROOT = $(SPRO_ROOT)/sunstudio12.1 
40
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

160 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

161 
GCC_ROOT = /usr/sfw 
2  162 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

163 
CC.studio.32 = $(SPRO_VROOT)/bin/cc 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

164 
CCC.studio.32 = $(SPRO_VROOT)/bin/CC 
2  165 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

166 
CC.studio.64 = $(SPRO_VROOT)/bin/cc 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

167 
CCC.studio.64 = $(SPRO_VROOT)/bin/CC 
2  168 

151
f9e42a3f7095
7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
148
diff
changeset

169 
CC.gcc.32 = $(GCC_ROOT)/bin/gcc 
f9e42a3f7095
7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
148
diff
changeset

170 
CCC.gcc.32 = $(GCC_ROOT)/bin/g++ 
2  171 

151
f9e42a3f7095
7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
148
diff
changeset

172 
CC.gcc.64 = $(GCC_ROOT)/bin/gcc 
f9e42a3f7095
7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
148
diff
changeset

173 
CCC.gcc.64 = $(GCC_ROOT)/bin/g++ 
2  174 

175 
CC = $(CC.$(COMPILER).$(BITS)) 

176 
CCC = $(CCC.$(COMPILER).$(BITS)) 

177 

61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

178 
lint.32 = $(SPRO_VROOT)/bin/lint m32 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

179 
lint.64 = $(SPRO_VROOT)/bin/lint m64 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

180 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

181 
LINT = $(lint.$(BITS)) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

182 

16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

183 
LD = /usr/bin/ld 
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

184 

148
33ca3897ae25
7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
146
diff
changeset

185 
PYTHON_VENDOR_PACKAGES.32 = /usr/lib/python$(PYTHON_VERSION)/vendorpackages 
33ca3897ae25
7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
146
diff
changeset

186 
PYTHON_VENDOR_PACKAGES.64 = /usr/lib/python$(PYTHON_VERSION)/vendorpackages/64 
33ca3897ae25
7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
146
diff
changeset

187 
PYTHON_VENDOR_PACKAGES = $(PYTHON_VENDOR_PACKAGES.$(BITS)) 
33ca3897ae25
7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
146
diff
changeset

188 

2  189 
PYTHON.2.6.32 = /usr/bin/python2.6 
47
28ef4b1fcfb1
64bit python should use $(MACH64), not amd64
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
43
diff
changeset

190 
PYTHON.2.6.64 = /usr/bin/$(MACH64)/python2.6 
2  191 

192 
PYTHON.32 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) 

193 
PYTHON.64 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) 

148
33ca3897ae25
7029701 libxml2 should move to userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
146
diff
changeset

194 
PYTHON = $(PYTHON.$(PYTHON_VERSION).$(BITS)) 
2  195 

146
8e22ba234817
7027466 Move nmap to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
145
diff
changeset

196 
# The default is sitepackages, but that directory belongs to the enduser. 
8e22ba234817
7027466 Move nmap to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
145
diff
changeset

197 
# Modules which are shipped by the OS but not with the core Python distribution 
8e22ba234817
7027466 Move nmap to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
145
diff
changeset

198 
# belong in vendorpackages. 
8e22ba234817
7027466 Move nmap to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
145
diff
changeset

199 
PYTHON_LIB= /usr/lib/python$(PYTHON_VERSION)/vendorpackages 
8e22ba234817
7027466 Move nmap to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
145
diff
changeset

200 

116
ae6a90899b42
7022452 move ant to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
109
diff
changeset

201 
JAVA_HOME = /usr/jdk/instances/jdk1.6.0 
ae6a90899b42
7022452 move ant to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
109
diff
changeset

202 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

203 
PERL = /usr/perl5/bin/perl 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

204 

2  205 
GMAKE = /usr/gnu/bin/make 
206 
GPATCH = /usr/gnu/bin/patch 

82
2f155565730b
7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
80
diff
changeset

207 
PATCH_LEVEL = 1 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

208 
GPATCH_BACKUP = backup versioncontrol=numbered 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

209 
GPATCH_FLAGS = p$(PATCH_LEVEL) $(GPATCH_BACKUP) 
2  210 

105
da9e87a40aec
7021891 repo created by build should be v4, not v3
Danek Duvall <danek.duvall@oracle.com>
parents:
102
diff
changeset

211 
PKGREPO = /usr/bin/pkgrepo 
2  212 
PKGSEND = /usr/bin/pkgsend 
70
c610cf9d3d5d
7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
64
diff
changeset

213 
PKGLINT = /usr/bin/pkglint 
2  214 

215 
TOUCH = /usr/bin/touch 

216 
MKDIR = /bin/mkdir p 

217 
RM = /bin/rm f 

7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
6
diff
changeset

218 
CP = /bin/cp f 
142
6f1cb90a0ef3
7026996 move tomcat to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
138
diff
changeset

219 
MV = /bin/mv f 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

220 
LN = /bin/ln 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

221 
SYMLINK = /bin/ln s 
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

222 
ENV = /usr/bin/env 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

223 
INSTALL = /usr/bin/ginstall 
138
089c2065503f
7016734 move pz7ip from sfw to userland
Danek Duvall <danek.duvall@oracle.com>
parents:
131
diff
changeset

224 
CHMOD = /usr/bin/chmod 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

225 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

226 
INS.dir= $(INSTALL) d $@ 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

227 
INS.file= $(INSTALL) m 444 $< $(@D) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

228 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

229 
# 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

230 
# C preprocessor flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

231 
# feature to your Makefile with CPPFLAGS += $(FEATURE_MACRO) and add to 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

232 
# the component build with CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" or 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

233 
# similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

234 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

235 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

236 
# Enables visibility of some c99 math functions that aren't visible by default. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

237 
# What other sideeffects are there? 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

238 
CPP_C99_EXTENDED_MATH = D_STDC_99 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

239 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

240 
# Enables large file support for components that have no other means of doing 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

241 
# so. Use CPP_LARGEFILES and not the .32/.64 variety directly 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

242 
CPP_LARGEFILES.32 = $(shell getconf LFS_CFLAGS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

243 
CPP_LARGEFILES.64 = $(shell getconf LFS64_CFLAGS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

244 
CPP_LARGEFILES = $(CPP_LARGEFILES.$(BITS)) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

245 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

246 
# Enables some #pragma redefine_extname to POSIXcompliant Standard C Library 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

247 
# functions. Also avoids the component's #define _POSIX_C_SOURCE to some value 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

248 
# we currently do not support. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

249 
CPP_POSIX = D_POSIX_C_SOURCE=200112L D_POSIX_PTHREAD_SEMANTICS 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

250 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

251 
# XPG6 mode. This option enables XPG6 conformance, plus extensions. 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

252 
# Amongst other things, this option will cause system calls like 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

253 
# popen (3C) and system (3C) to invoke the standardsconforming 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

254 
# shell, /usr/xpg4/bin/sh, instead of /usr/bin/sh. Add studio_XPG6MODE to 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

255 
# CFLAGS instead of using this directly 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

256 
CPP_XPG6MODE= D_XOPEN_SOURCE=600 D__EXTENSIONS__=1 D_XPG6 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

257 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

258 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

259 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

260 
# Studio C compiler flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

261 
# feature to your Makefile with CFLAGS += $(FEATURE_MACRO) and add to the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

262 
# component build with CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

263 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

264 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

265 
# Generate 32/64 bit objects 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

266 
CC_BITS = m$(BITS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

267 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

268 
# Code generation instruction set and optimization 'hints'. Use studio_XBITS 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

269 
# and not the .arch.bits variety directly. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

270 
studio_XBITS.sparc.32 = xtarget=ultra2 xarch=sparcvis xchip=ultra2 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

271 
studio_XBITS.sparc.64 = xtarget=ultra2 xarch=sparcvis xchip=ultra2 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

272 
studio_XBITS.i386.32 = xchip=pentium 
108
2cfc48b87a85
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
105
diff
changeset

273 
studio_XBITS.i386.64 = xchip=generic Ui386 U__i386 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

274 
studio_XBITS = $(studio_XBITS.$(MACH).$(BITS)) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

275 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

276 
# Turn on recognition of supported C99 language features and enable the 1999 C 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

277 
# standard library semantics of routines that appear in both the 1990 and 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

278 
# 1999 C standard. To use set studio_C99MODE=$(studio_99_ENABLE) in your 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

279 
# component Makefile. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

280 
studio_C99_ENABLE = xc99=all 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

281 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

282 
# Turn off recognition of C99 language features, and do not enable the 1999 C 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

283 
# standard library semantics of routines that appeared in both the 1990 and 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

284 
# 1999 C standard. To use set studio_C99MODE=$(studio_99_DISABLE) in your 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

285 
# component Makefile. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

286 
studio_C99_DISABLE = xc99=none 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

287 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

288 
# Use the compiler default 'xc99=all,no_lib' 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

289 
studio_C99MODE = 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

290 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

291 
# Allow zerosized struct/union declarations and void functions with return 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

292 
# statements. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

293 
studio_FEATURES_EXTENSIONS = features=extensions 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

294 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

295 
# Control the Studio optimization level. 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

296 
studio_OPT.sparc.32 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

297 
studio_OPT.sparc.64 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

298 
studio_OPT.i386.32 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

299 
studio_OPT.i386.64 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

300 
studio_OPT = $(studio_OPT.$(MACH).$(BITS)) 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

301 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

302 
# Studio PIC code generation. Use CC_PIC instead to select PIC code generation. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

303 
studio_PIC = KPIC DPIC 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

304 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

305 
# The Sun Studio 11 compiler has changed the behaviour of integer 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

306 
# wrap arounds and so a flag is needed to use the legacy behaviour 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

307 
# (without this flag panics/hangs could be exposed within the source). 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

308 
# This is used through studio_IROPTS, not the 'sparc' variety. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

309 
studio_IROPTS.sparc = W2,xwrap_int 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

310 
studio_IROPTS = $(studio_IROPTS.$(MACH)) 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

311 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

312 
# Control register usage for generated code. SPARC ABI requires system 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

313 
# libraries not to use application registers. x86 requires 'no%frameptr' at 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

314 
# x04 or higher. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

315 
studio_XREGS.sparc = xregs=no%appl,float 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

316 
studio_XREGS.i386 = xregs=no%frameptr 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

317 
studio_XREGS = $(studio_XREGS.$(MACH)) 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

318 

109
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

319 
# Set data alignment on sparc to reasonable values, 8 byte alignment for 32 bit 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

320 
# objects and 16 byte alignment for 64 bit objects. This is added to CFLAGS by 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

321 
# default. 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

322 
studio_ALIGN.sparc.32 = xmemalign=8s 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

323 
studio_ALIGN.sparc.64 = xmemalign=16s 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

324 
studio_ALIGN = $(studio_ALIGN.$(MACH).$(BITS)) 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

325 

07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

326 
# Studio shorthand for building multithreaded code, enables D_REENTRANT and 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

327 
# linking with threadin support. This is added to CFLAGS by default, override 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

328 
# studio_MT to turn this off. 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

329 
studio_MT = mt 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

330 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

331 
# See CPP_XPG6MODE comment above. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

332 
studio_XPG6MODE = $(studio_C99MODE) $(CPP_XPG6MODE) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

333 
XPG6MODE = $(studio_XPG6MODE) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

334 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

335 
# Default Studio C compiler flags. Add the required feature to your Makefile 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

336 
# with CFLAGS += $(FEATURE_MACRO) and add to the component build with 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

337 
# CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. In most cases, it 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

338 
# should not be necessary to add CFLAGS to any environment other than the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

339 
# configure environment. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

340 
CFLAGS.studio += $(studio_OPT) $(studio_XBITS) $(studio_XREGS) \ 
109
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

341 
$(studio_IROPTS) $(studio_C99MODE) $(studio_ALIGN) \ 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

342 
$(studio_MT) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

343 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

344 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

345 
# GNU C compiler flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

346 
# feature to your Makefile with CFLAGS += $(FEATURE_MACRO) and add to the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

347 
# component build with CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

348 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

349 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

350 
# GCC Compiler optimization flag 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

351 
gcc_OPT = O3 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

352 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

353 
# GCC PIC code generation. Use CC_PIC instead to select PIC code generation. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

354 
gcc_PIC = fPIC DPIC 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

355 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

356 
# Generic macro for PIC code generation. Use this macro instead of the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

357 
# compiler specific variant. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

358 
CC_PIC = $($(COMPILER)_PIC) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

359 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

360 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

361 
# Default GNU C compiler flags. Add the required feature to your Makefile 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

362 
# with CFLAGS += $(FEATURE_MACRO) and add to the component build with 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

363 
# CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. In most cases, it 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

364 
# should not be necessary to add CFLAGS to any environment other than the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

365 
# configure environment. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

366 
CFLAGS.gcc += $(gcc_OPT) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

367 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

368 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

369 
# Build 32 or 64 bit objects. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

370 
CFLAGS += $(CC_BITS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

371 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

372 
# Add compiler specific 'default' features 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

373 
CFLAGS += $(CFLAGS.$(COMPILER)) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

374 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

375 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

376 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

377 
# Solaris linker flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

378 
# feature to your Makefile with LDFLAGS += $(FEATURE_MACRO) and add to the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

379 
# component build with CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" or similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

380 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

381 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

382 
# Reduce the symbol table size, effectively conflicting with g. We should 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

383 
# get linker guidance here. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

384 
LD_Z_REDLOCSYM = z redlocsym 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

385 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

386 
# Cause the linker to rescan archive libraries and resolve remaining unresolved 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

387 
# symbols recursively until all symbols are resolved. Components should be 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

388 
# linking in the libraries they need, in the required order. This should 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

389 
# only be required if the component's native build is horribly broken. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

390 
LD_Z_RESCAN_NOW = z rescannow 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

391 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

392 
LD_Z_TEXT = z direct 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

393 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

394 
# make sure all symbols are defined. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

395 
LD_Z_DEFS = z defs 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

396 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

397 
# use direct binding 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

398 
LD_B_DIRECT = Bdirect 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

399 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

400 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

401 
# More Solaris linker flags that we want to be sure that everyone gets. This 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

402 
# is automatically added to the calling environment during the 'build' and 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

403 
# 'install' phases of the component build. Each individual feature can be 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

404 
# turned off by adding FEATURE_MACRO= to the component Makefile. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

405 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

406 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

407 
# Create a nonexecutable stack when linking. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

408 
LD_MAP_NOEXSTK = M /usr/lib/ld/map.noexstk 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

409 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

410 
# Create a nonexecutable bss segment when linking. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

411 
LD_MAP_NOEXBSS = M /usr/lib/ld/map.noexbss 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

412 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

413 
# Create a nonexecutable data segment when linking. Due to PLT needs, the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

414 
# data segment must be executable on sparc, but the bss does not. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

415 
# see mapfile comments for more information 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

416 
LD_MAP_NOEXDATA.i386 = M /usr/lib/ld/map.noexdata 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

417 
LD_MAP_NOEXDATA.sparc = $(LD_MAP_NOEXBSS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

418 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

419 
# Page alignment 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

420 
LD_MAP_PAGEALIGN = M /usr/lib/ld/map.pagealign 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

421 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

422 
# Linker options to add when only building libraries 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

423 
LD_OPTIONS_SO += $(LD_Z_TEXT) $(LD_Z_DEFS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

424 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

425 
# Default linker options that everyone should get. Do not add additional 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

426 
# libraries to this macro, as it will apply to everything linked during the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

427 
# component build. 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

428 
LD_OPTIONS += $(LD_MAP_NOEXSTK) $(LD_MAP_NOEXDATA.$(MACH)) \ 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

429 
$(LD_MAP_PAGEALIGN) $(LD_B_DIRECT) 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

430 

62
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

431 
# Environment variables and arguments passed into the build and install 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

432 
# environment(s). These are the initial settings. 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

433 
COMPONENT_BUILD_ENV= \ 
82
2f155565730b
7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
80
diff
changeset

434 
LD_OPTIONS="$(LD_OPTIONS)" 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

435 
COMPONENT_INSTALL_ENV= \ 
82
2f155565730b
7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
80
diff
changeset

436 
LD_OPTIONS="$(LD_OPTIONS)" 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

437 

a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

438 
# Add any bitspecific settings 
62
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

439 
COMPONENT_BUILD_ENV += $(COMPONENT_BUILD_ENV.$(BITS)) 
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

440 
COMPONENT_BUILD_ARGS += $(COMPONENT_BUILD_ARGS.$(BITS)) 
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

441 
COMPONENT_INSTALL_ENV += $(COMPONENT_INSTALL_ENV.$(BITS)) 
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

442 
COMPONENT_INSTALL_ARGS += $(COMPONENT_INSTALL_ARGS.$(BITS)) 