xref: /illumos-gate/usr/src/lib/fm/libfmevent/Makefile.com (revision 89b2a9fbeabf42fa54594df0e5927bcc50a07cc9)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26LIBRARY = libfmevent.a
27VERS = .1
28
29LIBSRCS = fmev_subscribe.c \
30	fmev_evaccess.c \
31	fmev_errstring.c \
32	fmev_util.c
33
34OBJECTS = $(LIBSRCS:%.c=%.o)
35
36include ../../../Makefile.lib
37include ../../Makefile.lib
38
39SRCS = $(LIBSRCS:%.c=../common/%.c)
40LIBS = $(DYNLIB) $(LINTLIB)
41
42SRCDIR =	../common
43
44CPPFLAGS += -I../common -I.
45$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
46
47CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
48CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
49LDLIBS += -lumem -lnvpair -luutil -lsysevent -lc
50
51LINTFLAGS = -msux
52LINTFLAGS64 = -msux -m64
53
54$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
55$(LINTLIB) := LINTFLAGS = -nsvx
56$(LINTLIB) := LINTFLAGS64 = -nsvx -m64
57
58CLEANFILES += ../common/fmev_errstring.c
59
60.KEEP_STATE:
61
62all: $(LIBS)
63
64lint: $(LINTLIB) lintcheck
65
66pics/%.o: ../$(MACH)/%.c
67	$(COMPILE.c) -o $@ $<
68	$(POST_PROCESS_O)
69
70../common/fmev_errstring.c: ../common/mkerror.sh ../common/libfmevent.h
71	sh ../common/mkerror.sh ../common/libfmevent.h > $@
72
73%.o: ../common/%.c
74	$(COMPILE.c) -o $@ $<
75	$(POST_PROCESS_O)
76
77include ../../../Makefile.targ
78include ../../Makefile.targ
79