xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile (revision 0409f346a11d84a1549a8e4e2acb42fa4561e8c2)
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
29#
30# cmd/picl/plugins/sun4v/lib/snmp/Makefile
31#
32
33LIBRARY=	libpiclsnmp.a
34VERS=		.1
35OBJECTS=	snmplib.o pdu.o asn1.o
36
37# include library definitions
38include $(SRC)/Makefile.psm
39include $(SRC)/lib/Makefile.lib
40
41ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v
42
43include $(SRC)/cmd/picl/plugins/Makefile.com
44
45SRCS=		$(OBJECTS:%.o=%.c)
46
47LIBS=		$(DYNLIB)
48
49ROOTLIBDIR      = $(ROOT_PLATFORM)/lib
50
51CLEANFILES=	$(LINTOUT) $(LINTLIB)
52CLOBBERFILES += $(LIBLINKS)
53
54CPPFLAGS +=	-I. -I../../include -I$(SRC)/uts/sun4v
55CPPFLAGS +=	-D_REENTRANT
56
57#
58# Do NOT uncomment the following two lines, unless you want to test
59# the behavior of the library with an SNMP agent over network.
60#
61#CPPFLAGS +=	-DUSE_SOCKETS
62#LDLIBS +=	-lsocket -lnsl
63
64CFLAGS +=	$(CCVERBOSE) -DBIG_ENDIAN
65LDLIBS +=	-lc -lnvpair
66
67.KEEP_STATE:
68
69
70SUBDIRS=
71
72all :=		TARGET= all
73install :=	TARGET= install
74clean :=	TARGET= clean
75clobber :=	TARGET= clobber
76lint :=		TARGET= lint
77
78all:  $(DYNLIB) $(LIBLINKS)
79
80install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
81
82$(LIBLINKS):	FRC
83	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
84
85# include library targets
86include $(SRC)/cmd/picl/plugins/Makefile.targ
87include $(SRC)/lib/Makefile.targ
88
89lint :
90	$(LINT.c) -m $(SRCS)
91
92$(SUBDIRS): FRC
93	@cd $@; pwd; $(MAKE) $(TARGET)
94
95FRC:
96