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