Makefile revision 513
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# CDDL HEADER START
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# The contents of this file are subject to the terms of the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# Common Development and Distribution License (the "License").
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# You may not use this file except in compliance with the License.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# or http://www.opensolaris.org/os/licensing.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# See the License for the specific language governing permissions
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# and limitations under the License.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# When distributing Covered Code, include this CDDL HEADER in each
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# If applicable, add the following below this CDDL HEADER, with the
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# fields enclosed by brackets "[]" replaced with your own identifying
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# CDDL HEADER END
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonPATH=$(SPRO_VROOT)/bin:/usr/gnu/bin:/usr/bin
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCOMPONENT_ARCHIVE_HASH= sha1:ac5ba033c10d53d3057415121f8c4936c643c208
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson#COMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/net-snmp/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCOMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/OldFiles/net-snmp-5.4.x/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-default-snmp-version=3
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-sys-contact="root@localhost"
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-sys-location=Unknown
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-logfile=/var/log/snmpd.log
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-persistent-directory=/var/net-snmp
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-mibdirs=/etc/net-snmp/snmp/mibs
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --datadir=/etc/net-snmp
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --enable-agentx-dom-sock-only
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --enable-ucd-snmp-compatibility
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --enable-mfd-rewrites
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-transports="UDP TCP UDPIPv6 TCPIPv6"
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# Which MIB modules do we want to build
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonMIB_MODULES = host disman/event-mib ucd-snmp/diskio udp-mib tcp-mib if-mib
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += --with-mib-modules="$(MIB_MODULES)"
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# Only build 32 bit Perl support
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonPERL_ARGS = DESTDIR=$(PROTO_DIR) INSTALLDIRS=vendor
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS.32 += PERLPROG="$(PERL)"
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS.32 += --with-perl-modules="$(PERL_ARGS)"
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS.32 += --disable-perl-cc-checks
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS.64 += --disable-embedded-perl
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS.64 += --without-perl-modules
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson ($(CLONEY) $(SOURCE_DIR) $(@D); $(CLONEY) $(COMPONENT_DIR)/sun $(@D)/sun)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# for the goofy definition of ARCH in the extra Makefiles
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCCSMAKE_ARGS = CC="$(CC)" CFGPREFIX=/usr CFGLIB64=/usr/lib/$(MACH64)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas GustafssonCCSMAKE_ARGS += CFGLIB=/usr/lib ARCH=$(ARCH) ROOT=$(PROTO_DIR)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson$(BUILD_32): COMPONENT_POST_BUILD_ACTION= \
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson (cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson$(BUILD_64): COMPONENT_POST_BUILD_ACTION= \
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson (cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson$(INSTALL_32): COMPONENT_POST_INSTALL_ACTION= \
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH)/etc/net-snmp/snmp/mibs; \
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson$(INSTALL_64): COMPONENT_POST_INSTALL_ACTION= \
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH64)/etc/net-snmp/snmp/mibs; \
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# common targets
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafssonbuild: $(BUILD_32_and_64) $(BUILD_DIR_32)/.docs
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson$(INSTALL_64): COMPONENT_INSTALL_ARGS += DESTDIR=$(BUILD_DIR)/prototype/$(MACH64)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson $(KSH93) ./run-tests $(BUILD_DIR) $(MACH32) $(MACH64)
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# build the docs
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson (cd $(@D) ; $(ENV) srcdir=$(@D) $(DOXYGEN) -u $(@D)/doxygen.conf ; \
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson $(ENV) srcdir=$(@D) $(DOXYGEN) $(@D)/doxygen.conf)