xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile (revision 241c90a06e8d1708235651863df515a2d522a03a)
10d63ce2bSvenki#
20d63ce2bSvenki# CDDL HEADER START
30d63ce2bSvenki#
40d63ce2bSvenki# The contents of this file are subject to the terms of the
50d63ce2bSvenki# Common Development and Distribution License (the "License").
60d63ce2bSvenki# You may not use this file except in compliance with the License.
70d63ce2bSvenki#
80d63ce2bSvenki# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90d63ce2bSvenki# or http://www.opensolaris.org/os/licensing.
100d63ce2bSvenki# See the License for the specific language governing permissions
110d63ce2bSvenki# and limitations under the License.
120d63ce2bSvenki#
130d63ce2bSvenki# When distributing Covered Code, include this CDDL HEADER in each
140d63ce2bSvenki# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150d63ce2bSvenki# If applicable, add the following below this CDDL HEADER, with the
160d63ce2bSvenki# fields enclosed by brackets "[]" replaced with your own identifying
170d63ce2bSvenki# information: Portions Copyright [yyyy] [name of copyright owner]
180d63ce2bSvenki#
190d63ce2bSvenki# CDDL HEADER END
200d63ce2bSvenki#
210d63ce2bSvenki
220d63ce2bSvenki#
2324fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
240d63ce2bSvenki# Use is subject to license terms.
250d63ce2bSvenki#
26*0409f346SPeter Tribble# Copyright 2019 Peter Tribble.
27*0409f346SPeter Tribble#
280d63ce2bSvenki
290d63ce2bSvenkiLIBRARY=	libpiclsnmp.a
300d63ce2bSvenkiVERS=		.1
31*0409f346SPeter TribbleOBJECTS=	snmplib.o pdu.o asn1.o
320d63ce2bSvenki
330d63ce2bSvenki# include library definitions
340d63ce2bSvenkiinclude $(SRC)/Makefile.psm
350d63ce2bSvenkiinclude $(SRC)/lib/Makefile.lib
360d63ce2bSvenki
370d63ce2bSvenkiROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v
380d63ce2bSvenki
390d63ce2bSvenkiinclude $(SRC)/cmd/picl/plugins/Makefile.com
400d63ce2bSvenki
410d63ce2bSvenkiSRCS=		$(OBJECTS:%.o=%.c)
420d63ce2bSvenki
430d63ce2bSvenkiLIBS=		$(DYNLIB)
440d63ce2bSvenki
450d63ce2bSvenkiROOTLIBDIR      = $(ROOT_PLATFORM)/lib
460d63ce2bSvenki
470d63ce2bSvenkiCLOBBERFILES += $(LIBLINKS)
480d63ce2bSvenki
490d63ce2bSvenkiCPPFLAGS +=	-I. -I../../include -I$(SRC)/uts/sun4v
500d63ce2bSvenkiCPPFLAGS +=	-D_REENTRANT
510d63ce2bSvenki
520d63ce2bSvenki#
530d63ce2bSvenki# Do NOT uncomment the following two lines, unless you want to test
540d63ce2bSvenki# the behavior of the library with an SNMP agent over network.
550d63ce2bSvenki#
560d63ce2bSvenki#CPPFLAGS +=	-DUSE_SOCKETS
570d63ce2bSvenki#LDLIBS +=	-lsocket -lnsl
580d63ce2bSvenki
590d63ce2bSvenkiCFLAGS +=	$(CCVERBOSE) -DBIG_ENDIAN
600d63ce2bSvenkiLDLIBS +=	-lc -lnvpair
610d63ce2bSvenki
620d63ce2bSvenki.KEEP_STATE:
630d63ce2bSvenki
640d63ce2bSvenki
650d63ce2bSvenkiSUBDIRS=
660d63ce2bSvenki
670d63ce2bSvenkiall :=		TARGET= all
680d63ce2bSvenkiinstall :=	TARGET= install
690d63ce2bSvenkiclean :=	TARGET= clean
700d63ce2bSvenkiclobber :=	TARGET= clobber
710d63ce2bSvenki
720d63ce2bSvenkiall:  $(DYNLIB) $(LIBLINKS)
730d63ce2bSvenki
740d63ce2bSvenkiinstall:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
750d63ce2bSvenki
760d63ce2bSvenki$(LIBLINKS):	FRC
770d63ce2bSvenki	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
780d63ce2bSvenki
790d63ce2bSvenki# include library targets
800d63ce2bSvenkiinclude $(SRC)/cmd/picl/plugins/Makefile.targ
810d63ce2bSvenkiinclude $(SRC)/lib/Makefile.targ
820d63ce2bSvenki
830d63ce2bSvenkilint :
840d63ce2bSvenki
850d63ce2bSvenki$(SUBDIRS): FRC
860d63ce2bSvenki	@cd $@; pwd; $(MAKE) $(TARGET)
870d63ce2bSvenki
880d63ce2bSvenkiFRC:
89