Makefile revision 459
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# CDDL HEADER START
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# The contents of this file are subject to the terms of the
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# Common Development and Distribution License (the "License").
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# You may not use this file except in compliance with the License.
576783a0716495ff4da30ff7315db7774f762a16vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# See the License for the specific language governing permissions
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# and limitations under the License.
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# When distributing Covered Code, include this CDDL HEADER in each
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# If applicable, add the following below this CDDL HEADER, with the
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# CDDL HEADER END
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCOMPONENT_ARCHIVE_HASH= sha1:38efa30958222b2733f22098b3db09161d2e6c8c
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCOMPONENT_ARCHIVE_URL= http://www.apache.org/dist/stdcxx/$(COMPONENT_ARCHIVE)
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncISA_PATCH_DIR_32 = $(WS_TOP)/components/stdcxx/isa_patches/$(MACH)
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncISA_PATCH_DIR_64 = $(WS_TOP)/components/stdcxx/isa_patches/$(MACH64)
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1034-sunpro.config.$(MACH).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1035-GNUmakefile.tst.$(MACH).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1036-GNUmakefile.rwt.$(MACH).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1037-GNUmakefile.lib.$(MACH).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1038-GNUmakefile.ph.$(MACH).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1039-GNUmakefile.exm.$(MACH).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1040-GNUmakefile.cfg.$(MACH).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1041-GNUmakefile.bin.$(MACH).patch
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1034-sunpro.config.$(MACH64).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1035-GNUmakefile.tst.$(MACH64).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1036-GNUmakefile.rwt.$(MACH64).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1037-GNUmakefile.lib.$(MACH64).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1038-GNUmakefile.ph.$(MACH64).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1039-GNUmakefile.exm.$(MACH64).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1040-GNUmakefile.cfg.$(MACH64).patch \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(ISA_PATCH_DIR)/1041-GNUmakefile.bin.$(MACH64).patch
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# Please see the README file in this directory for a detailed explanation
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# about these flags, what they do, and why we need them.
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCFLAGS_sparc += -Qoption cg -xregs=no%appl -xbuiltin=%none -xO4 $(PICFLAG)
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCFLAGS_i386 = -Xc -features=extinl -xregs=no%frameptr
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCXXFLAGS_i386 = -xregs=no%frameptr -xO3 -xbuiltin=%none $(PICFLAG)
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCFLAGS_GENERIC += -D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCFLAGS_GENERIC += -D_XPG6 -D_XOPEN_SOURCE=600 -D_POSIX_PTHREAD_SEMANTICS
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCFLAGS_GENERIC += -D_POSIX_C_SOURCE=200112L -D__XOPEN_OR_POSIX
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCFLAGS_GENERIC += -D_STRICT_STDC -D_STRICT_STDC__ -D_STDC_C99 -D_ISOC99_SOURCE
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCXXFLAGS_GENERIC = -library=Cstd -library=Crun -norunpath
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCXXFLAGS_GENERIC += -Qoption ccfe ++boolflag:sunwcch=false
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCXXFLAGS_GENERIC += -Qoption ccfe +d2,-xgeninl=system
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCXXFLAGS_GENERIC += -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncCXXFLAGS = $(CXXFLAGS_$(BITS)) $(CXXFLAGS_$(MACH)) $(CXXFLAGS_GENERIC)
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# -mt will automatically pass -lthread unless we pass -lpthread
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# on link line. -lthread causes regressions. see man CC(1) and -mt.
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# -lumem must be passed before -lc.
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# We cannot have -B direct
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncLD_OPTIONS = -M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.noexdata
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# If I name it NLSPATH, gmake insists on getting its value from the
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# running environment. Also, it all has to be on one line. += prepends
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync# a whitespace.
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncBUILD_NLSPATH = :%N.cat:/usr/lib/locale/%L/%N.cat:/usr/share/locale/%L/%N.cat:$(BUILD_DIR_$(BITS))/lib/rwstderr.cat
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncPKG_PROTO_DIRS += $(COMPONENT_DIR)/$(COMPONENT_SRC)-32
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncPKG_PROTO_DIRS += $(COMPONENT_DIR)/$(COMPONENT_SRC)-64
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync else $(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE) ; \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync else $(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE) ; \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(GPATCH) $(GPATCH_FLAGS) <$(COMPONENT_DIR)/$$f ; \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync -exec chmod 0644 {} \; > /dev/null 2>&1 )
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(CP) -p $(COMPONENT_DIR)/Solaris/fix_nls_symlinks.sh . ; \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(GCP) -rpd $(COMPONENT_SRC) $(COMPONENT_SRC)-$(BITS) ; \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsyncinstall: $(BUILD_DIR_32)/.built $(BUILD_DIR_64)/.built
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(CP) $(COMPONENT_DIR)/Solaris/install.sh $(COMPONENT_DIR)/
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync test -d $(BUILD_DIR_32) || echo "$(BUILD_DIR_32) does not exist!"
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync test -d $(BUILD_DIR_64) || echo "$(BUILD_DIR_64) does not exist!"
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(CP) -p $(COMPONENT_DIR)/Solaris/prep_build_area.sh \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(SHELL) $(COMPONENT_DIR)/prep_build_area.sh -m32 \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(SHELL) $(COMPONENT_DIR)/prep_build_area.sh -m64 \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(CP) -p $(COMPONENT_DIR)/Solaris/run_tests.sh . ; \
55ed92d6db673b47975252a607bfb7aed49dbe79vboxsync $(CP) -p $(COMPONENT_DIR)/Solaris/run_tests.sh . ; \
e9684b4f760eb8ec77e3883dd2e3c42db9d7cc80vboxsync $(RM) -r $(COMPONENT_SRC) $(COMPONENT_SRC)-32 $(COMPONENT_SRC)-64