xref: /illumos-gate/usr/src/lib/fm/libfmevent/Makefile.com (revision c3e9074d863038c38dc15c3af85b017f42133816)
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 (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25LIBRARY = libfmevent.a
26VERS = .1
27
28LIBSRCS = fmev_subscribe.c \
29	fmev_evaccess.c \
30	fmev_errstring.c \
31	fmev_util.c \
32	fmev_publish.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
44C99MODE = $(C99_ENABLE)
45
46CPPFLAGS += -I../common -I.
47$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
48
49CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
50CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
51$(DYNLIB) := LDLIBS += -lumem -lnvpair -luutil -lsysevent -L$(ROOTLIBDIR) \
52	-ltopo -lc
53
54LINTFLAGS = -msux
55LINTFLAGS64 = -msux -m64
56
57$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
58$(LINTLIB) := LINTFLAGS = -nsvx
59$(LINTLIB) := LINTFLAGS64 = -nsvx -m64
60
61CLEANFILES += ../common/fmev_errstring.c
62
63.KEEP_STATE:
64
65all: $(LIBS)
66
67lint: $(LINTLIB) lintcheck
68
69pics/%.o: ../$(MACH)/%.c
70	$(COMPILE.c) -o $@ $<
71	$(POST_PROCESS_O)
72
73../common/fmev_errstring.c: ../common/mkerror.sh ../common/libfmevent.h
74	sh ../common/mkerror.sh ../common/libfmevent.h > $@
75
76%.o: ../common/%.c
77	$(COMPILE.c) -o $@ $<
78	$(POST_PROCESS_O)
79
80include ../../../Makefile.targ
81include ../../Makefile.targ
82