xref: /titanic_50/usr/src/lib/fm/libfmevent/Makefile.com (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
149b225e1SGavin Maltby#
249b225e1SGavin Maltby# CDDL HEADER START
349b225e1SGavin Maltby#
449b225e1SGavin Maltby# The contents of this file are subject to the terms of the
549b225e1SGavin Maltby# Common Development and Distribution License (the "License").
649b225e1SGavin Maltby# You may not use this file except in compliance with the License.
749b225e1SGavin Maltby#
849b225e1SGavin Maltby# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
949b225e1SGavin Maltby# or http://www.opensolaris.org/os/licensing.
1049b225e1SGavin Maltby# See the License for the specific language governing permissions
1149b225e1SGavin Maltby# and limitations under the License.
1249b225e1SGavin Maltby#
1349b225e1SGavin Maltby# When distributing Covered Code, include this CDDL HEADER in each
1449b225e1SGavin Maltby# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1549b225e1SGavin Maltby# If applicable, add the following below this CDDL HEADER, with the
1649b225e1SGavin Maltby# fields enclosed by brackets "[]" replaced with your own identifying
1749b225e1SGavin Maltby# information: Portions Copyright [yyyy] [name of copyright owner]
1849b225e1SGavin Maltby#
1949b225e1SGavin Maltby# CDDL HEADER END
2049b225e1SGavin Maltby#
2149b225e1SGavin Maltby#
22f6e214c7SGavin Maltby# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
2349b225e1SGavin Maltby#
2449b225e1SGavin Maltby
2549b225e1SGavin MaltbyLIBRARY = libfmevent.a
2649b225e1SGavin MaltbyVERS = .1
2749b225e1SGavin Maltby
2849b225e1SGavin MaltbyLIBSRCS = fmev_subscribe.c \
2949b225e1SGavin Maltby	fmev_evaccess.c \
3049b225e1SGavin Maltby	fmev_errstring.c \
31f6e214c7SGavin Maltby	fmev_util.c \
32f6e214c7SGavin Maltby	fmev_publish.c
3349b225e1SGavin Maltby
3449b225e1SGavin MaltbyOBJECTS = $(LIBSRCS:%.c=%.o)
3549b225e1SGavin Maltby
3649b225e1SGavin Maltbyinclude ../../../Makefile.lib
37fc5ba5b7SAntonello Cruz
38fc5ba5b7SAntonello Cruz# This library must install in /lib/fm since it is a dependency of
39fc5ba5b7SAntonello Cruz# svc.startd and may be required in early boot.  Thus we cannot
40fc5ba5b7SAntonello Cruz# include ../Makefile.lib - instead we set ROOTFMHDRDIR and
41fc5ba5b7SAntonello Cruz# ROOTFMHDRS and redefine ROOTLIBDIR and ROOTLIBDIR64 accordingly
42fc5ba5b7SAntonello Cruz
43fc5ba5b7SAntonello CruzROOTFMHDRDIR = $(ROOTHDRDIR)/fm
44fc5ba5b7SAntonello CruzROOTFMHDRS   = $(FMHDRS:%=$(ROOTFMHDRDIR)/%)
45fc5ba5b7SAntonello Cruz
46fc5ba5b7SAntonello CruzROOTLIBDIR=     $(ROOTFS_LIBDIR)/fm
47fc5ba5b7SAntonello CruzROOTLIBDIR64=   $(ROOTFS_LIBDIR)/fm/$(MACH64)
4849b225e1SGavin Maltby
4949b225e1SGavin MaltbySRCS = $(LIBSRCS:%.c=../common/%.c)
5049b225e1SGavin MaltbyLIBS = $(DYNLIB) $(LINTLIB)
5149b225e1SGavin Maltby
5249b225e1SGavin MaltbySRCDIR =	../common
5349b225e1SGavin Maltby
54f6e214c7SGavin MaltbyC99MODE = $(C99_ENABLE)
55f6e214c7SGavin Maltby
5649b225e1SGavin MaltbyCPPFLAGS += -I../common -I.
5749b225e1SGavin Maltby$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
5849b225e1SGavin Maltby
5949b225e1SGavin MaltbyCFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
6049b225e1SGavin MaltbyCFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
61fc5ba5b7SAntonello Cruz
62*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
63*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function
64*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized
65*7014882cSRichard Lowe
66fc5ba5b7SAntonello CruzFMLIBDIR=usr/lib/fm
67fc5ba5b7SAntonello Cruz$(BUILD64)FMLIBDIR64=usr/lib/fm/$(MACH64)
68fc5ba5b7SAntonello Cruz
69fc5ba5b7SAntonello Cruz$(DYNLIB) := LDLIBS += -lumem -lnvpair -luutil -lsysevent \
70fc5ba5b7SAntonello Cruz	-L$(ROOT)/$(FMLIBDIR) -ltopo -lc
71fc5ba5b7SAntonello Cruz
72fc5ba5b7SAntonello Cruz$(BUILD64)$(DYNLIB) := LDLIBS64 += -lumem -lnvpair -luutil -lsysevent \
73fc5ba5b7SAntonello Cruz	-L$(ROOT)/$(FMLIBDIR64) -ltopo -lc
7449b225e1SGavin Maltby
7549b225e1SGavin MaltbyLINTFLAGS = -msux
7649b225e1SGavin MaltbyLINTFLAGS64 = -msux -m64
7749b225e1SGavin Maltby
7849b225e1SGavin Maltby$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
7949b225e1SGavin Maltby$(LINTLIB) := LINTFLAGS = -nsvx
8049b225e1SGavin Maltby$(LINTLIB) := LINTFLAGS64 = -nsvx -m64
8149b225e1SGavin Maltby
8249b225e1SGavin MaltbyCLEANFILES += ../common/fmev_errstring.c
8349b225e1SGavin Maltby
8449b225e1SGavin Maltby.KEEP_STATE:
8549b225e1SGavin Maltby
8649b225e1SGavin Maltbyall: $(LIBS)
8749b225e1SGavin Maltby
8849b225e1SGavin Maltbylint: $(LINTLIB) lintcheck
8949b225e1SGavin Maltby
9049b225e1SGavin Maltbypics/%.o: ../$(MACH)/%.c
9149b225e1SGavin Maltby	$(COMPILE.c) -o $@ $<
9249b225e1SGavin Maltby	$(POST_PROCESS_O)
9349b225e1SGavin Maltby
9449b225e1SGavin Maltby../common/fmev_errstring.c: ../common/mkerror.sh ../common/libfmevent.h
9549b225e1SGavin Maltby	sh ../common/mkerror.sh ../common/libfmevent.h > $@
9649b225e1SGavin Maltby
9749b225e1SGavin Maltby%.o: ../common/%.c
9849b225e1SGavin Maltby	$(COMPILE.c) -o $@ $<
9949b225e1SGavin Maltby	$(POST_PROCESS_O)
10049b225e1SGavin Maltby
10149b225e1SGavin Maltbyinclude ../../../Makefile.targ
10249b225e1SGavin Maltbyinclude ../../Makefile.targ
103