xref: /illumos-gate/usr/src/cmd/pcidr/plugins/default/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
1*70025d76Sjohnny#
2*70025d76Sjohnny# CDDL HEADER START
3*70025d76Sjohnny#
4*70025d76Sjohnny# The contents of this file are subject to the terms of the
5*70025d76Sjohnny# Common Development and Distribution License, Version 1.0 only
6*70025d76Sjohnny# (the "License").  You may not use this file except in compliance
7*70025d76Sjohnny# with the License.
8*70025d76Sjohnny#
9*70025d76Sjohnny# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*70025d76Sjohnny# or http://www.opensolaris.org/os/licensing.
11*70025d76Sjohnny# See the License for the specific language governing permissions
12*70025d76Sjohnny# and limitations under the License.
13*70025d76Sjohnny#
14*70025d76Sjohnny# When distributing Covered Code, include this CDDL HEADER in each
15*70025d76Sjohnny# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*70025d76Sjohnny# If applicable, add the following below this CDDL HEADER, with the
17*70025d76Sjohnny# fields enclosed by brackets "[]" replaced with your own identifying
18*70025d76Sjohnny# information: Portions Copyright [yyyy] [name of copyright owner]
19*70025d76Sjohnny#
20*70025d76Sjohnny# CDDL HEADER END
21*70025d76Sjohnny#
22*70025d76Sjohnny#
23*70025d76Sjohnny# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*70025d76Sjohnny# Use is subject to license terms.
25*70025d76Sjohnny#
26*70025d76Sjohnny#ident	"%Z%%M%	%I%	%E% SMI"
27*70025d76Sjohnny#
28*70025d76Sjohnny# cmd/pcidr/plugins/default/Makefile
29*70025d76Sjohnny#
30*70025d76Sjohnny
31*70025d76Sjohnny.PARALLEL:
32*70025d76Sjohnny
33*70025d76Sjohnny#############################################################################
34*70025d76Sjohnny
35*70025d76SjohnnyNAME = pcidr_plugin
36*70025d76SjohnnyLIBRARY = $(NAME).a
37*70025d76SjohnnyVERS =
38*70025d76Sjohnny
39*70025d76SjohnnyTOPOBJECTS = pcidr_common.o
40*70025d76SjohnnyLOCOBJECTS = $(NAME).o pcidr_cfga.o
41*70025d76SjohnnyOBJECTS = $(LOCOBJECTS) $(TOPOBJECTS)
42*70025d76Sjohnny
43*70025d76Sjohnnyinclude $(SRC)/lib/Makefile.lib
44*70025d76Sjohnnyinclude $(SRC)/cmd/pcidr/Makefile.com
45*70025d76Sjohnny#############################################################################
46*70025d76Sjohnny
47*70025d76SjohnnyTHISDIR = $(TOP)/plugins/default
48*70025d76Sjohnny
49*70025d76Sjohnny# SRCS is used by the lintcheck rule and is defined as
50*70025d76Sjohnny# $(OBJECTS:%.o=$(SRCDIR)/%.c) where SRCDIR is this directory; set SRCS to a
51*70025d76Sjohnny# list of source paths if it differ from the default
52*70025d76Sjohnny#
53*70025d76SjohnnySRCS = $(TOPOBJECTS:%.o=$(TOP)/%.c) $(LOCOBJECTS:%.o=$(SRCDIR)/%.c)
54*70025d76Sjohnny
55*70025d76SjohnnyLIBS = $(DYNLIB)
56*70025d76Sjohnny
57*70025d76SjohnnyLDLIBS += -lcfgadm -lnvpair
58*70025d76Sjohnny
59*70025d76SjohnnyHDRSRCS_SH = ls -1 $(THISDIR)/*.h
60*70025d76SjohnnyHDRSRCS = $(HDRSRCS_SH:sh)
61*70025d76SjohnnyCPPFLAGS += -I$(THISDIR)
62*70025d76Sjohnny
63*70025d76Sjohnny# override LIBLINKS so that ROOTLIBS or anything else won't match the install
64*70025d76Sjohnny# target "$(ROOTLIBDIR)/$(LIBLINKS)"
65*70025d76Sjohnny#
66*70025d76SjohnnyLIBLINKS = __no_liblinks__
67*70025d76Sjohnny
68*70025d76Sjohnny.KEEP_STATE:
69*70025d76Sjohnny#############################################################################
70*70025d76Sjohnny
71*70025d76Sjohnnyall: $(LIBS)
72*70025d76Sjohnnyinstall: $(ROOTLIBS)
73*70025d76Sjohnnyclean:
74*70025d76Sjohnnyclobber:
75*70025d76Sjohnnylint: lintcheck
76*70025d76Sjohnny
77*70025d76Sjohnny$(ROOTLIBS): all
78*70025d76Sjohnny
79*70025d76Sjohnny# Note that we can't do:
80*70025d76Sjohnny#	$(TOPOBJECTS:%=objs/%) := SRCDIR = $(TOP)
81*70025d76Sjohnny# and let the make do the rest because the man page states:
82*70025d76Sjohnny# "Notice that if a conditional macro is referred to in a  dependency list,
83*70025d76Sjohnny#  the $ must be delayed (use $$ instead)."
84*70025d76Sjohnny#
85*70025d76Sjohnny# So we must add new targets for our TOPOBJECTS items but follow
86*70025d76Sjohnny# the existing pic/*.o and objs/*.o rules in lib/Makefile.targ
87*70025d76Sjohnny#
88*70025d76Sjohnnyobjs/%.o pics/%.o: $(TOP)/%.c
89*70025d76Sjohnny	$(COMPILE.c) -o $@ $<
90*70025d76Sjohnny	$(POST_PROCESS_O)
91*70025d76Sjohnny
92*70025d76Sjohnnyinclude $(SRC)/lib/Makefile.targ
93*70025d76Sjohnnyinclude ../Makefile.targ
94