xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile (revision 6a817834d81cc75ce12d0d393320837b1fec1e85)
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 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27LIBRARY=	libsnmpplugin.a
28VERS=		.1
29
30OBJS_DIR=	pics
31OBJECTS=	snmpplugin.o
32
33# Include library definitions
34include $(SRC)/lib/Makefile.lib
35include $(SRC)/Makefile.psm
36include $(SRC)/cmd/picl/plugins/Makefile.com
37
38SRCS=		$(OBJECTS:%.o=%.c)
39LIBS =		$(DYNLIB)
40
41ROOT_PLATFORM =	$(USR_PLAT_DIR)/sun4v
42ROOTLIBDIR =	$(ROOT_PLAT_PLUGINDIR)
43
44CPPFLAGS +=	-I. -I../include -I$(SRC)/uts/common/sys
45CPPFLAGS +=	-D_REENTRANT
46
47#
48# Be careful when enabling SNMPPLUGIN_DEBUG. The debug log can quickly
49# grow too large. NEVER stress/cycle test picl with SNMPPLUGIN_DEBUG
50# enabled
51#
52#CPPFLAGS +=	-DSNMPPLUGIN_DEBUG
53
54CFLAGS +=	$(CCVERBOSE)
55LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
56LDLIBS +=	-L$(SRC)/cmd/picl/plugins/sun4v/lib/snmp
57LDLIBS +=	-L$(ROOT)/usr/lib/sparcv9
58LDLIBS +=	-lc -lpicltree -lpiclsnmp
59DYNFLAGS +=	-R/usr/platform/sun4v/lib
60
61POFILE =	snmpplugin_sun4v.po
62POFILES =	$(SRCS:%.c=%.po)
63
64.KEEP_STATE:
65
66all: $(LIBS) $(LIBLINKS)
67
68install:	all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
69
70$(LIBLINKS):	FRC
71	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
72
73# Messages
74_msg:	$(MSGDOMAIN) $(POFILE)
75	$(RM) $(MSGDOMAIN)/$(POFILE)
76	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
77
78$(MSGDOMAIN):
79	$(INS.dir)
80
81$(POFILE):	$(POFILES)
82	$(CAT) $(POFILES) > $(POFILE)
83
84# Include library targets
85include $(SRC)/cmd/picl/plugins/Makefile.targ
86include $(SRC)/lib/Makefile.targ
87
88lint :
89
90FRC:
91