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