Makefile revision 458
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2718N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2N/A
2N/A#
59N/Ainclude ../../../make-rules/shared-macros.mk
727N/A
2818N/APATH=/usr/bin:/usr/gnu/bin:/usr/sbin
59N/A
59N/ACOMPONENT_NAME= Python
2N/ACOMPONENT_VERSION= 2.7.1
181N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
727N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
2818N/ACOMPONENT_ARCHIVE_HASH= sha1:fbe1894322ff91b80726e269c97454f4129fc2a3
59N/ACOMPONENT_ARCHIVE_URL= http://python.org/ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
59N/A
31N/Ainclude $(WS_TOP)/make-rules/prep.mk
2718N/Ainclude $(WS_TOP)/make-rules/configure.mk
2718N/Ainclude $(WS_TOP)/make-rules/ips.mk
2818N/A
2718N/A# We patch auto* files, so regenerate headers and configure
2718N/ACOMPONENT_PREP_ACTION = \
2718N/A (cd $(@D) ; autoheader ; autoconf)
2818N/A
59N/A# to find the ncurses headers
1716N/ACPPFLAGS += -I/usr/include/ncurses
2818N/A
2818N/A# libffi for _ctypes
2818N/ACPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
31N/A
2818N/A# because python links with $(CC) ... $(LDFLAGS) ...
59N/ALDFLAGS = $(CC_BITS) $(CC_PIC)
1716N/A
2818N/A# build pic
2818N/ACFLAGS += $(CC_PIC)
2818N/A
1716N/A# add /usr/gnu/lib to the library search/run path
2818N/ALDFLAGS.32 = -R/usr/gnu/lib -L/usr/gnu/lib
2719N/ALDFLAGS.64 = -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64)
1716N/ALDFLAGS += $(LDFLAGS.$(BITS))
2818N/A
2818N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
2818N/ACONFIGURE_OPTIONS += --enable-shared
2N/ACONFIGURE_OPTIONS += --with-system-expat
99N/ACONFIGURE_OPTIONS += --with-system-ffi
99N/ACONFIGURE_OPTIONS += --without-gcc
99N/ACONFIGURE_OPTIONS += --enable-ipv6
1716N/ACONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no
1716N/ACONFIGURE_OPTIONS += ac_cv_olimit_ok=no
1716N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
1716N/ACONFIGURE_OPTIONS += BASECFLAGS="$(CFLAGS)"
2818N/ACONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
2818N/ACONFIGURE_OPTIONS += DFLAGS="-$(BITS)"
2818N/A
727N/ACOMPONENT_BUILD_ENV += DFLAGS="-$(BITS)"
2818N/A
2818N/A# patches/00-bits.patch removes some AC_CHECK_SIZEOF tests in order to
2818N/A# generate a pyconfig.h that is both 32 and 64 bit compatible. We add this
2818N/A# back to the environment so that configure can still work. configure.in and
2818N/A# pyconfig.h.in should probably be rewhacked to do this more cleanly in the
2818N/A# future.
727N/ACONFIGURE_OPTIONS.32 += ac_cv_sizeof_long=4
727N/ACONFIGURE_OPTIONS.64 += ac_cv_sizeof_long=8
1257N/A
1257N/A# 64 bit shared objects need to go in a 64-bit directory
1257N/ACOMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload
1257N/A
1257N/A# common targets
1257N/Abuild: $(BUILD_32_and_64)
1257N/A
1257N/A$(INSTALL_32): $(INSTALL_64)
1257N/A
2N/Ainstall: $(INSTALL_32_and_64)
1257N/A
2N/ACOMPONENT_TEST_TARGETS = test
2N/A
1716N/Atest: $(TEST_32_and_64)
1257N/A
2N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
814N/A
1780N/Ainclude $(WS_TOP)/make-rules/depend.mk
814N/A