16 # fields enclosed by brackets "[]" replaced with your own identifying |
16 # fields enclosed by brackets "[]" replaced with your own identifying |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
|
21 |
|
22 # |
21 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
22 # |
24 # |
23 |
25 # net-snmp has a "special" build where only 32-bit items are installed into |
|
26 # proto area; so prefer 32-bit to preserve existing sourcing. |
|
27 BUILD_BITS= 32_and_64 |
24 include ../../make-rules/shared-macros.mk |
28 include ../../make-rules/shared-macros.mk |
25 |
29 |
26 PATH=$(SPRO_VROOT)/bin:/usr/gnu/bin:/usr/bin |
30 PATH=$(SPRO_VROOT)/bin:$(GNUBIN):$(USRBINDIR) |
27 DOXYGEN=/usr/bin/doxygen |
|
28 |
31 |
29 COMPONENT_NAME= net-snmp |
32 COMPONENT_NAME= net-snmp |
30 COMPONENT_VERSION= 5.4.1 |
33 COMPONENT_VERSION= 5.4.1 |
31 COMPONENT_PROJECT_URL= http://www.net-snmp.org/ |
34 COMPONENT_PROJECT_URL= http://www.net-snmp.org/ |
32 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
33 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
|
34 COMPONENT_ARCHIVE_HASH= \ |
35 COMPONENT_ARCHIVE_HASH= \ |
35 sha256:0ea976722c993c87dede8eb6348e6feb059e3851bbef2de824bf18ac97cdb565 |
36 sha256:0ea976722c993c87dede8eb6348e6feb059e3851bbef2de824bf18ac97cdb565 |
36 #COMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/net-snmp/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
37 #COMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/net-snmp/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
37 COMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/OldFiles/net-snmp-5.4.x/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
38 COMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/OldFiles/net-snmp-5.4.x/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
38 COMPONENT_BUGDB= service/net-snmp utility/net-snmp library/net-snmp |
39 COMPONENT_BUGDB= service/net-snmp utility/net-snmp library/net-snmp |
39 |
40 |
40 TPNO= 5702 |
41 TPNO= 5702 |
41 |
42 |
42 include $(WS_MAKE_RULES)/prep.mk |
43 BUILD_32_and_64 += $(BUILD_DIR_32)/.docs |
43 include $(WS_MAKE_RULES)/configure.mk |
44 INSTALL_TARGET= build $(INSTALL_32_and_64) |
44 include $(WS_MAKE_RULES)/ips.mk |
45 include $(WS_MAKE_RULES)/common.mk |
45 |
46 |
46 CFLAGS += $(studio_C99_ENABLE) |
47 studio_C99MODE= $(studio_C99_ENABLE) |
47 CPPFLAGS += "-DFALSE_SHARING_ALIGN=64" |
48 CPPFLAGS += "-DFALSE_SHARING_ALIGN=64" |
48 |
49 |
49 CONFIGURE_ENV += PYTHONPROG=$(PYTHON.$(BITS)) |
50 CONFIGURE_ENV += PYTHONPROG=$(PYTHON.$(BITS)) |
50 |
51 |
51 CONFIGURE_OPTIONS += --with-default-snmp-version=3 |
52 CONFIGURE_OPTIONS += --with-default-snmp-version=3 |
52 CONFIGURE_OPTIONS += --with-sys-contact="root@localhost" |
53 CONFIGURE_OPTIONS += --with-sys-contact="root@localhost" |
53 CONFIGURE_OPTIONS += --with-sys-location=Unknown |
54 CONFIGURE_OPTIONS += --with-sys-location=Unknown |
54 CONFIGURE_OPTIONS += --with-logfile=/var/log/snmpd.log |
55 CONFIGURE_OPTIONS += --with-logfile=$(VARDIR)/log/snmpd.log |
55 CONFIGURE_OPTIONS += --with-persistent-directory=/var/net-snmp |
56 CONFIGURE_OPTIONS += --with-persistent-directory=$(VARDIR)/net-snmp |
56 |
57 |
57 CONFIGURE_OPTIONS += --with-mibdirs=/etc/net-snmp/snmp/mibs |
58 CONFIGURE_OPTIONS += --with-mibdirs=$(ETCDIR)/net-snmp/snmp/mibs |
58 CONFIGURE_OPTIONS += --datadir=/etc/net-snmp |
59 CONFIGURE_OPTIONS += --datadir=$(ETCDIR)/net-snmp |
59 CONFIGURE_OPTIONS += --enable-agentx-dom-sock-only |
60 CONFIGURE_OPTIONS += --enable-agentx-dom-sock-only |
60 CONFIGURE_OPTIONS += --enable-ucd-snmp-compatibility |
61 CONFIGURE_OPTIONS += --enable-ucd-snmp-compatibility |
61 CONFIGURE_OPTIONS += --enable-ipv6 |
62 CONFIGURE_OPTIONS += --enable-ipv6 |
62 CONFIGURE_OPTIONS += --enable-mfd-rewrites |
63 CONFIGURE_OPTIONS += --enable-mfd-rewrites |
63 CONFIGURE_OPTIONS += --with-pkcs |
64 CONFIGURE_OPTIONS += --with-pkcs |
64 CONFIGURE_OPTIONS += --with-transports="UDP TCP UDPIPv6 TCPIPv6" |
65 CONFIGURE_OPTIONS += --with-transports="UDP TCP UDPIPv6 TCPIPv6" |
65 CONFIGURE_OPTIONS += --sysconfdir=/etc/net-snmp |
66 CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/net-snmp |
66 |
67 |
67 # Which MIB modules do we want to build |
68 # Which MIB modules do we want to build |
68 MIB_MOBULES.sparc = ucd-snmp/lmSensors |
69 MIB_MOBULES.sparc = ucd-snmp/lmSensors |
69 MIB_MODULES = host disman/event-mib ucd-snmp/diskio udp-mib tcp-mib if-mib |
70 MIB_MODULES = host disman/event-mib ucd-snmp/diskio udp-mib tcp-mib if-mib |
70 MIB_MOBULES += $(MIB_MODULES.$(MACH)) |
71 MIB_MOBULES += $(MIB_MODULES.$(MACH)) |
80 CONFIGURE_OPTIONS.32 += --without-perl-modules |
81 CONFIGURE_OPTIONS.32 += --without-perl-modules |
81 CONFIGURE_OPTIONS.64 += PERLPROG="$(PERL)" |
82 CONFIGURE_OPTIONS.64 += PERLPROG="$(PERL)" |
82 CONFIGURE_OPTIONS.64 += --with-perl-modules="$(PERL_ARGS)" |
83 CONFIGURE_OPTIONS.64 += --with-perl-modules="$(PERL_ARGS)" |
83 CONFIGURE_OPTIONS.64 += --disable-perl-cc-checks |
84 CONFIGURE_OPTIONS.64 += --disable-perl-cc-checks |
84 |
85 |
85 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
86 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
|
87 CONFIGURE_OPTIONS += CC="$(CC)" |
|
88 |
|
89 COMPONENT_PRE_CONFIGURE_ACTION = \ |
86 COMPONENT_PRE_CONFIGURE_ACTION = \ |
90 ($(CLONEY) $(SOURCE_DIR) $(@D); $(CLONEY) $(COMPONENT_DIR)/sun $(@D)/sun) |
87 ($(CLONEY) $(SOURCE_DIR) $(@D); $(CLONEY) $(COMPONENT_DIR)/sun $(@D)/sun) |
91 |
88 |
92 # for the goofy definition of ARCH in the extra Makefiles |
89 # for the goofy definition of ARCH in the extra Makefiles |
93 ARCH=32 |
90 ARCH=32 |
94 ARCH=$(BITS:64=$(MACH64)) |
91 ARCH=$(BITS:64=$(MACH64)) |
95 |
92 |
96 CCSMAKE_ARGS = CC="$(CC)" CFGPREFIX=/usr CFGLIB64=/usr/lib/$(MACH64) |
93 CCSMAKE_ARGS = CC="$(CC)" CFGPREFIX=$(USRDIR) CFGLIB64=$(USRLIBDIR64) |
97 CCSMAKE_ARGS += CFGLIB=/usr/lib ARCH=$(ARCH) ROOT=$(PROTO_DIR) |
94 CCSMAKE_ARGS += CFGLIB=$(USRLIBDIR) ARCH=$(ARCH) ROOT=$(PROTO_DIR) |
98 |
95 |
99 COMPONENT_TEST_DIR = $(COMPONENT_DIR) |
96 COMPONENT_TEST_DIR = $(COMPONENT_DIR) |
100 COMPONENT_TEST_CMD = $(KSH93) |
97 COMPONENT_TEST_CMD = $(KSH93) |
101 COMPONENT_TEST_TARGETS = ./run-tests $(BUILD_DIR) $(MACH32) $(MACH64) |
98 COMPONENT_TEST_TARGETS = ./run-tests $(BUILD_DIR) $(MACH32) $(MACH64) |
102 |
99 |
117 |
114 |
118 $(INSTALL_64): COMPONENT_POST_INSTALL_ACTION= \ |
115 $(INSTALL_64): COMPONENT_POST_INSTALL_ACTION= \ |
119 ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH64)/etc/net-snmp/snmp/mibs; \ |
116 ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH64)/etc/net-snmp/snmp/mibs; \ |
120 cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install) |
117 cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install) |
121 |
118 |
122 # common targets |
|
123 configure: $(CONFIGURE_32_and_64) |
|
124 |
|
125 build: $(BUILD_32_and_64) $(BUILD_DIR_32)/.docs |
|
126 |
|
127 $(INSTALL_64): COMPONENT_INSTALL_ARGS += DESTDIR=$(BUILD_DIR)/prototype/$(MACH64) |
119 $(INSTALL_64): COMPONENT_INSTALL_ARGS += DESTDIR=$(BUILD_DIR)/prototype/$(MACH64) |
128 |
|
129 install: build $(INSTALL_32_and_64) |
|
130 |
|
131 test: $(TEST_32_and_64) |
|
132 |
|
133 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
134 |
120 |
135 # build the docs |
121 # build the docs |
136 $(BUILD_DIR_32)/.docs: |
122 $(BUILD_DIR_32)/.docs: |
137 (cd $(@D) ; $(ENV) srcdir=$(@D) $(DOXYGEN) -u $(@D)/doxygen.conf ; \ |
123 (cd $(@D) ; $(ENV) srcdir=$(@D) $(DOXYGEN) -u $(@D)/doxygen.conf ; \ |
138 $(ENV) srcdir=$(@D) $(DOXYGEN) $(@D)/doxygen.conf) |
124 $(ENV) srcdir=$(@D) $(DOXYGEN) $(@D)/doxygen.conf) |