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# 23# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26 27LIBRARY= libpriplugin.a 28VERS= .1 29 30OBJS_DIR= pics 31 32OBJECTS= priplugin.o init.o \ 33 mem_prop_update.o io_dev_label.o \ 34 mdesc_findname.o mdesc_findnodeprop.o \ 35 mdesc_fini.o mdesc_getpropstr.o \ 36 mdesc_getpropval.o mdesc_init_intern.o \ 37 mdesc_nodecount.o mdesc_rootnode.o \ 38 mdesc_scandag.o mdesc_getpropdata.o 39 40# include library definitions 41include $(SRC)/lib/Makefile.lib 42include $(SRC)/Makefile.psm 43 44include $(SRC)/cmd/picl/plugins/Makefile.com 45 46SRCS= $(OBJECTS:%.o=%.c) 47 48$(OBJS_DIR)/%.o: $(SRC)/common/mdesc/%.c 49 $(COMPILE.c) -o $@ $< 50 $(CTFCONVERT_O) 51 52LIBS = $(DYNLIB) 53 54ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v 55DYNFLAGS_PLAT = /usr/platform/\$$PLATFORM/lib/picl/plugins 56DYNFLAGS_SUN4V = /usr/platform/sun4v/lib/picl/plugins 57DYNFLAGS_COM = /usr/lib/picl/plugins 58 59ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) 60 61CPPFLAGS += -I$(SRC)/common/mdesc 62CPPFLAGS += -I$(SRC)/uts/common/sys 63CPPFLAGS += -I$(SRC)/lib/libpri/common 64CPPFLAGS += -D_REENTRANT 65 66CFLAGS += $(CCVERBOSE) 67LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) 68LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9 69LDLIBS += -L$(ROOT)/usr/lib/libpri 70LDLIBS += -L$(ROOT_PLATFORM)/lib -L$(ROOT_PLATFORM)/lib/picl/plugins 71 72LDLIBS += -lc -lpicl -lpicltree -lpicldevtree -lpri 73 74# No interfaces from libsnmpplugin.so directly used here, but we need the 75# snmp plugin to load and init before libpriplugin.so. 76# 77LDLIBS += -lsnmpplugin 78 79#DYNFLAGS += -R$(DYNFLAGS_COM) 80$(SPARC_BLD)LDLIBS += -R$(DYNFLAGS_PLAT) \ 81 -R$(DYNFLAGS_SUN4V) 82LDLIBS += -R$(DYNFLAGS_COM) 83 84.KEEP_STATE: 85 86all: $(LIBS) $(LIBLINKS) 87 88install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) 89 90$(LIBLINKS): FRC 91 $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) 92 93# include library targets 94include $(SRC)/cmd/picl/plugins/Makefile.targ 95include $(SRC)/lib/Makefile.targ 96 97lint : 98 99FRC: 100