Add x11-xkb-utilities meta-package
[unleashed-userland.git] / make-rules / shared-macros.mk
blobe95f38f9c003684ca56b75ce99cd030d5ad46a42
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
21 # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
24 PATH=/usr/bin:/usr/gnu/bin
26 # The location of an internal mirror of community source archives that we build
27 # in this gate. This mirror has been seeded to include "custom" source archives
28 # for a few components where the communities either no longer provide matching
29 # source archives or we have changes that aren't reflected in their archives or
30 # anywhere else.
31 #INTERNAL_ARCHIVE_MIRROR = http://userland.us.oracle.com/source-archives
33 # The location of an external mirror of community source archives that we build
34 # in this gate. The external mirror is a replica of the internal mirror.
35 #EXTERNAL_ARCHIVE_MIRROR = \
36 # http://static.opensolaris.org/action/browse/userland/tarball/userland
38 # Default to looking for source archives on the internal mirror and the external
39 # mirror before we hammer on the community source archive repositories.
40 #export DOWNLOAD_SEARCH_PATH += $(INTERNAL_ARCHIVE_MIRROR)
41 #export DOWNLOAD_SEARCH_PATH += $(EXTERNAL_ARCHIVE_MIRROR)
43 # The workspace starts at the mercurial root
44 ifeq ($(origin WS_TOP), undefined)
45 export WS_TOP := \
46 $(shell hg root 2>/dev/null || git rev-parse --show-toplevel)
47 endif
49 USERLAND_ARCHIVES ?= $(WS_TOP)/archives/
50 WS_MACH = $(WS_TOP)/$(MACH)
51 WS_LOGS = $(WS_MACH)/logs
52 WS_REPO = $(WS_MACH)/repo
53 WS_TOOLS = $(WS_TOP)/tools
54 WS_MAKE_RULES = $(WS_TOP)/make-rules
55 WS_COMPONENTS = $(WS_TOP)/components
56 WS_LICENSES = $(WS_TOP)/licenses
57 WS_INCORPORATIONS = $(WS_TOP)/incorporations
58 WS_LINT_CACHE = $(WS_MACH)/pkglint-cache
60 # we want our pkg piplines to fail if there is an error
61 # (like if pkgdepend fails in the middle of a pipe), but
62 # we don't want the builds or ./configure's failing as well.
63 # so we only set pipefail for the publish target and have
64 # to reset it for the others since they might be invoked
65 # as dependencies of publish.
66 export SHELLOPTS
67 build: SHELLOPTS=
68 test: SHELLOPTS=
69 install: SHELLOPTS=
70 publish: SHELLOPTS=pipefail
72 SHELL= /bin/bash
74 # This can be overridden to avoid rebuilding when you touch a Makefile
75 MAKEFILE_PREREQ = Makefile
77 CONSOLIDATION = userland
78 PUBLISHER ?= $(CONSOLIDATION)
79 PUBLISHER_LOCALIZABLE ?= $(CONSOLIDATION)-localizable
81 ROOT = /
83 # Native OS version
84 OS_VERSION := $(shell uname -r)
85 SOLARIS_VERSION = $(OS_VERSION:5.%=2.%)
86 # Target OS version
87 PKG_SOLARIS_VERSION ?= 5.11
89 include $(WS_MAKE_RULES)/ips-buildinfo.mk
91 COMPILER = gcc
92 LINKER = gcc
93 BITS = 32
94 PYTHON_VERSION = 2.6
95 PYTHON_VERSIONS = 2.6 2.7
97 BASS_O_MATIC = $(WS_TOOLS)/bass-o-matic
99 CLONEY = $(WS_TOOLS)/cloney
101 CONFIG_SHELL = /bin/bash
103 PKG_REPO = file:$(WS_REPO)
105 COMPONENT_SRC_NAME = $(COMPONENT_NAME)
107 COMPONENT_DIR := $(shell pwd)
108 SOURCE_DIR = $(COMPONENT_DIR)/$(COMPONENT_SRC)
109 BUILD_DIR = $(COMPONENT_DIR)/build
110 PROTO_DIR = $(BUILD_DIR)/prototype/$(MACH)
112 ARCHLIBSUBDIR32 =
113 ARCHLIBSUBDIR64 = $(MACH64)
114 ARCHLIBSUBDIR = $(ARCHLIBSUBDIR$(BITS))
116 ETCDIR = /etc
117 USRDIR = /usr
118 BINDIR = /bin
119 SBINDIR = /sbin
120 LIBDIR = /lib
121 VARDIR = /var
122 KERNELDRVDIR = /kernel/drv
123 KERNELDRVDIR64 =/kernel/drv/$(MACH64)
124 USRBINDIR = $(USRDIR)/bin
125 USRBINDIR32 = $(USRDIR)/bin/$(MACH32)
126 USRBINDIR64 = $(USRDIR)/bin/$(MACH64)
127 USRSBINDIR = $(USRDIR)/sbin
128 USRSBINDIR32 = $(USRDIR)/sbin/$(MACH32)
129 USRSBINDIR64 = $(USRDIR)/sbin/$(MACH64)
130 USRLIBDIR = $(USRDIR)/lib
131 USRLIBDIR64 = $(USRDIR)/lib/$(MACH64)
132 USRSHAREDIR = $(USRDIR)/share
133 USRINCDIR = $(USRDIR)/include
134 USRSHARELOCALEDIR = $(USRSHAREDIR)/locale
135 USRSHAREMANDIR = $(USRSHAREDIR)/man
136 USRSHAREDOCDIR = $(USRSHAREDIR)/doc
137 USRSHARELIBDIR = $(USRSHAREDIR)/lib
138 USRSHAREMAN1DIR = $(USRSHAREMANDIR)/man1
139 USRSHAREMAN1MDIR = $(USRSHAREMANDIR)/man1m
140 USRSHAREMAN3DIR = $(USRSHAREMANDIR)/man3
141 USRSHAREMAN4DIR = $(USRSHAREMANDIR)/man4
142 USRSHAREMAN5DIR = $(USRSHAREMANDIR)/man5
143 USRKERNELDRVDIR = $(USRDIR)/kernel/drv
144 USRKERNELDRVDIR64 = $(USRDIR)/kernel/drv/$(MACH64)
146 PROTOETCDIR = $(PROTO_DIR)/$(ETCDIR)
147 PROTOETCSECDIR = $(PROTO_DIR)/$(ETCDIR)/security
148 PROTOUSRDIR = $(PROTO_DIR)/$(USRDIR)
149 PROTOBINDIR = $(PROTO_DIR)/$(BINDIR)
150 PROTOSBINDIR = $(PROTO_DIR)/$(SBINDIR)
151 PROTOLIBDIR = $(PROTO_DIR)/$(LIBDIR)
152 PROTOVARDIR = $(PROTO_DIR)/$(VARDIR)
153 PROTOKERNELDRVDIR = $(PROTO_DIR)/$(KERNELDRVDIR)
154 PROTOKERNELDRVDIR64 = $(PROTO_DIR)/$(KERNELDRVDIR64)
155 PROTOUSRBINDIR = $(PROTO_DIR)/$(USRBINDIR)
156 PROTOUSRBINDIR32 = $(PROTO_DIR)/$(USRBINDIR32)
157 PROTOUSRBINDIR64 = $(PROTO_DIR)/$(USRBINDIR64)
158 PROTOUSRSBINDIR = $(PROTO_DIR)/$(USRSBINDIR)
159 PROTOUSRSBINDIR32 = $(PROTO_DIR)/$(USRSBINDIR32)
160 PROTOUSRSBINDIR64 = $(PROTO_DIR)/$(USRSBINDIR64)
161 PROTOUSRLIBDIR = $(PROTO_DIR)/$(USRLIBDIR)
162 PROTOUSRLIBDIR64 = $(PROTO_DIR)/$(USRLIBDIR64)
163 PROTOUSRINCDIR = $(PROTO_DIR)/$(USRINCDIR)
164 PROTOUSRSHAREDIR = $(PROTO_DIR)/$(USRSHAREDIR)
165 PROTOUSRSHARELIBDIR = $(PROTO_DIR)/$(USRSHARELIBDIR)
166 PROTOUSRSHAREMANDIR = $(PROTO_DIR)/$(USRSHAREMANDIR)
167 PROTOUSRSHAREDOCDIR = $(PROTO_DIR)/$(USRSHAREDOCDIR)
168 PROTOUSRSHAREMAN1DIR = $(PROTO_DIR)/$(USRSHAREMAN1DIR)
169 PROTOUSRSHAREMAN1MDIR = $(PROTO_DIR)/$(USRSHAREMAN1MDIR)
170 PROTOUSRSHAREMAN3DIR = $(PROTO_DIR)/$(USRSHAREMAN3DIR)
171 PROTOUSRSHAREMAN4DIR = $(PROTO_DIR)/$(USRSHAREMAN4DIR)
172 PROTOUSRSHAREMAN5DIR = $(PROTO_DIR)/$(USRSHAREMAN5DIR)
173 PROTOUSRSHARELOCALEDIR = $(PROTO_DIR)/$(USRSHARELOCALEDIR)
174 PROTOUSRKERNELDRVDIR = $(PROTO_DIR)/$(USRKERNELDRVDIR)
175 PROTOUSRKERNELDRVDIR64 = $(PROTO_DIR)/$(USRKERNELDRVDIR64)
178 SFWBIN = /usr/sfw/bin
179 SFWINCLUDE = /usr/sfw/include
180 SFWLIB = /usr/sfw/lib
181 SFWLIB64 = /usr/sfw/lib/$(MACH64)
182 SFWSHARE = /usr/sfw/share
183 SFWSHAREMAN = /usr/sfw/share/man
184 SFWSHAREMAN1 = /usr/sfw/share/man/man1
185 PROTOSFWBIN = $(PROTO_DIR)/$(SFWBIN)
186 PROTOSFWLIB = $(PROTO_DIR)/$(SFWLIB)
187 PROTOSFWLIB64 = $(PROTO_DIR)/$(SFWLIB64)
188 PROTOSFWSHARE = $(PROTO_DIR)/$(SFWSHARE)
189 PROTOSFWSHAREMAN = $(PROTO_DIR)/$(SFWSHAREMAN)
190 PROTOSFWSHAREMAN1 = $(PROTO_DIR)/$(SFWSHAREMAN1)
191 PROTOSFWINCLUDE = $(PROTO_DIR)/$(SFWINCLUDE)
193 CLDIR = /usr/share/common-lisp
194 PROTOCLDIR = $(PROTO_DIR)/$(CLDIR)
196 GNUBIN = /usr/gnu/bin
197 GNULIB = /usr/gnu/lib
198 GNULIB64 = /usr/gnu/lib/$(MACH64)
199 GNUSHARE = /usr/gnu/share
200 GNUSHAREMAN = /usr/gnu/share/man
201 GNUSHAREMAN1 = /usr/gnu/share/man/man1
202 PROTOGNUBIN = $(PROTO_DIR)/$(GNUBIN)
203 PROTOGNUSHARE = $(PROTO_DIR)/$(GNUSHARE)
204 PROTOGNUSHAREMAN = $(PROTO_DIR)/$(GNUSHAREMAN)
205 PROTOGNUSHAREMAN1 = $(PROTO_DIR)/$(GNUSHAREMAN1)
207 # work around _TIME, _DATE, embedded date chatter in component builds
208 # to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME)
209 # to the appropriate {CONFIGURE|BUILD|INSTALL}_ENV
210 CONSTANT_TIME = LD_PRELOAD_32=$(WS_TOOLS)/time-$(MACH32).so
211 CONSTANT_TIME += LD_PRELOAD_64=$(WS_TOOLS)/time-$(MACH64).so
212 CONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT)
214 # set MACH from uname -p to either sparc or i386
215 MACH := $(shell uname -p)
217 # set MACH32 from MACH to either sparcv7 or i86
218 MACH32_1 = $(MACH:sparc=sparcv7)
219 MACH32 = $(MACH32_1:i386=i86)
221 # set MACH64 from MACH to either sparcv9 or amd64
222 MACH64_1 = $(MACH:sparc=sparcv9)
223 MACH64 = $(MACH64_1:i386=amd64)
225 CONFIGURE_32 = $(BUILD_DIR_32)/.configured
226 CONFIGURE_64 = $(BUILD_DIR_64)/.configured
228 BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32)
229 BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64)
231 BUILD_32 = $(BUILD_DIR_32)/.built
232 BUILD_64 = $(BUILD_DIR_64)/.built
233 BUILD_32_and_64 = $(BUILD_32) $(BUILD_64)
234 $(BUILD_DIR_32)/.built: BITS=32
235 $(BUILD_DIR_64)/.built: BITS=64
237 INSTALL_32 = $(BUILD_DIR_32)/.installed
238 INSTALL_64 = $(BUILD_DIR_64)/.installed
239 INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64)
240 $(BUILD_DIR_32)/.installed: BITS=32
241 $(BUILD_DIR_64)/.installed: BITS=64
243 # set the default target for installation of the component
244 COMPONENT_INSTALL_TARGETS = install
246 # set the default test results directory
247 COMPONENT_TEST_RESULTS_DIR = $(COMPONENT_DIR)/test
249 # set the default master test results file
250 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(BITS).master
252 # set the default test results output file
253 COMPONENT_TEST_OUTPUT = $(COMPONENT_TEST_RESULTS_DIR)/test-$(BITS)-results
255 # set the default test results comparison diffs file
256 COMPONENT_TEST_DIFFS = $(COMPONENT_TEST_RESULTS_DIR)/test-$(BITS)-diffs
258 # set the default test snapshot file
259 COMPONENT_TEST_SNAPSHOT = $(COMPONENT_TEST_RESULTS_DIR)/results-$(BITS).snapshot
261 # The set of default transforms to be applied to the test results to try
262 # to normalize them.
263 COMPONENT_TEST_TRANSFORMS = \
264 '-e "s|$(@D)|\\$$(@D)|g" ' \
265 '-e "s|$(PERL)|\\$$(PERL)|g" ' \
266 '-e "s|$(SOURCE_DIR)|\\$$(SOURCE_DIR)|g" '
268 # set the default commands used to generate the file containing the set
269 # of transforms to be applied to the test results to try to normalize them.
270 COMPONENT_TEST_CREATE_TRANSFORMS = \
271 if [ -e $(COMPONENT_TEST_MASTER) ]; \
272 then \
273 print "\#!/bin/sh" > $(COMPONENT_TEST_TRANSFORM_CMD); \
274 print '$(GSED) ' \
275 $(COMPONENT_TEST_TRANSFORMS) \
276 ' \\' >> $(COMPONENT_TEST_TRANSFORM_CMD); \
277 print '$(COMPONENT_TEST_OUTPUT) \\' \
278 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
279 print '> $(COMPONENT_TEST_SNAPSHOT)' \
280 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
283 # set the default command for performing any test result munging
284 COMPONENT_TEST_TRANSFORM_CMD = $(COMPONENT_TEST_RESULTS_DIR)/transform-$(BITS)-results
286 # set the default operation to run to perform test result normalization
287 COMPONENT_TEST_PERFORM_TRANSFORM = \
288 if [ -e $(COMPONENT_TEST_MASTER) ]; \
289 then \
290 $(SHELL) $(COMPONENT_TEST_TRANSFORM_CMD); \
293 # set the default command used to compare the master results with the snapshot
294 COMPONENT_TEST_COMPARE_CMD = $(GDIFF) -uN
296 # set the default way that master and snapshot test results are compared
297 COMPONENT_TEST_COMPARE = \
298 if [ -e $(COMPONENT_TEST_MASTER) ]; \
299 then \
300 $(COMPONENT_TEST_COMPARE_CMD) \
301 $(COMPONENT_TEST_MASTER) $(COMPONENT_TEST_SNAPSHOT) \
302 > $(COMPONENT_TEST_DIFFS); \
303 print "Test results in $(COMPONENT_TEST_OUTPUT)"; \
304 if [ -s $(COMPONENT_TEST_DIFFS) ]; \
305 then \
306 print "Differences found."; \
307 $(CAT) $(COMPONENT_TEST_DIFFS); \
308 exit 2; \
309 else \
310 print "No differences found."; \
311 fi \
314 # set the default env command to use for test of the component
315 COMPONENT_TEST_ENV_CMD = $(ENV)
317 # set the default command to use for test of the component
318 COMPONENT_TEST_CMD = $(GMAKE)
320 # set the default target for test of the component
321 COMPONENT_TEST_TARGETS = check
323 # set the default directory for test of the component
324 COMPONENT_TEST_DIR = $(@D)
326 # determine the type of tests we want to run.
327 ifeq ($(strip $(wildcard $(COMPONENT_TEST_RESULTS_DIR)/results-*.master)),)
328 TEST_32 = $(BUILD_DIR_32)/.tested
329 TEST_64 = $(BUILD_DIR_64)/.tested
330 else
331 TEST_32 = $(BUILD_DIR_32)/.tested-and-compared
332 TEST_64 = $(BUILD_DIR_64)/.tested-and-compared
333 endif
334 TEST_32_and_64 = $(TEST_32) $(TEST_64)
335 $(BUILD_DIR_32)/.tested: BITS=32
336 $(BUILD_DIR_64)/.tested: BITS=64
337 $(BUILD_DIR_32)/.tested-and-compared: BITS=32
338 $(BUILD_DIR_64)/.tested-and-compared: BITS=64
340 # BUILD_TOOLS is the root of all tools not normally installed on the system.
341 BUILD_TOOLS ?= /opt
343 SPRO_ROOT = $(BUILD_TOOLS)/sunstudio12.1
344 SPRO_VROOT = $(SPRO_ROOT)
346 PARFAIT_ROOT = $(BUILD_TOOLS)/parfait/parfait-tools-1.0.1/
347 PARFAIT= $(PARFAIT_ROOT)/bin/parfait
348 export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc
349 export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC
350 export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc
351 export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++
354 # The CCACHE makefile variable should evaluate to empty string or a pathname
355 # like /usr/bin/ccache depending on your PATH value and "which" implementation.
356 # The assignment via ":=" is important, to only do this once in a Makefile,
357 # and not on every reference to the value as "=" assignment would result in.
358 # Review `man ccache` for optional configuration tuning, like cache size etc.
360 # For production builds or suspected errors you can disable this feature by
361 # setting ENABLE_CCACHE=false (as makefile or environment variable, which
362 # is currently the default) to not even define the usage of wrapper in the
363 # userland-building makefile system.
364 # If you want to speed up your re-builds, you must set ENABLE_CCACHE=true.
365 # For legacy reasons, the CCACHE_DISABLE and CCACHE_NODISABLE variables (from
366 # configuration of the "ccache" program itself) are also supported, but direct
367 # use is discouraged, since their syntax and usage are counter-intuitive.
369 # Still, absence of ccache in PATH is not considered a fatal error since the
370 # build would just proceed well with original compiler.
371 # Note: In code below we fast-track if the makefile CCACHE variable is defined
372 # but fall back to shell executability tests if just envvar CCACHE is passed.
374 export CCACHE := $(shell \
375 if test -n "$(CCACHE)" ; then \
376 echo "$(CCACHE)"; \
377 else \
378 if test x"$${CCACHE_DISABLE-}" != x -o x"$(CCACHE_DISABLE)" != x \
379 -o x"$${ENABLE_CCACHE-}" = xfalse -o x"$(ENABLE_CCACHE)" = xfalse \
380 ; then \
381 echo "NOT USING CCACHE FOR OI-USERLAND because explicitly disabled" >&2 ; \
382 else \
383 if test x"$${CCACHE_NODISABLE-}" != x -o x"$(CCACHE_NODISABLE)" != x \
384 -o x"$${ENABLE_CCACHE-}" = xtrue -o x"$(ENABLE_CCACHE)" = xtrue \
385 ; then \
386 for F in \
387 "$$CCACHE" \
388 `which ccache 2>/dev/null | egrep '^/'` \
389 /usr/bin/ccache \
390 ; do if test -n "$$F" && test -x "$$F" ; then \
391 echo "$$F" ; \
392 echo "USING CCACHE FOR OI-USERLAND: $$F" >&2 ; \
393 if test x"$${CCACHE_DISABLE-}" != x ; then \
394 echo "WARNING: envvar CCACHE_DISABLE is set, so effectively ccache will not act!" >&2 ; \
395 fi; \
396 exit 0; \
397 fi; \
398 done; \
399 echo "NOT USING CCACHE FOR OI-USERLAND because not found" >&2 ; \
400 fi; \
401 fi; \
404 GCC_ROOT = /usr/gcc/4.9
406 CC.studio.32 = $(SPRO_VROOT)/bin/cc
407 CXX.studio.32 = $(SPRO_VROOT)/bin/CC
408 F77.studio.32 = $(SPRO_VROOT)/bin/f77
409 FC.studio.32 = $(SPRO_VROOT)/bin/f90
411 CC.studio.64 = $(SPRO_VROOT)/bin/cc
412 CXX.studio.64 = $(SPRO_VROOT)/bin/CC
413 F77.studio.64 = $(SPRO_VROOT)/bin/f77
414 FC.studio.64 = $(SPRO_VROOT)/bin/f90
416 CC.gcc.32 = $(GCC_ROOT)/bin/gcc
417 CXX.gcc.32 = $(GCC_ROOT)/bin/g++
418 F77.gcc.32 = $(GCC_ROOT)/bin/gfortran
419 FC.gcc.32 = $(GCC_ROOT)/bin/gfortran
421 CC.gcc.64 = $(GCC_ROOT)/bin/gcc
422 CXX.gcc.64 = $(GCC_ROOT)/bin/g++
423 F77.gcc.64 = $(GCC_ROOT)/bin/gfortran
424 FC.gcc.64 = $(GCC_ROOT)/bin/gfortran
426 ifneq ($(strip $(CCACHE)),)
428 CCACHE_WRAP_ROOT = $(WS_TOOLS)/ccache-wrap
429 export CC_gcc_32 := $(CC.gcc.32)
430 export CC_gcc_64 := $(CC.gcc.64)
431 export CXX_gcc_32 := $(CXX.gcc.32)
432 export CXX_gcc_64 := $(CXX.gcc.64)
433 CC.gcc.32 := $(CCACHE_WRAP_ROOT)/CC.gcc.32
434 CC.gcc.64 := $(CCACHE_WRAP_ROOT)/CC.gcc.64
435 CXX.gcc.32 := $(CCACHE_WRAP_ROOT)/CXX.gcc.32
436 CXX.gcc.64 := $(CCACHE_WRAP_ROOT)/CXX.gcc.64
438 ifneq ($(strip $(CCACHE_DIR)),)
439 export CCACHE_DIR := $(CCACHE_DIR)
440 endif
442 ifneq ($(strip $(CCACHE_LOGFILE)),)
443 export CCACHE_LOGFILE := $(CCACHE_LOGFILE)
444 endif
446 endif
448 lint.32 = $(SPRO_VROOT)/bin/lint -m32
449 lint.64 = $(SPRO_VROOT)/bin/lint -m64
451 LINT = $(lint.$(BITS))
453 LD = /usr/bin/ld
455 PYTHON.2.6.VENDOR_PACKAGES.32 = /usr/lib/python2.6/vendor-packages
456 PYTHON.2.6.VENDOR_PACKAGES.64 = /usr/lib/python2.6/vendor-packages/64
457 PYTHON.2.6.VENDOR_PACKAGES = $(PYTHON.2.6.VENDOR_PACKAGES.$(BITS))
459 PYTHON.2.7.VENDOR_PACKAGES.32 = /usr/lib/python2.7/vendor-packages
460 PYTHON.2.7.VENDOR_PACKAGES.64 = /usr/lib/python2.7/vendor-packages/64
461 PYTHON.2.7.VENDOR_PACKAGES = $(PYTHON.2.7.VENDOR_PACKAGES.$(BITS))
463 ifeq ($(strip $(PARFAIT_BUILD)),yes)
464 CC.studio.32 = $(WS_TOOLS)/parfait/cc
465 CXX.studio.32 = $(WS_TOOLS)/parfait/CC
466 CC.studio.64 = $(WS_TOOLS)/parfait/cc
467 CXX.studio.64 = $(WS_TOOLS)/parfait/CC
468 CC.gcc.32 = $(WS_TOOLS)/parfait/gcc
469 CXX.gcc.32 = $(WS_TOOLS)/parfait/g++
470 CC.gcc.64 = $(WS_TOOLS)/parfait/gcc
471 CXX.gcc.64 = $(WS_TOOLS)/parfait/g++
472 LD = $(WS_TOOLS)/parfait/ld
473 endif
475 CC = $(CC.$(COMPILER).$(BITS))
476 CXX = $(CXX.$(COMPILER).$(BITS))
477 F77 = $(F77.$(COMPILER).$(BITS))
478 FC = $(FC.$(COMPILER).$(BITS))
480 RUBY_VERSION = 1.9
481 RUBY_LIB_VERSION = 1.9.1
482 RUBY.1.9 = /usr/ruby/1.9/bin/ruby
483 RUBY = $(RUBY.$(RUBY_VERSION))
484 # Use the ruby lib versions to represent the RUBY_VERSIONS that
485 # need to get built. This is done because during package transformations
486 # both the ruby version and the ruby library version are needed.
487 RUBY_VERSIONS = $(RUBY_LIB_VERSION)
489 PYTHON_VENDOR_PACKAGES.32 = /usr/lib/python$(PYTHON_VERSION)/vendor-packages
490 PYTHON_VENDOR_PACKAGES.64 = /usr/lib/python$(PYTHON_VERSION)/vendor-packages/64
491 PYTHON_VENDOR_PACKAGES = $(PYTHON_VENDOR_PACKAGES.$(BITS))
493 PYTHON.2.6.32 = /usr/bin/python2.6
494 PYTHON.2.6.64 = /usr/bin/$(MACH64)/python2.6
496 PYTHON.2.7.32 = /usr/bin/python2.7
497 PYTHON.2.7.64 = /usr/bin/$(MACH64)/python2.7
499 PYTHON.3.4.32 = /usr/bin/python3.4
500 PYTHON.3.4.64 = /usr/bin/$(MACH64)/python3.4
502 PYTHON.32 = $(PYTHON.$(PYTHON_VERSION).32)
503 PYTHON.64 = $(PYTHON.$(PYTHON_VERSION).64)
504 PYTHON = $(PYTHON.$(PYTHON_VERSION).$(BITS))
506 # The default is site-packages, but that directory belongs to the end-user.
507 # Modules which are shipped by the OS but not with the core Python distribution
508 # belong in vendor-packages.
509 PYTHON_LIB= /usr/lib/python$(PYTHON_VERSION)/vendor-packages
510 PYTHON_DATA= $(PYTHON_LIB)
512 JAVA7_HOME = /usr/jdk/instances/openjdk1.7.0
513 JAVA_HOME = $(JAVA7_HOME)
515 # This is the default BUILD version of perl
516 # Not necessarily the system's default version, i.e. /usr/bin/perl
517 PERL_VERSION = 5.22
519 PERL_VERSIONS = 5.16 5.22
521 PERL.5.16 = /usr/perl5/5.16/bin/perl
522 PERL.5.22 = /usr/perl5/5.22/bin/perl
524 POD2MAN.5.16 = /usr/perl5/5.16/bin/pod2man
525 POD2MAN.5.22 = /usr/perl5/5.22/bin/pod2man
527 PERL = $(PERL.$(PERL_VERSION))
528 POD2MAN = $(POD2MAN.$(PERL_VERSION))
530 PERL_ARCH := $(shell $(PERL) -e 'use Config; print $$Config{archname}')
531 PERL_ARCH_FUNC= $(shell $(1) -e 'use Config; print $$Config{archname}')
532 # Optimally we should ask perl which C compiler was used but it doesn't
533 # result in a full path name. Only "c" is being recorded
534 # inside perl builds while we actually need a full path to
535 # the studio compiler.
536 #PERL_CC := $(shell $(PERL) -e 'use Config; print $$Config{cc}')
538 PKG_MACROS += PERL_ARCH=$(PERL_ARCH)
539 PKG_MACROS += PERL_VERSION=$(PERL_VERSION)
541 PG_VERSION ?= 9.3
542 PG_VERNUM = $(subst .,,$(PG_VERSION))
543 PG_HOME = /usr/postgres/$(PG_VERSION)
544 PG_BINDIR.32 = $(PG_HOME)/bin
545 PG_BINDIR.64 = $(PG_HOME)/bin/$(MACH64)
546 PG_INCDIR = $(PG_HOME)/include
547 PG_MANDIR = $(PG_HOME)/man
548 PG_SHAREDIR = $(PG_HOME)/share
549 PG_DOCDIR = $(PG_HOME)/doc
550 PG_LIBDIR.32 = $(PG_HOME)/lib
551 PG_LIBDIR.64 = $(PG_HOME)/lib/$(MACH64)
552 PG_CONFIG.32 = $(PG_BINDIR.32)/pg_config
553 PG_CONFIG.64 = $(PG_BINDIR.64)/pg_config
555 PKG_MACROS += PG_VERSION=$(PG_VERSION)
556 PKG_MACROS += PG_VERNUM=$(PG_VERNUM)
558 # This is the default BUILD version of tcl
559 # Not necessarily the system's default version, i.e. /usr/bin/tclsh
560 TCL_VERSION = 8.5
561 TCLSH.8.5.i386.32 = /usr/bin/i86/tclsh8.5
562 TCLSH.8.5.i386.64 = /usr/bin/amd64/tclsh8.5
563 TCLSH.8.5.sparc.32 = /usr/bin/sparcv7/tclsh8.5
564 TCLSH.8.5.sparc.64 = /usr/bin/sparcv9/tclsh8.5
565 TCLSH = $(TCLSH.$(TCL_VERSION).$(MACH).$(BITS))
567 CCSMAKE = /usr/ccs/bin/make
568 GMAKE = /usr/gnu/bin/make
569 GPATCH = /usr/gnu/bin/patch
570 PATCH_LEVEL = 1
571 GPATCH_BACKUP = --backup --version-control=numbered
572 GPATCH_FLAGS = -p$(PATCH_LEVEL) $(GPATCH_BACKUP)
573 GSED = /usr/gnu/bin/sed
574 GDIFF = /usr/gnu/bin/diff
575 GSORT = /usr/gnu/bin/sort
577 PKGREPO = /usr/bin/pkgrepo
578 PKGSEND = /usr/bin/pkgsend
579 ifeq ($(strip $(PKGLINT_COMPONENT)),)
580 PKGLINT = /usr/bin/pkglint
581 else
582 PKGLINT = ${WS_TOOLS}/pkglint
583 endif
585 ACLOCAL = /usr/bin/aclocal-1.10
586 AUTOMAKE = /usr/bin/automake-1.10
587 AUTORECONF = /usr/bin/autoreconf
589 KSH93 = /usr/bin/ksh93
590 TOUCH = /usr/bin/touch
591 MKDIR = /bin/mkdir -p
592 RM = /bin/rm -f
593 CP = /bin/cp -f
594 MV = /bin/mv -f
595 LN = /bin/ln
596 CAT = /bin/cat
597 SYMLINK = /bin/ln -s
598 ENV = /usr/bin/env
599 INSTALL = /usr/bin/ginstall
600 CHMOD = /usr/bin/chmod
601 NAWK = /usr/bin/nawk
602 TEE = /usr/bin/tee
603 IPS2TGZ = $(WS_TOOLS)/ips2tgz
605 INS.dir= $(INSTALL) -d $@
606 INS.file= $(INSTALL) -m 444 $< $(@D)
608 PKG_CONFIG_PATH.32 = /usr/lib/pkgconfig
609 PKG_CONFIG_PATH.64 = /usr/lib/$(MACH64)/pkgconfig
610 PKG_CONFIG_PATH = $(PKG_CONFIG_PATH.$(BITS))
612 # Set default path for environment modules
613 MODULE_VERSION = 3.2.10
614 MODULE_PATH = /usr/share/Modules/modulefiles
615 MODULE_VERSIONS_PATH = /usr/share/Modules/versions
617 # Path to bash completions
618 BASH_COMPLETIONS_PATH = /usr/share/bash-completion/completions
621 # C preprocessor flag sets to ease feature selection. Add the required
622 # feature to your Makefile with CPPFLAGS += $(FEATURE_MACRO) and add to
623 # the component build with CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" or
624 # similiar.
627 # Enables visibility of some c99 math functions that aren't visible by default.
628 # What other side-effects are there?
629 CPP_C99_EXTENDED_MATH = -D_STDC_99
631 # Enables large file support for components that have no other means of doing
632 # so. Use CPP_LARGEFILES and not the .32/.64 variety directly
633 CPP_LARGEFILES.32 := $(shell getconf LFS_CFLAGS)
634 CPP_LARGEFILES.64 := $(shell getconf LFS64_CFLAGS)
635 CPP_LARGEFILES = $(CPP_LARGEFILES.$(BITS))
637 # Enables some #pragma redefine_extname to POSIX-compliant Standard C Library
638 # functions. Also avoids the component's #define _POSIX_C_SOURCE to some value
639 # we currently do not support.
640 CPP_POSIX = -D_POSIX_C_SOURCE=200112L -D_POSIX_PTHREAD_SEMANTICS
642 # XPG6 mode. This option enables XPG6 conformance, plus extensions.
643 # Amongst other things, this option will cause system calls like
644 # popen (3C) and system (3C) to invoke the standards-conforming
645 # shell, /usr/xpg4/bin/sh, instead of /usr/bin/sh. Add studio_XPG6MODE to
646 # CFLAGS instead of using this directly
647 CPP_XPG6MODE= -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6
649 # XPG5 mode. These options are specific for C++, where _XPG6,
650 # _XOPEN_SOURCE=600 and C99 are illegal. -D__EXTENSIONS__=1 is legal in C++.
651 CPP_XPG5MODE= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__=1 -D_XPG5
654 # Studio C compiler flag sets to ease feature selection. Add the required
655 # feature to your Makefile with CFLAGS += $(FEATURE_MACRO) and add to the
656 # component build with CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.
659 # Generate 32/64 bit objects
660 CC_BITS = -m$(BITS)
662 # Code generation instruction set and optimization 'hints'. Use studio_XBITS
663 # and not the .arch.bits variety directly.
664 studio_XBITS.sparc.32 = -xtarget=ultra2 -xarch=sparcvis -xchip=ultra2
665 studio_XBITS.sparc.64 =
666 ifneq ($(strip $(PARFAIT_BUILD)),yes)
667 studio_XBITS.sparc.64 += -xtarget=ultra2
668 endif
669 studio_XBITS.sparc.64 += -xarch=sparcvis -xchip=ultra2
670 studio_XBITS.i386.32 = -xchip=pentium
671 studio_XBITS.i386.64 = -xchip=generic -Ui386 -U__i386
672 studio_XBITS = $(studio_XBITS.$(MACH).$(BITS))
674 # Turn on recognition of supported C99 language features and enable the 1999 C
675 # standard library semantics of routines that appear in both the 1990 and
676 # 1999 C standard. To use set studio_C99MODE=$(studio_99_ENABLE) in your
677 # component Makefile.
678 studio_C99_ENABLE = -xc99=all
680 # Turn off recognition of C99 language features, and do not enable the 1999 C
681 # standard library semantics of routines that appeared in both the 1990 and
682 # 1999 C standard. To use set studio_C99MODE=$(studio_99_DISABLE) in your
683 # component Makefile.
684 studio_C99_DISABLE = -xc99=none
686 # Use the compiler default 'xc99=all,no_lib'
687 studio_C99MODE =
689 # For C++, compatibility with C99 (which is technically illegal) is
690 # enabled in a different way. So, we must use a different macro for it.
691 studio_cplusplus_C99_ENABLE = -xlang=c99
693 # Turn it off.
694 studio_cplusplus_C99_DISABLE =
696 # And this is the macro you should actually use
697 studio_cplusplus_C99MODE =
699 # Turn on C99 for gcc
700 gcc_C99_ENABLE = -std=c99
702 # Allow zero-sized struct/union declarations and void functions with return
703 # statements.
704 studio_FEATURES_EXTENSIONS = -features=extensions
706 # Control the Studio optimization level.
707 studio_OPT.sparc.32 = -xO4
708 studio_OPT.sparc.64 = -xO4
709 studio_OPT.i386.32 = -xO4
710 studio_OPT.i386.64 = -xO4
711 studio_OPT = $(studio_OPT.$(MACH).$(BITS))
713 # Studio PIC code generation. Use CC_PIC instead to select PIC code generation.
714 studio_PIC = -KPIC -DPIC
716 # The Sun Studio 11 compiler has changed the behaviour of integer
717 # wrap arounds and so a flag is needed to use the legacy behaviour
718 # (without this flag panics/hangs could be exposed within the source).
719 # This is used through studio_IROPTS, not the 'sparc' variety.
720 studio_IROPTS.sparc = -W2,-xwrap_int
721 studio_IROPTS = $(studio_IROPTS.$(MACH))
723 # Control register usage for generated code. SPARC ABI requires system
724 # libraries not to use application registers. x86 requires 'no%frameptr' at
725 # x04 or higher.
727 # We should just use -xregs but we need to workaround 7030022. Note
728 # that we can't use the (documented) -Wc,-xregs workaround because
729 # libtool really hates -Wc and thinks it should be -Wl. Instead
730 # we use an (undocumented) option which actually happens to be what
731 # CC would use.
732 studio_XREGS.sparc = -Qoption cg -xregs=no%appl
733 studio_XREGS.i386 = -xregs=no%frameptr
734 studio_XREGS = $(studio_XREGS.$(MACH))
736 gcc_XREGS.sparc = -mno-app-regs
737 gcc_XREGS.i386 =
738 gcc_XREGS = $(gcc_XREGS.$(MACH))
740 # Set data alignment on sparc to reasonable values, 8 byte alignment for 32 bit
741 # objects and 16 byte alignment for 64 bit objects. This is added to CFLAGS by
742 # default.
743 studio_ALIGN.sparc.32 = -xmemalign=8s
744 studio_ALIGN.sparc.64 = -xmemalign=16s
745 studio_ALIGN = $(studio_ALIGN.$(MACH).$(BITS))
747 # Studio shorthand for building multi-threaded code, enables -D_REENTRANT and
748 # linking with threadin support. This is added to CFLAGS by default, override
749 # studio_MT to turn this off.
750 studio_MT = -mt
752 # See CPP_XPG6MODE comment above.
753 studio_XPG6MODE = $(studio_C99MODE) $(CPP_XPG6MODE)
754 XPG6MODE = $(studio_XPG6MODE)
756 # See CPP_XPG5MODE comment above. You can only use this in C++, not in C99.
757 studio_XPG5MODE = $(studio_cplusplus_C99MODE) $(CPP_XPG5MODE)
758 XPG5MODE = $(studio_XPG5MODE)
760 # Default Studio C compiler flags. Add the required feature to your Makefile
761 # with CFLAGS += $(FEATURE_MACRO) and add to the component build with
762 # CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. In most cases, it
763 # should not be necessary to add CFLAGS to any environment other than the
764 # configure environment.
765 CFLAGS.studio += $(studio_OPT) $(studio_XBITS) $(studio_XREGS) \
766 $(studio_IROPTS) $(studio_C99MODE) $(studio_ALIGN) \
767 $(studio_MT)
770 # GNU C compiler flag sets to ease feature selection. Add the required
771 # feature to your Makefile with CFLAGS += $(FEATURE_MACRO) and add to the
772 # component build with CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.
775 # GCC Compiler optimization flag
776 gcc_OPT = -O3
778 # GCC PIC code generation. Use CC_PIC instead to select PIC code generation.
779 gcc_PIC = -fPIC -DPIC
781 # Generic macro for PIC code generation. Use this macro instead of the
782 # compiler specific variant.
783 CC_PIC = $($(COMPILER)_PIC)
786 # Default GNU C compiler flags. Add the required feature to your Makefile
787 # with CFLAGS += $(FEATURE_MACRO) and add to the component build with
788 # CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. In most cases, it
789 # should not be necessary to add CFLAGS to any environment other than the
790 # configure environment.
791 CFLAGS.gcc += $(gcc_OPT)
792 CFLAGS.gcc += $(gcc_XREGS)
795 # Build 32 or 64 bit objects.
796 CFLAGS += $(CC_BITS)
798 # Add compiler specific 'default' features
799 CFLAGS += $(CFLAGS.$(COMPILER))
802 # Studio C++ requires -norunpath to avoid adding its location into the RUNPATH
803 # to C++ applications.
804 studio_NORUNPATH = -norunpath
806 # To link in standard mode (the default mode) without any C++ libraries
807 # (except libCrun), use studio_LIBRARY_NONE in your component Makefile.
808 studio_LIBRARY_NONE = -library=%none
810 # Don't link C++ with any C++ Runtime or Standard C++ library
811 studio_CXXLIB_NONE = -xnolib
813 # Link C++ with the Studio C++ Runtime and Standard C++ library. This is the
814 # default for "standard" mode.
815 studio_CXXLIB_CSTD = -library=Cstd,Crun
817 # link C++ with the Studio C++ Runtime and Apache Standard C++ library
818 studio_CXXLIB_APACHE = -library=stdcxx4,Crun
820 # Add the C++ ABI compatibility flags for older ABI compatibility. The default
821 # is "standard mode" (-compat=5)
822 studio_COMPAT_VERSION_4 = -compat=4
824 # Tell the compiler that we don't want the studio runpath added to the
825 # linker flags. We never want the Studio location added to the RUNPATH.
826 CXXFLAGS += $($(COMPILER)_NORUNPATH)
828 # Build 32 or 64 bit objects in C++ as well.
829 CXXFLAGS += $(CC_BITS)
831 # Build 32 or 64 bit objects in FORTRAN as well.
832 F77FLAGS += $(CC_BITS)
833 FCFLAGS += $(CC_BITS)
837 # Solaris linker flag sets to ease feature selection. Add the required
838 # feature to your Makefile with LDFLAGS += $(FEATURE_MACRO) and add to the
839 # component build with CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" or similiar.
842 # set the bittedness that we want to link
843 ccs.ld.64 = -64
844 gcc.ld.32 = -m32
845 gcc.ld.64 = -m64
846 LD_BITS = $($(LINKER).ld.$(BITS))
847 LDFLAGS = $(LD_BITS)
849 # Reduce the symbol table size, effectively conflicting with -g. We should
850 # get linker guidance here.
851 LD_Z_REDLOCSYM = -z redlocsym
853 # Cause the linker to rescan archive libraries and resolve remaining unresolved
854 # symbols recursively until all symbols are resolved. Components should be
855 # linking in the libraries they need, in the required order. This should
856 # only be required if the component's native build is horribly broken.
857 LD_Z_RESCAN_NOW = -z rescan-now
859 LD_Z_TEXT = -z direct
861 # make sure that -lc is always present when building shared objects.
862 LD_DEF_LIBS += -lc
864 # make sure all symbols are defined.
865 LD_Z_DEFS = -z defs
867 # eliminate unreferenced dynamic dependencies
868 LD_Z_IGNORE = -z ignore
870 # use direct binding
871 LD_B_DIRECT = -Bdirect
873 # use generic macro names for enabling/disabling ASLR
874 ASLR_ENABLE = -z aslr=enable
875 ASLR_DISABLE = -z aslr=disable
876 ASLR_MODE = $(ASLR_DISABLE)
878 # by default, turn off Address Space Layout Randomization for ELF executables;
879 # to explicitly enable ASLR, set ASLR_MODE = $(ASLR_ENABLE)
880 # in that component's Makefile
881 LD_Z_ASLR = $(ASLR_MODE)
884 # More Solaris linker flags that we want to be sure that everyone gets. This
885 # is automatically added to the calling environment during the 'build' and
886 # 'install' phases of the component build. Each individual feature can be
887 # turned off by adding FEATURE_MACRO= to the component Makefile.
890 # Create a non-executable stack when linking.
891 LD_MAP_NOEXSTK.i386 = -M /usr/lib/ld/map.noexstk
892 LD_MAP_NOEXSTK.sparc = -M /usr/lib/ld/map.noexstk
894 # Create a non-executable bss segment when linking.
895 LD_MAP_NOEXBSS = -M /usr/lib/ld/map.noexbss
897 # Create a non-executable data segment when linking. Due to PLT needs, the
898 # data segment must be executable on sparc, but the bss does not.
899 # see mapfile comments for more information
900 LD_MAP_NOEXDATA.i386 = -M /usr/lib/ld/map.noexdata
901 LD_MAP_NOEXDATA.sparc = $(LD_MAP_NOEXBSS)
903 # Page alignment
904 LD_MAP_PAGEALIGN = -M /usr/lib/ld/map.pagealign
906 # Linker options to add when only building libraries
907 LD_OPTIONS_SO += $(LD_Z_TEXT) $(LD_Z_DEFS) $(LD_DEF_LIBS)
909 # Default linker options that everyone should get. Do not add additional
910 # libraries to this macro, as it will apply to everything linked during the
911 # component build.
912 LD_OPTIONS += $(LD_MAP_NOEXSTK.$(MACH)) $(LD_MAP_NOEXDATA.$(MACH)) \
913 $(LD_MAP_PAGEALIGN) $(LD_B_DIRECT) $(LD_Z_IGNORE)
915 # only used on executables
916 LD_EXEC_OPTIONS = $(LD_Z_ASLR)
918 # Environment variables and arguments passed into the build and install
919 # environment(s). These are the initial settings.
920 COMPONENT_BUILD_ENV= \
921 LD_OPTIONS="$(LD_OPTIONS)" \
922 LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)"
923 COMPONENT_INSTALL_ENV= \
924 LD_OPTIONS="$(LD_OPTIONS)" \
925 LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)"
927 # PERL options which depend on C options should be placed here
928 # Don't trust Perl $Config{optimize}, we can get Studio flags
929 PERL_OPTIMIZE =$(gcc_OPT)
931 # We need this to overwrite options of perl used to compile illumos-gate
932 PERL_STUDIO_OVERWRITE = cc="$(CC)" cccdlflags="$(CC_PIC)" ld="$(CC)" ccname="$(shell basename $(CC))" optimize="$(gcc_OPT)"
934 # Allow user to override default maximum number of archives
935 NUM_EXTRA_ARCHIVES= 1 2 3 4 5 6 7 8 9 10
937 # Rewrite absolute source-code paths into relative for ccache, so that any
938 # workspace with a shared CCACHE_DIR can benefit when compiling a component
939 ifneq ($(strip $(CCACHE)),)
940 export CCACHE_BASEDIR = $(BUILD_DIR_$(BITS))
941 COMPONENT_BUILD_ENV += CCACHE="$(CCACHE)"
942 COMPONENT_INSTALL_ENV += CCACHE="$(CCACHE)"
943 COMPONENT_TEST_ENV += CCACHE="$(CCACHE)"
944 COMPONENT_BUILD_ENV += CC_gcc_32="$(CC_gcc_32)"
945 COMPONENT_BUILD_ENV += CC_gcc_64="$(CC_gcc_32)"
946 COMPONENT_BUILD_ENV += CXX_gcc_32="$(CXX_gcc_64)"
947 COMPONENT_BUILD_ENV += CXX_gcc_64="$(CXX_gcc_64)"
948 COMPONENT_INSTALL_ENV += CC_gcc_32="$(CC_gcc_32)"
949 COMPONENT_INSTALL_ENV += CC_gcc_64="$(CC_gcc_32)"
950 COMPONENT_INSTALL_ENV += CXX_gcc_32="$(CXX_gcc_64)"
951 COMPONENT_INSTALL_ENV += CXX_gcc_64="$(CXX_gcc_64)"
952 COMPONENT_TEST_ENV += CC_gcc_32="$(CC_gcc_32)"
953 COMPONENT_TEST_ENV += CC_gcc_64="$(CC_gcc_32)"
954 COMPONENT_TEST_ENV += CXX_gcc_32="$(CXX_gcc_64)"
955 COMPONENT_TEST_ENV += CXX_gcc_64="$(CXX_gcc_64)"
956 COMPONENT_BUILD_ENV.$(BITS) += CCACHE_BASEDIR="$(BUILD_DIR_$(BITS))"
957 COMPONENT_INSTALL_ENV.$(BITS) += CCACHE_BASEDIR="$(BUILD_DIR_$(BITS))"
958 COMPONENT_TEST_ENV.$(BITS) += CCACHE_BASEDIR="$(BUILD_DIR_$(BITS))"
960 ifneq ($(strip $(CCACHE_DIR)),)
961 COMPONENT_BUILD_ENV += CCACHE_DIR="$(CCACHE_DIR)"
962 COMPONENT_INSTALL_ENV += CCACHE_DIR="$(CCACHE_DIR)"
963 COMPONENT_TEST_ENV += CCACHE_DIR="$(CCACHE_DIR)"
964 endif
966 ifneq ($(strip $(CCACHE_LOGFILE)),)
967 COMPONENT_BUILD_ENV += CCACHE_LOGFILE="$(CCACHE_LOGFILE)"
968 COMPONENT_INSTALL_ENV += CCACHE_LOGFILE="$(CCACHE_LOGFILE)"
969 COMPONENT_TEST_ENV += CCACHE_LOGFILE="$(CCACHE_LOGFILE)"
970 endif
972 endif
974 # Add any bit-specific settings
975 COMPONENT_BUILD_ENV += $(COMPONENT_BUILD_ENV.$(BITS))
976 COMPONENT_BUILD_ARGS += $(COMPONENT_BUILD_ARGS.$(BITS))
977 COMPONENT_INSTALL_ENV += $(COMPONENT_INSTALL_ENV.$(BITS))
978 COMPONENT_INSTALL_ARGS += $(COMPONENT_INSTALL_ARGS.$(BITS))
980 # declare these phony so that we avoid filesystem conflicts.
981 .PHONY: prep build install publish test clean clobber parfait
983 # If there are no tests to execute
984 NO_TESTS = test-nothing
985 test-nothing:
986 @echo "There are no tests available at this time."
988 # default behaviour for 'component-hook' target is to echo the component
989 # name and version information, but more complex behaviour can be implemented
990 # via command line setting of the COMPONENT_HOOK macro.
991 COMPONENT_HOOK ?= echo $(COMPONENT_NAME) $(COMPONENT_VERSION)
993 component-hook:
994 @$(COMPONENT_HOOK)
997 # Packages with tools that are required to build Userland components
999 REQUIRED_PACKAGES += metapackages/build-essential
1001 # Only a default dependency if component being built produces binaries.
1002 ifneq ($(strip $(BUILD_BITS)),NO_ARCH)
1003 REQUIRED_PACKAGES += system/library
1004 endif
1006 include $(WS_MAKE_RULES)/environment.mk
1008 # A simple rule to print the value of any macro. Ex:
1009 # $ gmake print-REQUIRED_PACKAGES
1010 # Note that some macros are set on a per target basis, so what you see
1011 # is not always what you get.
1012 print-%:
1013 @echo '$(subst ','\'',$*=$($*)) (origin: $(origin $*), flavor: $(flavor $*))'