Makefile revision 618
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner# The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# or http://www.opensolaris.org/os/licensing.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude ../../../make-rules/shared-macros.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinPATH=/usr/bin:/usr/gnu/bin:/usr/sbin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_NAME= Python
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_VERSION= 2.6.4
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PROJECT_URL= http://python.org/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE_HASH= sha1:bee572680d1966501247cb2b26e0e51f94d1cd13
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_TOP)/make-rules/prep.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_TOP)/make-rules/configure.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_TOP)/make-rules/ips.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_TOP)/make-rules/lint-libraries.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# We patch auto* files, so regenerate headers and configure
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_PREP_ACTION = \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin (cd $(@D) ; autoheader ; autoconf)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This seems horribly wrong, but these defines break the ability to build c99
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# compliant modules or with gcc.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_POST_CONFIGURE_ACTION = \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin (cd $(@D) ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin perl -pi -e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin perl -pi -e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin perl -pi -e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin pyconfig.h)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# python-config
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCC += $(CFLAGS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinC99MODE=
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCPPFLAGS += -IPython
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# so we find the ncurses headers
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCPPFLAGS += -I/usr/include/ncurses
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# enable large files how they did in JDS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCPPFLAGS += -D_LARGEFILE64_SOURCE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# libffi for _ctypes
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Python puts its header files in a special place.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINT_FLAGS += -I$(SOURCE_DIR)/Include
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --enable-shared
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --disable-static
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --with-system-ffi
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += --without-gcc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += ac_cv_olimit_ok=no
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += CCSHARED="$(CC_PIC)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += CXX="$(CXX)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONFIGURE_OPTIONS += DFLAGS="-$(BITS)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_BUILD_ENV += DFLAGS="-$(BITS)"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_TEST_TARGETS = test
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# 64 bit shared objects need to go in a 64-bit directory
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCOMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# common targets
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinbuild: $(BUILD_32_and_64)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin$(INSTALL_32): $(INSTALL_64)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininstall: $(INSTALL_32_and_64)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chintest: $(TEST_32_and_64)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(WS_TOP)/make-rules/depend.mk
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin