xref: /titanic_51/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile (revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4)
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
27#
28# cmd/picl/plugins/sun4v/lib/snmp/Makefile
29#
30
31LIBRARY=	libpiclsnmp.a
32VERS=		.1
33OBJECTS=	snmplib.o pdu.o asn1.o debug.o
34
35# include library definitions
36include $(SRC)/Makefile.psm
37include $(SRC)/lib/Makefile.lib
38
39ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v
40
41include $(SRC)/cmd/picl/plugins/Makefile.com
42
43SRCS=		$(OBJECTS:%.o=%.c)
44
45LIBS=		$(DYNLIB)
46
47ROOTLIBDIR      = $(ROOT_PLATFORM)/lib
48
49CLEANFILES=	$(LINTOUT) $(LINTLIB)
50CLOBBERFILES += $(LIBLINKS)
51
52CPPFLAGS +=	-I. -I../../include -I$(SRC)/uts/sun4v
53CPPFLAGS +=	-D_REENTRANT
54
55#
56# Be careful when enabling SNMP_DEBUG; the debug log can quickly grow
57# very very large. Never run cycle stress test with SNMP_DEBUG enabled!
58#
59#CPPFLAGS +=	-DSNMP_DEBUG
60
61#
62# Do NOT uncomment the following two lines, unless you want to test
63# the behavior of the library with an SNMP agent over network.
64#
65#CPPFLAGS +=	-DUSE_SOCKETS
66#LDLIBS +=	-lsocket -lnsl
67
68CFLAGS +=	$(CCVERBOSE) -DBIG_ENDIAN
69LDLIBS +=	-lc -lnvpair
70
71# It's OK not to build debug.c except when SNMP_DEBUG is enabled.
72# Don't let lint complain about it.
73#
74ALWAYS_LINT_DEFS +=	-erroff=E_EMPTY_TRANSLATION_UNIT
75
76.KEEP_STATE:
77
78
79SUBDIRS=
80
81all :=		TARGET= all
82install :=	TARGET= install
83clean :=	TARGET= clean
84clobber :=	TARGET= clobber
85lint :=		TARGET= lint
86
87all:  $(DYNLIB) $(LIBLINKS)
88
89install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
90
91$(LIBLINKS):	FRC
92	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
93
94# include library targets
95include $(SRC)/cmd/picl/plugins/Makefile.targ
96include $(SRC)/lib/Makefile.targ
97
98lint :
99	$(LINT.c) -m $(SRCS)
100
101$(SUBDIRS): FRC
102	@cd $@; pwd; $(MAKE) $(TARGET)
103
104FRC:
105