xref: /illumos-gate/usr/src/lib/fm/libfmd_snmp/Makefile.com (revision 30698f336503439d11933541bc5fac87b3f8b916)
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 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29
30LIBRARY = libfmd_snmp.a
31VERS = .1
32
33LIBSRCS = \
34	debug_subr.c	\
35	init.c		\
36	module.c	\
37	problem.c	\
38	resource.c	\
39	scheme.c
40
41OBJECTS = $(LIBSRCS:%.c=%.o)
42
43include ../../../Makefile.lib
44include ../../Makefile.lib
45
46SRCS = $(LIBSRCS:%.c=../common/%.c)
47LIBS = $(DYNLIB) $(LINTLIB)
48
49SRCDIR = ../common
50SPECMAPFILE = $(MAPDIR)/mapfile
51
52CPPFLAGS += -I../common -I. -I/usr/sfw/include
53$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
54CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
55CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
56
57# No lint libraries are delivered for Net-SNMP yet
58SNMPLIBS = -L$(SFWLIBDIR) -lnetsnmp -lnetsnmphelpers -lnetsnmpagent
59lint := SNMPLIBS=
60
61LDLIBS += $(MACH_LDLIBS)
62LDLIBS += -lfmd_adm -luutil -lnvpair
63LDLIBS += $(SNMPLIBS)
64LDLIBS += -lc
65DYNFLAGS += -R$(SFWLIBDIR)
66
67LINTFLAGS = -msux
68LINTFLAGS64 = -msux -Xarch=$(MACH64:sparcv9=v9)
69
70# Net-SNMP's headers use do {} while (0) a lot
71LINTCHECKFLAGS += -erroff=E_CONSTANT_CONDITION
72
73$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
74$(LINTLIB) := LINTFLAGS = -nsvx
75$(LINTLIB) := LINTFLAGS64 = -nsvx -Xarch=$(MACH64:sparcv9=v9)
76
77.KEEP_STATE:
78
79all: $(LIBS)
80
81lint: $(LINTLIB) lintcheck
82
83pics/%.o: ../$(MACH)/%.c
84	$(COMPILE.c) -o $@ $<
85	$(POST_PROCESS_O)
86
87%.o: ../common/%.c
88	$(COMPILE.c) -o $@ $<
89	$(POST_PROCESS_O)
90
91include ../../../Makefile.targ
92include ../../Makefile.targ
93