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