Makefile revision 618
cd348e325366620fe047edcc849e3c9424828599Peter Bray# CDDL HEADER START
cd348e325366620fe047edcc849e3c9424828599Peter Bray# The contents of this file are subject to the terms of the
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# Common Development and Distribution License (the "License").
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# You may not use this file except in compliance with the License.
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# See the License for the specific language governing permissions
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# and limitations under the License.
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# When distributing Covered Code, include this CDDL HEADER in each
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# If applicable, add the following below this CDDL HEADER, with the
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# fields enclosed by brackets "[]" replaced with your own identifying
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# information: Portions Copyright [yyyy] [name of copyright owner]
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# CDDL HEADER END
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
d6ee3934a24d8ccc0e4bb478405d8e5f6a35825dLubos KoscoCOMPONENT_ARCHIVE_HASH= sha1:38efa30958222b2733f22098b3db09161d2e6c8c
d6ee3934a24d8ccc0e4bb478405d8e5f6a35825dLubos KoscoCOMPONENT_ARCHIVE_URL= http://www.apache.org/dist/stdcxx/$(COMPONENT_ARCHIVE)
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter BrayISA_PATCH_DIR_32 = $(WS_TOP)/components/stdcxx/isa_patches/$(MACH)
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter BrayISA_PATCH_DIR_64 = $(WS_TOP)/components/stdcxx/isa_patches/$(MACH64)
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1034-sunpro.config.$(MACH).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1035-GNUmakefile.tst.$(MACH).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1036-GNUmakefile.rwt.$(MACH).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1037-GNUmakefile.lib.$(MACH).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1038-GNUmakefile.ph.$(MACH).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1039-GNUmakefile.exm.$(MACH).patch \
477c09a2656e6a2c1075425ad81e61d594164fa9Lubos Kosco $(ISA_PATCH_DIR)/1040-GNUmakefile.cfg.$(MACH).patch \
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray $(ISA_PATCH_DIR)/1041-GNUmakefile.bin.$(MACH).patch
c842732324ee4c74ede17887ad1f0dcdc4364a2cLubos Kosco $(ISA_PATCH_DIR)/1034-sunpro.config.$(MACH64).patch \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray $(ISA_PATCH_DIR)/1035-GNUmakefile.tst.$(MACH64).patch \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray $(ISA_PATCH_DIR)/1036-GNUmakefile.rwt.$(MACH64).patch \
5762c9f28c2246777be0e9d49cb29d9c0f49146dLubos Kosco $(ISA_PATCH_DIR)/1037-GNUmakefile.lib.$(MACH64).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1038-GNUmakefile.ph.$(MACH64).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1039-GNUmakefile.exm.$(MACH64).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1040-GNUmakefile.cfg.$(MACH64).patch \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(ISA_PATCH_DIR)/1041-GNUmakefile.bin.$(MACH64).patch
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# Please see the README file in this directory for a detailed explanation
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# about these flags, what they do, and why we need them.
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayFLAGS_sparcv9 = -m64 -xarch=sparcvis -xmemalign=16i
cd348e325366620fe047edcc849e3c9424828599Peter BrayCFLAGS_sparc += -Qoption cg -xregs=no%appl -xbuiltin=%none -xO4 $(PICFLAG)
cd348e325366620fe047edcc849e3c9424828599Peter BrayCFLAGS_i386 = -Xc -features=extinl -xregs=no%frameptr
cd348e325366620fe047edcc849e3c9424828599Peter BrayCXXFLAGS_i386 = -xregs=no%frameptr -xO3 -xbuiltin=%none $(PICFLAG)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCFLAGS_GENERIC += -D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos KoscoCFLAGS_GENERIC += -D_XPG6 -D_XOPEN_SOURCE=600 -D_POSIX_PTHREAD_SEMANTICS
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCFLAGS_GENERIC += -D_POSIX_C_SOURCE=200112L -D__XOPEN_OR_POSIX
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos KoscoCFLAGS_GENERIC += -D_STRICT_STDC -D_STRICT_STDC__ -D_STDC_C99 -D_ISOC99_SOURCE
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter BrayCXXFLAGS_GENERIC = -library=Cstd -library=Crun -norunpath
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter BrayCXXFLAGS_GENERIC += -Qoption ccfe ++boolflag:sunwcch=false
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter BrayCXXFLAGS_GENERIC += -Qoption ccfe +d2,-xgeninl=system
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCXXFLAGS_GENERIC += -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCXXFLAGS = $(CXXFLAGS_$(BITS)) $(CXXFLAGS_$(MACH)) $(CXXFLAGS_GENERIC)
c842732324ee4c74ede17887ad1f0dcdc4364a2cLubos Kosco# -mt will automatically pass -lthread unless we pass -lpthread
d7c1415de39f4b07c85828f49cd1ee7a2a19eb9eLubos Kosco# on link line. -lthread causes regressions. see man CC(1) and -mt.
c842732324ee4c74ede17887ad1f0dcdc4364a2cLubos Kosco# -lumem must be passed before -lc.
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray# We cannot have -B direct
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter BrayLD_OPTIONS = -M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.noexdata
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter BrayLD_OPTIONS += -lpthread -lumem -lm -lc -s -z ignore
3aa0947feb67d3e8292d84776638be98dd97fdc3Lubos Kosco# If I name it NLSPATH, gmake insists on getting its value from the
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# running environment. Also, it all has to be on one line. += prepends
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# a whitespace.
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayBUILD_NLSPATH = :%N.cat:/usr/lib/locale/%L/%N.cat:/usr/share/locale/%L/%N.cat:$(BUILD_DIR_$(BITS))/lib/rwstderr.cat
cd348e325366620fe047edcc849e3c9424828599Peter BrayCONFIGURE_ENV += LD="$(CXX) $(CXXFLAGS) $(LDFLAGS)"
5762c9f28c2246777be0e9d49cb29d9c0f49146dLubos KoscoCOMPONENT_BUILD_ENV += NLSPATH="$(BUILD_NLSPATH)"
d6ee3934a24d8ccc0e4bb478405d8e5f6a35825dLubos KoscoPKG_PROTO_DIRS += $(COMPONENT_DIR)/$(COMPONENT_SRC)-32
477c09a2656e6a2c1075425ad81e61d594164fa9Lubos KoscoPKG_PROTO_DIRS += $(COMPONENT_DIR)/$(COMPONENT_SRC)-64
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray else $(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE) ; \
d70dc22c6dce3f498251b0873638d1fea0e644a3Lubos Kosco else $(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE) ; \
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray $(GPATCH) $(GPATCH_FLAGS) <$(COMPONENT_DIR)/$$f ; \
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray -exec chmod 0644 {} \; > /dev/null 2>&1 )
ba2e31d47682cf0d28fe7a33f5c0d226a21aee17Lubos Kosco $(CP) -p $(COMPONENT_DIR)/Solaris/fix_nls_symlinks.sh . ; \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray $(GCP) -rpd $(COMPONENT_SRC) $(COMPONENT_SRC)-$(BITS) ; \
2b024356b830395446c55f50f9f724a63612e578Lubos Koscoinstall: $(BUILD_DIR_32)/.built $(BUILD_DIR_64)/.built
2b024356b830395446c55f50f9f724a63612e578Lubos Kosco $(CP) $(COMPONENT_DIR)/Solaris/install.sh $(COMPONENT_DIR)/
4e854c69a0484765dcd27b0e837898c8b6969beaTrond Norbye test -d $(BUILD_DIR_32) || echo "$(BUILD_DIR_32) does not exist!"
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray test -d $(BUILD_DIR_64) || echo "$(BUILD_DIR_64) does not exist!"
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray $(CP) -p $(COMPONENT_DIR)/Solaris/prep_build_area.sh \
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray $(CHMOD) 0755 $(COMPONENT_DIR)/prep_build_area.sh
477c09a2656e6a2c1075425ad81e61d594164fa9Lubos Kosco $(SHELL) $(COMPONENT_DIR)/prep_build_area.sh -m32 \
477c09a2656e6a2c1075425ad81e61d594164fa9Lubos Kosco $(SHELL) $(COMPONENT_DIR)/prep_build_area.sh -m64 \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(CP) -p $(COMPONENT_DIR)/Solaris/run_tests.sh . ; \
cd348e325366620fe047edcc849e3c9424828599Peter Bray $(CP) -p $(COMPONENT_DIR)/Solaris/run_tests.sh . ; \
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray $(RM) -r $(COMPONENT_SRC) $(COMPONENT_SRC)-32 $(COMPONENT_SRC)-64