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