Makefile revision 70025d765b044c6d8594bb965a2247a61e991a99
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# CDDL HEADER START
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# The contents of this file are subject to the terms of the
70025d765b044c6d8594bb965a2247a61e991a99johnny# Common Development and Distribution License, Version 1.0 only
70025d765b044c6d8594bb965a2247a61e991a99johnny# (the "License"). You may not use this file except in compliance
70025d765b044c6d8594bb965a2247a61e991a99johnny# with the License.
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
70025d765b044c6d8594bb965a2247a61e991a99johnny# or http://www.opensolaris.org/os/licensing.
70025d765b044c6d8594bb965a2247a61e991a99johnny# See the License for the specific language governing permissions
70025d765b044c6d8594bb965a2247a61e991a99johnny# and limitations under the License.
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# When distributing Covered Code, include this CDDL HEADER in each
70025d765b044c6d8594bb965a2247a61e991a99johnny# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
70025d765b044c6d8594bb965a2247a61e991a99johnny# If applicable, add the following below this CDDL HEADER, with the
70025d765b044c6d8594bb965a2247a61e991a99johnny# fields enclosed by brackets "[]" replaced with your own identifying
70025d765b044c6d8594bb965a2247a61e991a99johnny# information: Portions Copyright [yyyy] [name of copyright owner]
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# CDDL HEADER END
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
70025d765b044c6d8594bb965a2247a61e991a99johnny# Use is subject to license terms.
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny#ident "%Z%%M% %I% %E% SMI"
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# cmd/pcidr/plugins/default/Makefile
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnny.PARALLEL:
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnny#############################################################################
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyNAME = pcidr_plugin
70025d765b044c6d8594bb965a2247a61e991a99johnnyLIBRARY = $(NAME).a
70025d765b044c6d8594bb965a2247a61e991a99johnnyVERS =
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyTOPOBJECTS = pcidr_common.o
70025d765b044c6d8594bb965a2247a61e991a99johnnyLOCOBJECTS = $(NAME).o pcidr_cfga.o
70025d765b044c6d8594bb965a2247a61e991a99johnnyOBJECTS = $(LOCOBJECTS) $(TOPOBJECTS)
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyinclude $(SRC)/lib/Makefile.lib
70025d765b044c6d8594bb965a2247a61e991a99johnnyinclude $(SRC)/cmd/pcidr/Makefile.com
70025d765b044c6d8594bb965a2247a61e991a99johnny#############################################################################
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyTHISDIR = $(TOP)/plugins/default
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnny# SRCS is used by the lintcheck rule and is defined as
70025d765b044c6d8594bb965a2247a61e991a99johnny# $(OBJECTS:%.o=$(SRCDIR)/%.c) where SRCDIR is this directory; set SRCS to a
70025d765b044c6d8594bb965a2247a61e991a99johnny# list of source paths if it differ from the default
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnnySRCS = $(TOPOBJECTS:%.o=$(TOP)/%.c) $(LOCOBJECTS:%.o=$(SRCDIR)/%.c)
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyLIBS = $(DYNLIB)
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyLDLIBS += -lcfgadm -lnvpair
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyHDRSRCS_SH = ls -1 $(THISDIR)/*.h
70025d765b044c6d8594bb965a2247a61e991a99johnnyHDRSRCS = $(HDRSRCS_SH:sh)
70025d765b044c6d8594bb965a2247a61e991a99johnnyCPPFLAGS += -I$(THISDIR)
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnny# override LIBLINKS so that ROOTLIBS or anything else won't match the install
70025d765b044c6d8594bb965a2247a61e991a99johnny# target "$(ROOTLIBDIR)/$(LIBLINKS)"
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnnyLIBLINKS = __no_liblinks__
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnny.KEEP_STATE:
70025d765b044c6d8594bb965a2247a61e991a99johnny#############################################################################
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyall: $(LIBS)
70025d765b044c6d8594bb965a2247a61e991a99johnnyinstall: $(ROOTLIBS)
70025d765b044c6d8594bb965a2247a61e991a99johnnyclean:
70025d765b044c6d8594bb965a2247a61e991a99johnnyclobber:
70025d765b044c6d8594bb965a2247a61e991a99johnnylint: lintcheck
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnny$(ROOTLIBS): all
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnny# Note that we can't do:
70025d765b044c6d8594bb965a2247a61e991a99johnny# $(TOPOBJECTS:%=objs/%) := SRCDIR = $(TOP)
70025d765b044c6d8594bb965a2247a61e991a99johnny# and let the make do the rest because the man page states:
70025d765b044c6d8594bb965a2247a61e991a99johnny# "Notice that if a conditional macro is referred to in a dependency list,
70025d765b044c6d8594bb965a2247a61e991a99johnny# the $ must be delayed (use $$ instead)."
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnny# So we must add new targets for our TOPOBJECTS items but follow
70025d765b044c6d8594bb965a2247a61e991a99johnny# the existing pic/*.o and objs/*.o rules in lib/Makefile.targ
70025d765b044c6d8594bb965a2247a61e991a99johnny#
70025d765b044c6d8594bb965a2247a61e991a99johnnyobjs/%.o pics/%.o: $(TOP)/%.c
70025d765b044c6d8594bb965a2247a61e991a99johnny $(COMPILE.c) -o $@ $<
70025d765b044c6d8594bb965a2247a61e991a99johnny $(POST_PROCESS_O)
70025d765b044c6d8594bb965a2247a61e991a99johnny
70025d765b044c6d8594bb965a2247a61e991a99johnnyinclude $(SRC)/lib/Makefile.targ
70025d765b044c6d8594bb965a2247a61e991a99johnnyinclude ../Makefile.targ