16 # fields enclosed by brackets "[]" replaced with your own identifying |
16 # fields enclosed by brackets "[]" replaced with your own identifying |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
21 # Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. |
21 # Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. |
22 # |
22 # |
23 |
23 |
24 PATH=/usr/bin:/usr/gnu/bin |
24 PATH=/usr/bin:/usr/gnu/bin |
25 |
25 |
26 # The location of an internal mirror of community source archives that we build |
26 # The location of an internal mirror of community source archives that we build |
39 # mirror before we hammer on the community source archive repositories. |
39 # mirror before we hammer on the community source archive repositories. |
40 export DOWNLOAD_SEARCH_PATH += $(INTERNAL_ARCHIVE_MIRROR) |
40 export DOWNLOAD_SEARCH_PATH += $(INTERNAL_ARCHIVE_MIRROR) |
41 export DOWNLOAD_SEARCH_PATH += $(EXTERNAL_ARCHIVE_MIRROR) |
41 export DOWNLOAD_SEARCH_PATH += $(EXTERNAL_ARCHIVE_MIRROR) |
42 |
42 |
43 # The workspace starts at the mercurial root |
43 # The workspace starts at the mercurial root |
44 export WS_TOP ?= $(shell hg root) |
44 ifeq ($(origin WS_TOP), undefined) |
|
45 export WS_TOP := $(shell hg root) |
|
46 endif |
45 |
47 |
46 WS_LOGS = $(WS_TOP)/$(MACH)/logs |
48 WS_LOGS = $(WS_TOP)/$(MACH)/logs |
47 WS_REPO = $(WS_TOP)/$(MACH)/repo |
49 WS_REPO = $(WS_TOP)/$(MACH)/repo |
48 WS_TOOLS = $(WS_TOP)/tools |
50 WS_TOOLS = $(WS_TOP)/tools |
49 WS_MAKE_RULES = $(WS_TOP)/make-rules |
51 WS_MAKE_RULES = $(WS_TOP)/make-rules |
69 PUBLISHER ?= $(CONSOLIDATION) |
71 PUBLISHER ?= $(CONSOLIDATION) |
70 PUBLISHER_LOCALIZABLE ?= $(CONSOLIDATION)-localizable |
72 PUBLISHER_LOCALIZABLE ?= $(CONSOLIDATION)-localizable |
71 |
73 |
72 ROOT = / |
74 ROOT = / |
73 |
75 |
74 OS_VERSION = $(shell uname -r) |
76 OS_VERSION := $(shell uname -r) |
75 SOLARIS_VERSION = $(OS_VERSION:5.%=2.%) |
77 SOLARIS_VERSION = $(OS_VERSION:5.%=2.%) |
76 |
78 |
77 include $(WS_MAKE_RULES)/ips-buildinfo.mk |
79 include $(WS_MAKE_RULES)/ips-buildinfo.mk |
78 |
80 |
79 COMPILER = studio |
81 COMPILER = studio |
89 |
91 |
90 PKG_REPO = file:$(WS_REPO) |
92 PKG_REPO = file:$(WS_REPO) |
91 |
93 |
92 COMPONENT_SRC_NAME = $(COMPONENT_NAME) |
94 COMPONENT_SRC_NAME = $(COMPONENT_NAME) |
93 |
95 |
94 COMPONENT_DIR = $(shell pwd) |
96 COMPONENT_DIR := $(shell pwd) |
95 SOURCE_DIR = $(COMPONENT_DIR)/$(COMPONENT_SRC) |
97 SOURCE_DIR = $(COMPONENT_DIR)/$(COMPONENT_SRC) |
96 BUILD_DIR = $(COMPONENT_DIR)/build |
98 BUILD_DIR = $(COMPONENT_DIR)/build |
97 PROTO_DIR = $(BUILD_DIR)/prototype/$(MACH) |
99 PROTO_DIR = $(BUILD_DIR)/prototype/$(MACH) |
98 |
100 |
99 ETCDIR = /etc |
101 ETCDIR = /etc |
170 CONSTANT_TIME = LD_PRELOAD_32=$(WS_TOOLS)/time-$(MACH32).so |
172 CONSTANT_TIME = LD_PRELOAD_32=$(WS_TOOLS)/time-$(MACH32).so |
171 CONSTANT_TIME += LD_PRELOAD_64=$(WS_TOOLS)/time-$(MACH64).so |
173 CONSTANT_TIME += LD_PRELOAD_64=$(WS_TOOLS)/time-$(MACH64).so |
172 CONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT) |
174 CONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT) |
173 |
175 |
174 # set MACH from uname -p to either sparc or i386 |
176 # set MACH from uname -p to either sparc or i386 |
175 MACH = $(shell uname -p) |
177 MACH := $(shell uname -p) |
176 |
178 |
177 # set MACH32 from MACH to either sparcv7 or i86 |
179 # set MACH32 from MACH to either sparcv7 or i86 |
178 MACH32_1 = $(MACH:sparc=sparcv7) |
180 MACH32_1 = $(MACH:sparc=sparcv7) |
179 MACH32 = $(MACH32_1:i386=i86) |
181 MACH32 = $(MACH32_1:i386=i86) |
180 |
182 |
305 PERL.5.8.4 = /usr/perl5/5.8.4/bin/perl |
307 PERL.5.8.4 = /usr/perl5/5.8.4/bin/perl |
306 PERL.5.12 = /usr/perl5/5.12/bin/perl |
308 PERL.5.12 = /usr/perl5/5.12/bin/perl |
307 |
309 |
308 PERL = $(PERL.$(PERL_VERSION)) |
310 PERL = $(PERL.$(PERL_VERSION)) |
309 |
311 |
310 PERL_ARCH = $(shell $(PERL) -e 'use Config; print $$Config{archname}') |
312 PERL_ARCH := $(shell $(PERL) -e 'use Config; print $$Config{archname}') |
311 # Optimally we should ask perl which C compiler was used but it doesn't |
313 # Optimally we should ask perl which C compiler was used but it doesn't |
312 # result in a full path name. Only "c" is being recorded |
314 # result in a full path name. Only "c" is being recorded |
313 # inside perl builds while we actually need a full path to |
315 # inside perl builds while we actually need a full path to |
314 # the studio compiler. |
316 # the studio compiler. |
315 #PERL_CC = $(shell $(PERL) -e 'use Config; print $$Config{cc}') |
317 #PERL_CC := $(shell $(PERL) -e 'use Config; print $$Config{cc}') |
316 PERL_OPTIMIZE = $(shell $(PERL) -e 'use Config; print $$Config{optimize}') |
318 PERL_OPTIMIZE := $(shell $(PERL) -e 'use Config; print $$Config{optimize}') |
317 |
319 |
318 PKG_MACROS += PERL_ARCH=$(PERL_ARCH) |
320 PKG_MACROS += PERL_ARCH=$(PERL_ARCH) |
319 PKG_MACROS += PERL_VERSION=$(PERL_VERSION) |
321 PKG_MACROS += PERL_VERSION=$(PERL_VERSION) |
320 |
322 |
321 CCSMAKE = /usr/ccs/bin/make |
323 CCSMAKE = /usr/ccs/bin/make |
367 # What other side-effects are there? |
369 # What other side-effects are there? |
368 CPP_C99_EXTENDED_MATH = -D_STDC_99 |
370 CPP_C99_EXTENDED_MATH = -D_STDC_99 |
369 |
371 |
370 # Enables large file support for components that have no other means of doing |
372 # Enables large file support for components that have no other means of doing |
371 # so. Use CPP_LARGEFILES and not the .32/.64 variety directly |
373 # so. Use CPP_LARGEFILES and not the .32/.64 variety directly |
372 CPP_LARGEFILES.32 = $(shell getconf LFS_CFLAGS) |
374 CPP_LARGEFILES.32 := $(shell getconf LFS_CFLAGS) |
373 CPP_LARGEFILES.64 = $(shell getconf LFS64_CFLAGS) |
375 CPP_LARGEFILES.64 := $(shell getconf LFS64_CFLAGS) |
374 CPP_LARGEFILES = $(CPP_LARGEFILES.$(BITS)) |
376 CPP_LARGEFILES = $(CPP_LARGEFILES.$(BITS)) |
375 |
377 |
376 # Enables some #pragma redefine_extname to POSIX-compliant Standard C Library |
378 # Enables some #pragma redefine_extname to POSIX-compliant Standard C Library |
377 # functions. Also avoids the component's #define _POSIX_C_SOURCE to some value |
379 # functions. Also avoids the component's #define _POSIX_C_SOURCE to some value |
378 # we currently do not support. |
380 # we currently do not support. |