xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile (revision d91236fe104c7ea63142e053b22a39c8a30d304b)
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#pragma ident	"%Z%%M%	%I%	%E% SMI"
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 debug.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
50ROOTLIBDIR      := OWNER = root
51ROOTLIBDIR      := GROUP = sys
52
53CLEANFILES=	$(LINTOUT) $(LINTLIB)
54CLOBBERFILES += $(LIBLINKS)
55
56CPPFLAGS +=	-I. -I../../include -I$(SRC)/uts/sun4v
57CPPFLAGS +=	-D_REENTRANT
58
59#
60# Be careful when enabling SNMP_DEBUG; the debug log can quickly grow
61# very very large. Never run cycle stress test with SNMP_DEBUG enabled!
62#
63#CPPFLAGS +=	-DSNMP_DEBUG
64
65#
66# Do NOT uncomment the following two lines, unless you want to test
67# the behavior of the library with an SNMP agent over network.
68#
69#CPPFLAGS +=	-DUSE_SOCKETS
70#LDLIBS +=	-lsocket -lnsl
71
72CFLAGS +=	$(CCVERBOSE) -DBIG_ENDIAN
73LDLIBS +=	-lc -lnvpair
74
75# It's OK not to build debug.c except when SNMP_DEBUG is enabled.
76# Don't let lint complain about it.
77#
78ALWAYS_LINT_DEFS +=	-erroff=E_EMPTY_TRANSLATION_UNIT
79
80.KEEP_STATE:
81
82
83SUBDIRS=
84
85all :=		TARGET= all
86install :=	TARGET= install
87clean :=	TARGET= clean
88clobber :=	TARGET= clobber
89lint :=		TARGET= lint
90
91all:  $(DYNLIB) $(LIBLINKS)
92
93install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
94
95$(LIBLINKS):	FRC
96	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
97
98# include library targets
99include $(SRC)/cmd/picl/plugins/Makefile.targ
100include $(SRC)/lib/Makefile.targ
101
102lint :
103	$(LINT.c) -m $(SRCS)
104
105$(SUBDIRS): FRC
106	@cd $@; pwd; $(MAKE) $(TARGET)
107
108FRC:
109