xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile (revision 8226594fdd4479be135127f43632f1f995074654)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Copyright 2019 Peter Tribble.
27#
28
29LIBRARY=	libpiclsnmp.a
30VERS=		.1
31OBJECTS=	snmplib.o pdu.o asn1.o
32
33# include library definitions
34include $(SRC)/Makefile.psm
35include $(SRC)/lib/Makefile.lib
36
37ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v
38
39include $(SRC)/cmd/picl/plugins/Makefile.com
40
41SRCS=		$(OBJECTS:%.o=%.c)
42
43LIBS=		$(DYNLIB)
44
45ROOTLIBDIR      = $(ROOT_PLATFORM)/lib
46
47CLOBBERFILES += $(LIBLINKS)
48
49CPPFLAGS +=	-I. -I../../include -I$(SRC)/uts/sun4v
50CPPFLAGS +=	-D_REENTRANT
51
52#
53# Do NOT uncomment the following two lines, unless you want to test
54# the behavior of the library with an SNMP agent over network.
55#
56#CPPFLAGS +=	-DUSE_SOCKETS
57#LDLIBS +=	-lsocket -lnsl
58
59CFLAGS +=	$(CCVERBOSE) -DBIG_ENDIAN
60LDLIBS +=	-lc -lnvpair
61
62.KEEP_STATE:
63
64
65SUBDIRS=
66
67all :=		TARGET= all
68install :=	TARGET= install
69clean :=	TARGET= clean
70clobber :=	TARGET= clobber
71
72all:  $(DYNLIB) $(LIBLINKS)
73
74install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
75
76$(LIBLINKS):	FRC
77	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
78
79# include library targets
80include $(SRC)/cmd/picl/plugins/Makefile.targ
81include $(SRC)/lib/Makefile.targ
82
83lint :
84
85$(SUBDIRS): FRC
86	@cd $@; pwd; $(MAKE) $(TARGET)
87
88FRC:
89