Makefile revision 277
2605N/A#
2605N/A# CDDL HEADER START
2605N/A#
2605N/A# The contents of this file are subject to the terms of the
2605N/A# Common Development and Distribution License (the "License").
2605N/A# You may not use this file except in compliance with the License.
2605N/A#
2605N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2605N/A# or http://www.opensolaris.org/os/licensing.
2605N/A# See the License for the specific language governing permissions
2605N/A# and limitations under the License.
2605N/A#
2605N/A# When distributing Covered Code, include this CDDL HEADER in each
2605N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2605N/A# If applicable, add the following below this CDDL HEADER, with the
2605N/A# fields enclosed by brackets "[]" replaced with your own identifying
2605N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2605N/A#
2605N/A# CDDL HEADER END
2605N/A#
2605N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2605N/A#
3996N/Ainclude ../../make-rules/shared-macros.mk
2605N/A
4070N/APATH=$(SPRO_VROOT)/bin:/usr/gnu/bin:/usr/bin
2605N/ADOXYGEN=/usr/bin/doxygen
2605N/A
2605N/ACOMPONENT_NAME= net-snmp
4070N/ACOMPONENT_VERSION= 5.4.1
4070N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4070N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2605N/ACOMPONENT_ARCHIVE_HASH= sha1:ac5ba033c10d53d3057415121f8c4936c643c208
2605N/A#COMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/net-snmp/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
2605N/ACOMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/OldFiles/net-snmp-5.4.x/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
4070N/A
2605N/A
2605N/Ainclude $(WS_TOP)/make-rules/prep.mk
2605N/Ainclude $(WS_TOP)/make-rules/configure.mk
4070N/Ainclude $(WS_TOP)/make-rules/ips.mk
2605N/A
4070N/ACFLAGS += $(studio_C99_ENABLE)
3661N/ACPPFLAGS += "-DFALSE_SHARING_ALIGN=64"
3996N/A
3996N/ACONFIGURE_OPTIONS += --with-default-snmp-version=3
3996N/ACONFIGURE_OPTIONS += --with-sys-contact="root@localhost"
2605N/ACONFIGURE_OPTIONS += --with-sys-location=Unknown
2605N/ACONFIGURE_OPTIONS += --with-logfile=/var/log/snmpd.log
2605N/ACONFIGURE_OPTIONS += --with-persistent-directory=/var/net-snmp
2605N/A
2605N/ACONFIGURE_OPTIONS += --with-mibdirs=/etc/net-snmp/snmp/mibs
2605N/ACONFIGURE_OPTIONS += --enable-agentx-dom-sock-only
2605N/ACONFIGURE_OPTIONS += --enable-ucd-snmp-compatibility
4070N/ACONFIGURE_OPTIONS += --enable-ipv6
2605N/ACONFIGURE_OPTIONS += --enable-mfd-rewrites
4070N/ACONFIGURE_OPTIONS += --with-pkcs
2605N/ACONFIGURE_OPTIONS += --with-transports="UDP TCP UDPIPv6 TCPIPv6"
4070N/A
2900N/A# Which MIB modules do we want to build
4070N/AMIB_MOBULES.sparc = ucd-snmp/lmSensors
4070N/AMIB_MODULES = host disman/event-mib ucd-snmp/diskio udp-mib tcp-mib if-mib
4070N/AMIB_MOBULES += $(MIB_MODULES.$(MACH))
4070N/ACONFIGURE_OPTIONS += --with-mib-modules="$(MIB_MODULES)"
2605N/A
2900N/A# Only build 32 bit Perl support
4070N/APERL_ARGS = DESTDIR=$(PROTO_DIR) INSTALLDIRS=vendor
4070N/ACONFIGURE_OPTIONS.32 += PERLPROG="$(PERL)"
4070N/ACONFIGURE_OPTIONS.32 += --with-perl-modules="$(PERL_ARGS)"
4070N/ACONFIGURE_OPTIONS.32 += --disable-perl-cc-checks
4070N/A
4070N/ACONFIGURE_OPTIONS.64 += --disable-embedded-perl
4070N/ACONFIGURE_OPTIONS.64 += --without-perl-modules
4070N/A
4070N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
4070N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
4070N/ACONFIGURE_OPTIONS += CC="$(CC)"
4070N/A
4070N/APKG_MACROS += BUILD_DIR=$(BUILD_DIR)
4070N/A
4070N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
4070N/A ($(CLONEY) $(SOURCE_DIR) $(@D); $(CLONEY) $(COMPONENT_DIR)/sun $(@D)/sun)
4070N/A
4070N/A# for the goofy definition of ARCH in the extra Makefiles
2900N/AARCH=32
4070N/AARCH=$(BITS:64=$(MACH64))
4070N/A
4070N/ACCSMAKE_ARGS = CC="$(CC)" CFGPREFIX=/usr CFGLIB64=/usr/lib/$(MACH64)
4070N/ACCSMAKE_ARGS += CFGLIB=/usr/lib ARCH=$(ARCH) ROOT=$(PROTO_DIR)
4070N/A
4070N/A$(BUILD_32): COMPONENT_POST_BUILD_ACTION= \
2605N/A (cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
2605N/A
2605N/A$(BUILD_64): COMPONENT_POST_BUILD_ACTION= \
2605N/A (cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
2605N/A
2605N/A$(INSTALL_32): COMPONENT_POST_INSTALL_ACTION= \
2605N/A ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH)/etc/net-snmp/snmp/mibs; \
2605N/A cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
2605N/A
4312N/A$(INSTALL_64): COMPONENT_POST_INSTALL_ACTION= \
3996N/A ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH64)/etc/net-snmp/snmp/mibs; \
3996N/A cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
4070N/A
3996N/A# common targets
4070N/Abuild: $(BUILD_32_and_64) $(BUILD_DIR_32)/.docs
3996N/A
3996N/A$(INSTALL_64): COMPONENT_INSTALL_ARGS += DESTDIR=$(BUILD_DIR)/prototype/$(MACH64)
3996N/A
3996N/Ainstall: build $(INSTALL_32_and_64)
3996N/A
3996N/Atest: $(BUILD_32)
3996N/A $(KSH93) ./run-tests $(BUILD_DIR) $(MACH32) $(MACH64)
3996N/A
3996N/A# build the docs
3996N/A$(BUILD_DIR_32)/.docs:
4070N/A (cd $(@D) ; $(ENV) srcdir=$(@D) $(DOXYGEN) -u $(@D)/doxygen.conf ; \
4070N/A $(ENV) srcdir=$(@D) $(DOXYGEN) $(@D)/doxygen.conf)
4312N/A $(TOUCH) $@
4070N/A