0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# CDDL HEADER START
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# The contents of this file are subject to the terms of the
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Common Development and Distribution License (the "License").
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# You may not use this file except in compliance with the License.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# or http://www.opensolaris.org/os/licensing.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# See the License for the specific language governing permissions
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# and limitations under the License.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# When distributing Covered Code, include this CDDL HEADER in each
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# If applicable, add the following below this CDDL HEADER, with the
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# fields enclosed by brackets "[]" replaced with your own identifying
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# information: Portions Copyright [yyyy] [name of copyright owner]
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# CDDL HEADER END
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
24fe0b3bf671e123467ce1df0b67cadd3614c8e4jmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Use is subject to license terms.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# cmd/picl/plugins/sun4v/lib/snmp/Makefile
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiLIBRARY= libpiclsnmp.a
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiVERS= .1
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiOBJECTS= snmplib.o pdu.o asn1.o debug.o
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# include library definitions
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinclude $(SRC)/Makefile.psm
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinclude $(SRC)/lib/Makefile.lib
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinclude $(SRC)/cmd/picl/plugins/Makefile.com
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiSRCS= $(OBJECTS:%.o=%.c)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiLIBS= $(DYNLIB)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiROOTLIBDIR = $(ROOT_PLATFORM)/lib
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiCLEANFILES= $(LINTOUT) $(LINTLIB)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiCLOBBERFILES += $(LIBLINKS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiCPPFLAGS += -I. -I../../include -I$(SRC)/uts/sun4v
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiCPPFLAGS += -D_REENTRANT
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Be careful when enabling SNMP_DEBUG; the debug log can quickly grow
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# very very large. Never run cycle stress test with SNMP_DEBUG enabled!
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#CPPFLAGS += -DSNMP_DEBUG
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Do NOT uncomment the following two lines, unless you want to test
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# the behavior of the library with an SNMP agent over network.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#CPPFLAGS += -DUSE_SOCKETS
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#LDLIBS += -lsocket -lnsl
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiCFLAGS += $(CCVERBOSE) -DBIG_ENDIAN
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiLDLIBS += -lc -lnvpair
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# It's OK not to build debug.c except when SNMP_DEBUG is enabled.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# Don't let lint complain about it.
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki#
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiALWAYS_LINT_DEFS += -erroff=E_EMPTY_TRANSLATION_UNIT
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki.KEEP_STATE:
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiSUBDIRS=
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiall := TARGET= all
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinstall := TARGET= install
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiclean := TARGET= clean
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiclobber := TARGET= clobber
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkilint := TARGET= lint
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiall: $(DYNLIB) $(LIBLINKS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinstall: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki$(LIBLINKS): FRC
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki $(RM) $@; $(SYMLINK) $(DYNLIB) $@
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki# include library targets
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinclude $(SRC)/cmd/picl/plugins/Makefile.targ
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiinclude $(SRC)/lib/Makefile.targ
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkilint :
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki $(LINT.c) -m $(SRCS)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki$(SUBDIRS): FRC
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki @cd $@; pwd; $(MAKE) $(TARGET)
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenki
0d63ce2b32a9e1cc8ed71d4d92536c44d66a530avenkiFRC: