2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A
2N/A#
2N/A# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A
2N/A.KEEP_STATE:
2N/A.SUFFIXES:
2N/A
2N/AMODCLASS = plugins
2N/A
2N/A#
2N/A# Set PROG and OBJS based on the values of MODULE and SRCS. We expect that
2N/A# these macros to be defined by the Makefile that is including this file.
2N/A#
2N/A# SHAREDSRCS is used to share sources between multiple libtopo modules.
2N/A#
2N/ASRCS = $(MODULESRCS:%.c=%.c) $(SHAREDSRCS:%.c=%.c)
2N/APROG = $(MODULE:%=%.so)
2N/AOBJS = $(MODULESRCS:%.c=%.o) $(SHAREDSRCS:%.c=%.o)
2N/A
2N/A#
2N/A# Set ROOTPROG and ROOTCONF based on the values of MODULE, CLASS, and PLATFORMS
2N/A# We expect these macros to be defined by the Makefile that is including us.
2N/A#
2N/Acommon_ROOTPROG = $(ROOT)/usr/lib/fm/topo/plugins/$(PROG)
2N/Aarch_ROOTPROG = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/plugins/$(PROG)
2N/Aplat_ROOTPROG = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/plugins/$(PROG))
2N/AROOTPROG = $($(CLASS)_ROOTPROG)
2N/A
2N/Acommon_ROOTCONF = $(ROOT)/usr/lib/fm/topo/plugins/$(CONF)
2N/Aarch_ROOTCONF = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/plugins/$(CONF)
2N/Aplat_ROOTCONF = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/plugins/$(CONF))
2N/AROOTCONF = $($(CLASS)_ROOTCONF)
2N/A
2N/Acommon_ROOTLIB = $(ROOT)/usr/lib/fm/topo/plugins/
2N/Aarch_ROOTLIB = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/plugins/
2N/Aplat_ROOTLIB = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/plugins/)
2N/AROOTLIB = $($(CLASS)_ROOTLIB)
2N/AROOTPROG64 = $(ROOTLIB)/$(MACH64)/$(PROG)
2N/A
2N/APLUGINDIR = $(ROOTLIB)
2N/APLUGINDIR64 = $(ROOTLIB)/$(MACH64)
2N/A
2N/ALINTFLAGS = -msux
2N/ALINTFILES = $(MODULESRCS:%.c=%.ln)
2N/A
2N/AAPIMAP = ../../../../libtopo/common/topo_mod.map
2N/AMAPFILES = # use APIMAP instead
2N/A
2N/AC99MODE = $(C99_ENABLE)
2N/ACFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(CC_PICFLAGS)
2N/ACFLAGS += -G $(XREGSFLAG)
2N/ACFLAGS64 += $(CTF_FLAGS) $(CCVERBOSE) $(CC_PICFLAGS)
2N/ACFLAGS64 += -G $(XREGSFLAG)
2N/A
2N/ACPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
2N/ALDFLAGS += $(ZTEXT) $(ZIGNORE) -M$(APIMAP)
2N/A
2N/ALDLIBS += -ltopo -lnvpair -lc
2N/ALDLIBS32 += -L$(LROOTLIBDIR)
2N/ALDLIBS64 += -L$(LROOTLIBDIR)/$(MACH64)
2N/A
2N/ADYNFLAGS32 += -R/usr/lib/fm
2N/ADYNFLAGS64 += -R/usr/lib/fm/$(MACH64)
2N/A
2N/Aall: $(PROG)
2N/A
2N/A.NO_PARALLEL:
2N/A.PARALLEL: $(OBJS) $(LINTFILES)
2N/A
2N/A$(PROG): $(OBJS) $(APIMAP)
2N/A $(LINK.c) $(DYNFLAGS) $(OBJS) -o $@ $(LDLIBS)
2N/A $(CTFMERGE) -L VERSION -o $@ $(OBJS)
2N/A $(POST_PROCESS_SO)
2N/A
2N/ASRC_REL = ../../../../../../..
2N/A
2N/A%.o: $(SRC_REL)/lib/fm/topo/modules/common/$(MODULE)/common/%.c
2N/A $(COMPILE.c) $<
2N/A $(CTFCONVERT_O)
2N/A
2N/A%.o: $(SRC_REL)/lib/fm/topo/modules/common/$(SHAREDMODULE)/common/%.c
2N/A $(COMPILE.c) $<
2N/A $(CTFCONVERT_O)
2N/A
2N/A%.o: ../../$(MODULE)/common/%.c
2N/A $(COMPILE.c) $<
2N/A $(CTFCONVERT_O)
2N/A
2N/Aclean:
2N/A $(RM) $(OBJS) $(LINTFILES) $(CLEANFILES)
2N/A
2N/Aclobber: clean
2N/A $(RM) $(PROG)
2N/A
2N/A%.ln: $(SRC)/lib/fm/topo/modules/common/$(MODULE)/common/%.c
2N/A $(LINT.c) -c $<
2N/A
2N/A%.ln: ../../$(MODULE)/common/%.c
2N/A $(LINT.c) -c $<
2N/A
2N/Alint: $(LINTFILES)
2N/A $(LINT) $(LINTFLAGS) $(LINTFILES) $(LDLIBS)
2N/A
2N/Acheck: $(CHECKHDRS)
2N/A
2N/Ainstall_h:
2N/A
2N/A$(ROOTPROG): $$(@D) $(PROG)
2N/A $(RM) $@; $(INS) -s -m 0755 -f $(@D) $(PROG)
2N/A
2N/A$(ROOTPROG64): $$(@D) $(PROG)
2N/A $(RM) $@; $(INS) -s -m 0755 -f $(@D) $(PROG)
2N/A
2N/A$(PLUGINDIR) :
2N/A ${INS.dir}
2N/A
2N/A$(PLUGINDIR64) :
2N/A ${INS.dir}
2N/A
2N/A$(PLUGINDIR)/% : %
2N/A ${INS.file}
2N/A
2N/A$(PLUGINDIR64)/% : %
2N/A ${INS.file}
2N/Ainclude ../../../../Makefile.rootdirs