Makefile revision 3996
99N/A#
99N/A# CDDL HEADER START
99N/A#
99N/A# The contents of this file are subject to the terms of the
99N/A# Common Development and Distribution License (the "License").
99N/A# You may not use this file except in compliance with the License.
99N/A#
99N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99N/A# or http://www.opensolaris.org/os/licensing.
99N/A# See the License for the specific language governing permissions
99N/A# and limitations under the License.
99N/A#
99N/A# When distributing Covered Code, include this CDDL HEADER in each
99N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
99N/A# If applicable, add the following below this CDDL HEADER, with the
99N/A# fields enclosed by brackets "[]" replaced with your own identifying
99N/A# information: Portions Copyright [yyyy] [name of copyright owner]
99N/A#
99N/A# CDDL HEADER END
99N/A#
99N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
99N/A#
127N/Ainclude ../../../make-rules/shared-macros.mk
99N/A
99N/APATH=/usr/bin:/usr/gnu/bin:/usr/sbin
99N/A
99N/ACOMPONENT_NAME= Python
99N/ACOMPONENT_VERSION= 2.6.8
618N/ACOMPONENT_PROJECT_URL= http://python.org/
99N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
99N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
99N/ACOMPONENT_ARCHIVE_HASH= \
618N/A sha256:c34036718ee1f091736677f543bc7960861cf9fcbea77d49572b59f7f1ab3c3f
99N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
99N/ACOMPONENT_BUGDB= utility/python
99N/A
99N/ATPNO= 9104
581N/A
99N/Ainclude $(WS_MAKE_RULES)/prep.mk
118N/Ainclude $(WS_MAKE_RULES)/configure.mk
118N/Ainclude $(WS_MAKE_RULES)/ips.mk
118N/Ainclude $(WS_MAKE_RULES)/lint-libraries.mk
118N/A
118N/A# We patch auto* files, so regenerate headers and configure
118N/ACOMPONENT_PREP_ACTION = \
118N/A (cd $(@D) ; autoheader ; autoconf)
118N/A
118N/A# This seems horribly wrong, but these defines break the ability to build c99
118N/A# compliant modules or with gcc.
118N/ACOMPONENT_POST_CONFIGURE_ACTION = \
118N/A (cd $(@D) ; \
118N/A perl -pi -e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
99N/A perl -pi -e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
99N/A perl -pi -e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' \
118N/A pyconfig.h)
99N/A
99N/A# The python build is profile-guided for studio; to see the benefits of that,
99N/A# Python must be compiled with -xO5 and a different build target must be used.
99N/A# Use of xprofile requires that the same options be used during compilation and
118N/A# linking. The targets chosen are based on Solaris 11 minimum supported system
118N/A# requirements.
118N/ACOMPONENT_BUILD_TARGETS = profile-opt
118N/AXPROFILE_DIR = $(BUILD_DIR_$(BITS))/.profile
99N/APYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
99N/APYFLAGS.sparc =
99N/ACFLAGS += -xO5 $(PYFLAGS.$(MACH))
581N/ALDFLAGS += -xO5 $(PYFLAGS.$(MACH))
581N/A
581N/A# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
99N/A# python-config
99N/ACC += $(CFLAGS)
99N/A
99N/AC99MODE=
99N/ACPPFLAGS += -IPython
99N/A
99N/A# so we find the ncurses headers
99N/ACPPFLAGS += -I/usr/include/ncurses
118N/A# enable large files how they did in JDS
118N/ACPPFLAGS += -D_LARGEFILE64_SOURCE
206N/A# libffi for _ctypes
206N/ACPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
99N/A
99N/A# Python puts its header files in a special place.
99N/ALINT_FLAGS += -I$(SOURCE_DIR)/Include
181N/A
181N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
99N/ACONFIGURE_OPTIONS += --enable-shared
99N/ACONFIGURE_OPTIONS += --with-system-ffi
99N/ACONFIGURE_OPTIONS += --without-gcc
99N/ACONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no
99N/ACONFIGURE_OPTIONS += ac_cv_olimit_ok=no
99N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
99N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
99N/ACONFIGURE_OPTIONS += CCSHARED="$(CC_PIC)"
99N/ACONFIGURE_OPTIONS += CXX="$(CXX)"
99N/ACONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
181N/ACONFIGURE_OPTIONS += DFLAGS="-$(BITS)"
99N/ACONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)"
99N/ACOMPONENT_BUILD_ENV += DFLAGS="-$(BITS)"
99N/ACOMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)"
99N/A
COMPONENT_TEST_TARGETS = test
# 64 bit shared objects need to go in a 64-bit directory
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
# common targets
build: $(BUILD_32_and_64)
$(INSTALL_32): $(INSTALL_64)
install: $(INSTALL_32_and_64)
test: $(TEST_32_and_64)
REQUIRED_PACKAGES += compress/bzip2
REQUIRED_PACKAGES += database/sqlite-3
REQUIRED_PACKAGES += developer/library/xprofile
REQUIRED_PACKAGES += library/database/gdbm
REQUIRED_PACKAGES += library/libffi
REQUIRED_PACKAGES += library/ncurses
REQUIRED_PACKAGES += library/python/tkinter-26
REQUIRED_PACKAGES += library/readline
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += runtime/tcl-8
REQUIRED_PACKAGES += runtime/tk-8
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/linker
REQUIRED_PACKAGES += x11/compatibility/links-xorg
REQUIRED_PACKAGES += x11/library/libx11