17c478bdstevel@tonic-gate#
27c478bdstevel@tonic-gate# CDDL HEADER START
37c478bdstevel@tonic-gate#
47c478bdstevel@tonic-gate# The contents of this file are subject to the terms of the
524fe0b3jmcp# Common Development and Distribution License (the "License").
624fe0b3jmcp# You may not use this file except in compliance with the License.
77c478bdstevel@tonic-gate#
87c478bdstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bdstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bdstevel@tonic-gate# See the License for the specific language governing permissions
117c478bdstevel@tonic-gate# and limitations under the License.
127c478bdstevel@tonic-gate#
137c478bdstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bdstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bdstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bdstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bdstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bdstevel@tonic-gate#
197c478bdstevel@tonic-gate# CDDL HEADER END
207c478bdstevel@tonic-gate#
217c478bdstevel@tonic-gate#
2224fe0b3jmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bdstevel@tonic-gate# Use is subject to license terms.
247c478bdstevel@tonic-gate#
257c478bdstevel@tonic-gate
267c478bdstevel@tonic-gateLIBRARY=	libpiclevent.a
277c478bdstevel@tonic-gateVERS=		.1
287c478bdstevel@tonic-gate
297c478bdstevel@tonic-gateOBJECTS=	piclevent.o
307c478bdstevel@tonic-gate
317c478bdstevel@tonic-gate# include library definitions
327c478bdstevel@tonic-gateinclude $(SRC)/lib/Makefile.lib
337c478bdstevel@tonic-gate
347c478bdstevel@tonic-gateinclude $(SRC)/cmd/picl/plugins/Makefile.com
357c478bdstevel@tonic-gate
367c478bdstevel@tonic-gateMODULES = picl_slm.so
377c478bdstevel@tonic-gateMOD_SRCS = picl_slm.c
387c478bdstevel@tonic-gateMOD_OBJS = picl_slm.o
397c478bdstevel@tonic-gateMOD_LDLIBS = -L$(ROOT)/usr/lib -lsysevent -lnvpair -lc
407c478bdstevel@tonic-gate
417c478bdstevel@tonic-gate# sysevent SLM dirs
427c478bdstevel@tonic-gateSYSEVENT = sysevent
437c478bdstevel@tonic-gateMODDIR = modules
447c478bdstevel@tonic-gateROOTLIBSYSEVENTDIR = $(ROOTLIB)/$(SYSEVENT)
457c478bdstevel@tonic-gateROOTLIBSYSEVENTMODDIR = $(ROOTLIBSYSEVENTDIR)/$(MODDIR)
467c478bdstevel@tonic-gateROOTLIBSYSEVENTMODULES = $(MODULES:%=$(ROOTLIBSYSEVENTMODDIR)/%)
477c478bdstevel@tonic-gateROOTETCSYSEVENTDIR = $(ROOTETC)/$(SYSEVENT)
487c478bdstevel@tonic-gate
497c478bdstevel@tonic-gateSRCS=		$(OBJECTS:%.o=%.c)
507c478bdstevel@tonic-gate
517c478bdstevel@tonic-gateLIBS =		$(DYNLIB)
527c478bdstevel@tonic-gate
537c478bdstevel@tonic-gateROOTLIBDIR =	$(USR_LIB_PLUGINDIR)
547c478bdstevel@tonic-gateROOTETC	=	$(ROOT)/etc
557c478bdstevel@tonic-gateROOTLIB =	$(ROOT)/usr/lib
567c478bdstevel@tonic-gate
575801b0fToomas SoomeCLEANFILES=	$(MOD_OBJS)
587c478bdstevel@tonic-gateCLOBBERFILES += $(LIBLINKS)
597c478bdstevel@tonic-gateCLOBBERFILES += $(MODULES)
607c478bdstevel@tonic-gate
617c478bdstevel@tonic-gateCPPFLAGS +=	-I$(SRC)/lib/libsysevent -I$(SRC)/uts/sun
627c478bdstevel@tonic-gate
637c478bdstevel@tonic-gateCFLAGS +=	$(CCVERBOSE) $(C_PICFLAGS)
647c478bdstevel@tonic-gateCPPFLAGS +=	-D_REENTRANT
655801b0fToomas SoomeLDFLAGS +=	$(BDIRECT)
667c478bdstevel@tonic-gateLDLIBS +=	-L$(SRC)/lib/libsysevent -L$(SRC)/lib/libpicltree/$(MACH)
677c478bdstevel@tonic-gateLDLIBS +=	-lc -lpicltree -lnvpair
687c478bdstevel@tonic-gate
697c478bdstevel@tonic-gate.KEEP_STATE:
707c478bdstevel@tonic-gate
717c478bdstevel@tonic-gateSUBDIRS=
727c478bdstevel@tonic-gate
737c478bdstevel@tonic-gatePOFILE=	piclevent.po
747c478bdstevel@tonic-gate
757c478bdstevel@tonic-gateall :=		TARGET= all
767c478bdstevel@tonic-gateinstall :=	TARGET= install
777c478bdstevel@tonic-gateclean :=	TARGET= clean
787c478bdstevel@tonic-gateclobber :=	TARGET= clobber
797c478bdstevel@tonic-gate_msg :=		TARGET= _msg
807c478bdstevel@tonic-gate
817c478bdstevel@tonic-gateall: $(LIBS) $(LIBLINKS) $(MODULES)
827c478bdstevel@tonic-gate
837c478bdstevel@tonic-gateinstall:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) \
847c478bdstevel@tonic-gate	$(ROOTETCSYSEVENTDIR)		\
857c478bdstevel@tonic-gate	$(ROOTLIBSYSEVENTDIR)		\
867c478bdstevel@tonic-gate	$(ROOTLIBSYSEVENTMODDIR)	\
877c478bdstevel@tonic-gate	$(ROOTLIBSYSEVENTMODULES)
887c478bdstevel@tonic-gate
897c478bdstevel@tonic-gate_msg:	$(MSGDOMAIN) $(POFILE)
907c478bdstevel@tonic-gate	$(RM) $(MSGDOMAIN)/$(POFILE)
917c478bdstevel@tonic-gate	$(CP) $(POFILE) $(MSGDOMAIN)
927c478bdstevel@tonic-gate
937c478bdstevel@tonic-gate
947c478bdstevel@tonic-gate$(MSGDOMAIN):
957c478bdstevel@tonic-gate	$(INS.dir)
967c478bdstevel@tonic-gate
977c478bdstevel@tonic-gate$(LIBLINKS):	FRC
987c478bdstevel@tonic-gate	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
997c478bdstevel@tonic-gate
1007c478bdstevel@tonic-gate# include library targets
1017c478bdstevel@tonic-gateinclude $(SRC)/cmd/picl/plugins/Makefile.targ
1027c478bdstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ
1037c478bdstevel@tonic-gate
1047c478bdstevel@tonic-gate%.so: %.o
1057c478bdstevel@tonic-gate	$(LINK.c) -o $@ $(GSHARED) -h $@ $< $(MOD_LDLIBS)
1067c478bdstevel@tonic-gate
1077c478bdstevel@tonic-gate%.o: %.c
1087c478bdstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1097c478bdstevel@tonic-gate
1107c478bdstevel@tonic-gate$(SUBDIRS): FRC
1117c478bdstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1127c478bdstevel@tonic-gate
1137c478bdstevel@tonic-gate$(ROOTLIBSYSEVENTDIR):
1147c478bdstevel@tonic-gate	$(INS.dir)
1157c478bdstevel@tonic-gate
1167c478bdstevel@tonic-gate$(ROOTETCSYSEVENTDIR):
1177c478bdstevel@tonic-gate	$(INS.dir)
1187c478bdstevel@tonic-gate
1197c478bdstevel@tonic-gate$(ROOTLIBSYSEVENTDIR)/%: %
1207c478bdstevel@tonic-gate	$(INS.file)
1217c478bdstevel@tonic-gate
1227c478bdstevel@tonic-gate$(ROOTLIBSYSEVENTMODDIR):
1237c478bdstevel@tonic-gate	$(INS.dir)
1247c478bdstevel@tonic-gate
1257c478bdstevel@tonic-gate$(ROOTLIBSYSEVENTMODDIR)/%.so: %.so
1267c478bdstevel@tonic-gate	$(INS.file)
1277c478bdstevel@tonic-gate
1287c478bdstevel@tonic-gateFRC:
129