Cross Reference: /solaris-userland/components/net-snmp-57/Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
# net-snmp has a "special" build where only 32-bit items are installed into
# proto area; so prefer 32-bit to preserve existing sourcing.
BUILD_BITS= 32_and_64
include ../../make-rules/shared-macros.mk
PATH=$(SPRO_VROOT)/bin:$(GNUBIN):$(USRBINDIR)
COMPONENT_NAME= net-snmp
COMPONENT_VERSION= 5.7.2.1
COMPONENT_PROJECT_URL= http://www.net-snmp.org/
COMPONENT_ARCHIVE_HASH= \
sha256:35dd20a2b17849f6d5a0a6109b4f52c1a777a3e1a00c79c4a175c520d23f3497
COMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/net-snmp/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= service/net-snmp utility/net-snmp library/net-snmp
TPNO= 13120
BUILD_32_and_64 += $(BUILD_DIR_32)/.docs
INSTALL_TARGET= build $(INSTALL_32_and_64)
include $(WS_MAKE_RULES)/common.mk
studio_C99MODE= $(studio_C99_ENABLE)
CPPFLAGS += "-DFALSE_SHARING_ALIGN=64"
CONFIGURE_ENV += PYTHONPROG=$(PYTHON.$(BITS))
CONFIGURE_OPTIONS += --with-default-snmp-version=3
CONFIGURE_OPTIONS += --with-sys-contact="root@localhost"
CONFIGURE_OPTIONS += --with-sys-location=Unknown
CONFIGURE_OPTIONS += --with-logfile=$(VARDIR)/log/snmpd.log
CONFIGURE_OPTIONS += --with-persistent-directory=$(VARDIR)/net-snmp
CONFIGURE_OPTIONS += --with-mibdirs=$(ETCDIR)/net-snmp/snmp/mibs
CONFIGURE_OPTIONS += --datadir=$(ETCDIR)/net-snmp
CONFIGURE_OPTIONS += --enable-agentx-dom-sock-only
CONFIGURE_OPTIONS += --enable-ucd-snmp-compatibility
CONFIGURE_OPTIONS += --enable-ipv6
CONFIGURE_OPTIONS += --enable-mfd-rewrites
CONFIGURE_OPTIONS += --with-openssl=/lib/openssl
CONFIGURE_OPTIONS += --with-transports="UDP TCP UDPIPv6 TCPIPv6"
CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/net-snmp
# Which MIB modules do we want to build
MIB_MOBULES.sparc = ucd-snmp/lmSensors
MIB_MODULES = host disman/event-mib ucd-snmp/diskio udp-mib tcp-mib if-mib
MIB_MOBULES += $(MIB_MODULES.$(MACH))
CONFIGURE_OPTIONS += --with-mib-modules="$(MIB_MODULES)"
# Python bindings support.
PYTHON_ARGS = --basedir=/usr/bin
CONFIGURE_OPTIONS += --with-python-modules="$(PYTHON_ARGS)"
# Only build 64 bit Perl support
PERL_ARGS = DESTDIR=$(PROTO_DIR) INSTALLDIRS=vendor
CONFIGURE_OPTIONS.32 += --disable-embedded-perl
CONFIGURE_OPTIONS.32 += --without-perl-modules
CONFIGURE_OPTIONS.64 += PERLPROG="$(PERL)"
CONFIGURE_OPTIONS.64 += --with-perl-modules="$(PERL_ARGS)"
CONFIGURE_OPTIONS.64 += --disable-perl-cc-checks
COMPONENT_PRE_CONFIGURE_ACTION = \
($(CLONEY) $(SOURCE_DIR) $(@D); $(CLONEY) $(COMPONENT_DIR)/sun $(@D)/sun)
# for the goofy definition of ARCH in the extra Makefiles
ARCH=32
ARCH=$(BITS:64=$(MACH64))
CCSMAKE_ARGS = CC="$(CC)" CFGPREFIX=$(USRDIR) CFGLIB64=$(USRLIBDIR64)
CCSMAKE_ARGS += CFGLIB=$(USRLIBDIR) ARCH=$(ARCH) ROOT=$(PROTO_DIR)
COMPONENT_TEST_DIR = $(COMPONENT_DIR)
COMPONENT_TEST_CMD = $(KSH93)
COMPONENT_TEST_TARGETS = ./run-tests $(BUILD_DIR) $(MACH32) $(MACH64)
# perl man pages hiding here in 64-bit PROTO_DIR
PKG_PROTO_DIRS += $(BUILD_DIR)/prototype/$(MACH64)
$(BUILD_32): COMPONENT_POST_BUILD_ACTION= \
(cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
$(BUILD_64): COMPONENT_POST_BUILD_ACTION= \
(cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
$(INSTALL_32): COMPONENT_INSTALL_ARGS += PYTHON_VENDOR_PACKAGES=$(PYTHON_VENDOR_PACKAGES)
$(INSTALL_32): COMPONENT_POST_INSTALL_ACTION= \
($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH)/etc/net-snmp/snmp/mibs; \
cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
$(INSTALL_64): COMPONENT_POST_INSTALL_ACTION= \
($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH64)/etc/net-snmp/snmp/mibs; \
cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
$(INSTALL_64): COMPONENT_INSTALL_ARGS += DESTDIR=$(BUILD_DIR)/prototype/$(MACH64)
# build the docs
$(BUILD_DIR_32)/.docs:
(cd $(@D) ; $(ENV) srcdir=$(@D) $(DOXYGEN) -u $(@D)/doxygen.conf ; \
$(ENV) srcdir=$(@D) $(DOXYGEN) $(@D)/doxygen.conf)
$(TOUCH) $@
REQUIRED_PACKAGES += developer/documentation-tool/doxygen
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += $(PERL_PKG)
REQUIRED_PACKAGES += runtime/python-27
REQUIRED_PACKAGES += shell/bash
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
REQUIRED_PACKAGES += system/linker
REQUIRED_PACKAGES += system/management/snmp/net-snmp
REQUIRED_PACKAGES += system/network