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 37*fc5ba5b7SAntonello Cruz 38*fc5ba5b7SAntonello Cruz# This library must install in /lib/fm since it is a dependency of 39*fc5ba5b7SAntonello Cruz# svc.startd and may be required in early boot. Thus we cannot 40*fc5ba5b7SAntonello Cruz# include ../Makefile.lib - instead we set ROOTFMHDRDIR and 41*fc5ba5b7SAntonello Cruz# ROOTFMHDRS and redefine ROOTLIBDIR and ROOTLIBDIR64 accordingly 42*fc5ba5b7SAntonello Cruz 43*fc5ba5b7SAntonello CruzROOTFMHDRDIR = $(ROOTHDRDIR)/fm 44*fc5ba5b7SAntonello CruzROOTFMHDRS = $(FMHDRS:%=$(ROOTFMHDRDIR)/%) 45*fc5ba5b7SAntonello Cruz 46*fc5ba5b7SAntonello CruzROOTLIBDIR= $(ROOTFS_LIBDIR)/fm 47*fc5ba5b7SAntonello 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) 61*fc5ba5b7SAntonello Cruz 62*fc5ba5b7SAntonello CruzFMLIBDIR=usr/lib/fm 63*fc5ba5b7SAntonello Cruz$(BUILD64)FMLIBDIR64=usr/lib/fm/$(MACH64) 64*fc5ba5b7SAntonello Cruz 65*fc5ba5b7SAntonello Cruz$(DYNLIB) := LDLIBS += -lumem -lnvpair -luutil -lsysevent \ 66*fc5ba5b7SAntonello Cruz -L$(ROOT)/$(FMLIBDIR) -ltopo -lc 67*fc5ba5b7SAntonello Cruz 68*fc5ba5b7SAntonello Cruz$(BUILD64)$(DYNLIB) := LDLIBS64 += -lumem -lnvpair -luutil -lsysevent \ 69*fc5ba5b7SAntonello Cruz -L$(ROOT)/$(FMLIBDIR64) -ltopo -lc 7049b225e1SGavin Maltby 7149b225e1SGavin MaltbyLINTFLAGS = -msux 7249b225e1SGavin MaltbyLINTFLAGS64 = -msux -m64 7349b225e1SGavin Maltby 7449b225e1SGavin Maltby$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) 7549b225e1SGavin Maltby$(LINTLIB) := LINTFLAGS = -nsvx 7649b225e1SGavin Maltby$(LINTLIB) := LINTFLAGS64 = -nsvx -m64 7749b225e1SGavin Maltby 7849b225e1SGavin MaltbyCLEANFILES += ../common/fmev_errstring.c 7949b225e1SGavin Maltby 8049b225e1SGavin Maltby.KEEP_STATE: 8149b225e1SGavin Maltby 8249b225e1SGavin Maltbyall: $(LIBS) 8349b225e1SGavin Maltby 8449b225e1SGavin Maltbylint: $(LINTLIB) lintcheck 8549b225e1SGavin Maltby 8649b225e1SGavin Maltbypics/%.o: ../$(MACH)/%.c 8749b225e1SGavin Maltby $(COMPILE.c) -o $@ $< 8849b225e1SGavin Maltby $(POST_PROCESS_O) 8949b225e1SGavin Maltby 9049b225e1SGavin Maltby../common/fmev_errstring.c: ../common/mkerror.sh ../common/libfmevent.h 9149b225e1SGavin Maltby sh ../common/mkerror.sh ../common/libfmevent.h > $@ 9249b225e1SGavin Maltby 9349b225e1SGavin Maltby%.o: ../common/%.c 9449b225e1SGavin Maltby $(COMPILE.c) -o $@ $< 9549b225e1SGavin Maltby $(POST_PROCESS_O) 9649b225e1SGavin Maltby 9749b225e1SGavin Maltbyinclude ../../../Makefile.targ 9849b225e1SGavin Maltbyinclude ../../Makefile.targ 99