Makefile revision 5396
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# CDDL HEADER START
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# The contents of this file are subject to the terms of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Common Development and Distribution License (the "License").
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# You may not use this file except in compliance with the License.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# or http://www.opensolaris.org/os/licensing.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# See the License for the specific language governing permissions
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# and limitations under the License.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# When distributing Covered Code, include this CDDL HEADER in each
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# If applicable, add the following below this CDDL HEADER, with the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# CDDL HEADER END
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude ../../make-rules/shared-macros.mk
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncPATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_NAME= libdnet
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_VERSION= 1.12
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_PROJECT_URL= http://code.google.com/p/libdnet/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tgz
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_ARCHIVE_HASH= \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync sha256:83b33039787cf99990e977cef7f18a5d5e7aaffc4505548a83d31bd3515eb026
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_ARCHIVE_URL= http://libdnet.googlecode.com/files/$(COMPONENT_ARCHIVE)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_BUGDB= library/libdnet
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncTPNO= 9402
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude $(WS_MAKE_RULES)/prep.mk
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude $(WS_MAKE_RULES)/configure.mk
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude $(WS_MAKE_RULES)/ips.mk
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Needed to generate libraries with a .so extension.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_PREP_ACTION = \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (cd $(@D) ; libtoolize --automake --copy ; \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync aclocal -I config ; \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync autoheader ; \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync automake --add-missing --copy ; \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync autoconf)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Set -m32 or -m64 correctly for 32 and 64 bit versions.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCC += $(CC_BITS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLDFLAGS += $(CC_BITS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Remove Linux specific functionality.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCONFIGURE_OPTIONS += ac_cv_dnet_linux_pf_packet=no
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCONFIGURE_OPTIONS += --with-check=/usr
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Currently only support for Python 2.7.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCONFIGURE_OPTIONS += --with-python
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_BUILD_ARGS += CC="$(CC)"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncPKG_MACROS += MACHINE=$(shell uname -m)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Needed for "gmake test" to work successfully.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# If SHELLOPTS is exported (as it is by the userland makefiles),
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# then all shell options get exported to child invocations of bash,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# which results in test failures due to nounset and xtrace being
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# set unexpectedly, and errors such as "$1: unbound variable" and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# diffs failing due to script tracing in output files.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncunexport SHELLOPTS
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_TEST_DIR = $(@D)/test/check
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCOMPONENT_TEST_TRANSFORMS += \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync '-n ' \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync '-e "/TOTAL/p" ' \
'-e "/SKIP/p" ' \
'-e "/PASS/p" ' \
'-e "/FAIL/p" ' \
'-e "/ERROR/p" '
# Needed to build the test programs.
COMPONENT_PRE_SYSTEM_TEST_ACTION += \
(cd $(@D)/src ; $(GMAKE) libdnet.la )
COMPONENT_SYSTEM_TEST_DIR = $(@D)/test/check
# Get correct libdnet.so.1 from the proto area.
TEST_LIBPATH.32 = $(PROTOUSRLIBDIR)
TEST_LIBPATH.64 = $(PROTOUSRLIBDIR64)
COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
ASLR_MODE = $(ASLR_ENABLE)
configure: $(CONFIGURE_32_and_64)
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: install $(TEST_32_and_64)
system-test: configure $(SYSTEM_TEST_32_and_64)
REQUIRED_PACKAGES += developer/test/check
REQUIRED_PACKAGES += runtime/python-27
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library