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= libpiclevent.a 27VERS= .1 28 29OBJECTS= piclevent.o 30 31# include library definitions 32include $(SRC)/lib/Makefile.lib 33 34include $(SRC)/cmd/picl/plugins/Makefile.com 35 36MODULES = picl_slm.so 37MOD_SRCS = picl_slm.c 38MOD_OBJS = picl_slm.o 39MOD_LDLIBS = -L$(ROOT)/usr/lib -lsysevent -lnvpair -lc 40 41# sysevent SLM dirs 42SYSEVENT = sysevent 43MODDIR = modules 44ROOTLIBSYSEVENTDIR = $(ROOTLIB)/$(SYSEVENT) 45ROOTLIBSYSEVENTMODDIR = $(ROOTLIBSYSEVENTDIR)/$(MODDIR) 46ROOTLIBSYSEVENTMODULES = $(MODULES:%=$(ROOTLIBSYSEVENTMODDIR)/%) 47ROOTETCSYSEVENTDIR = $(ROOTETC)/$(SYSEVENT) 48 49SRCS= $(OBJECTS:%.o=%.c) 50 51LIBS = $(DYNLIB) 52 53ROOTLIBDIR = $(USR_LIB_PLUGINDIR) 54ROOTETC = $(ROOT)/etc 55ROOTLIB = $(ROOT)/usr/lib 56 57CLEANFILES= $(LINTOUT) $(LINTLIB) $(MOD_OBJS) 58CLOBBERFILES += $(LIBLINKS) 59CLOBBERFILES += $(MODULES) 60 61CPPFLAGS += -I$(SRC)/lib/libsysevent -I$(SRC)/uts/sun 62 63CFLAGS += $(CCVERBOSE) $(C_PICFLAGS) 64CPPFLAGS += -D_REENTRANT 65LDLIBS += -L$(SRC)/lib/libsysevent -L$(SRC)/lib/libpicltree/$(MACH) 66LDLIBS += -lc -lpicltree -lnvpair 67 68LINTFLAGS += -L$(SRC)/lib/libpicltree/$(MACH) -lpicltree 69 70.KEEP_STATE: 71 72SUBDIRS= 73 74POFILE= piclevent.po 75 76all := TARGET= all 77install := TARGET= install 78clean := TARGET= clean 79clobber := TARGET= clobber 80lint := TARGET= lint 81_msg := TARGET= _msg 82 83all: $(LIBS) $(LIBLINKS) $(MODULES) 84 85install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) \ 86 $(ROOTETCSYSEVENTDIR) \ 87 $(ROOTLIBSYSEVENTDIR) \ 88 $(ROOTLIBSYSEVENTMODDIR) \ 89 $(ROOTLIBSYSEVENTMODULES) 90 91_msg: $(MSGDOMAIN) $(POFILE) 92 $(RM) $(MSGDOMAIN)/$(POFILE) 93 $(CP) $(POFILE) $(MSGDOMAIN) 94 95 96$(MSGDOMAIN): 97 $(INS.dir) 98 99$(LIBLINKS): FRC 100 $(RM) $@; $(SYMLINK) $(DYNLIB) $@ 101 102# include library targets 103include $(SRC)/cmd/picl/plugins/Makefile.targ 104include $(SRC)/lib/Makefile.targ 105 106lint : 107 $(LINT.c) $(SRCS) 108 109%.so: %.o 110 $(LINK.c) -o $@ $(GSHARED) -h $@ $< $(MOD_LDLIBS) 111 112%.o: %.c 113 $(COMPILE.c) -o $@ $< 114 115$(SUBDIRS): FRC 116 @cd $@; pwd; $(MAKE) $(TARGET) 117 118$(ROOTLIBSYSEVENTDIR): 119 $(INS.dir) 120 121$(ROOTETCSYSEVENTDIR): 122 $(INS.dir) 123 124$(ROOTLIBSYSEVENTDIR)/%: % 125 $(INS.file) 126 127$(ROOTLIBSYSEVENTMODDIR): 128 $(INS.dir) 129 130$(ROOTLIBSYSEVENTMODDIR)/%.so: %.so 131 $(INS.file) 132 133FRC: 134