xref: /titanic_41/usr/src/cmd/pcidr/plugins/default/Makefile (revision 6a1af1a67532df169a657cce07140be64bdea084)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#
26
27.PARALLEL:
28
29#############################################################################
30
31NAME = pcidr_plugin
32LIBRARY = $(NAME).a
33VERS =
34
35TOPOBJECTS = pcidr_common.o
36LOCOBJECTS = $(NAME).o pcidr_cfga.o
37OBJECTS = $(LOCOBJECTS) $(TOPOBJECTS)
38
39include $(SRC)/lib/Makefile.lib
40include $(SRC)/cmd/pcidr/Makefile.com
41#############################################################################
42
43THISDIR = ../../plugins/default
44USR_SRC_BASE = ../../../..
45
46# SRCS is used by the lintcheck rule and is defined as
47# $(OBJECTS:%.o=$(SRCDIR)/%.c) where SRCDIR is this directory; set SRCS to a
48# list of source paths if it differ from the default
49#
50
51SRCDIR = .
52SRCS = $(TOPOBJECTS:%.o=$(USR_SRC_BASE)/cmd/pcidr/%.c) $(LOCOBJECTS:%.o=$(SRCDIR)/%.c)
53
54LIBS = $(DYNLIB)
55
56LDLIBS += -lcfgadm -lnvpair
57
58HDRSRCS_SH = ls -1 $(THISDIR)/*.h
59HDRSRCS = $(HDRSRCS_SH:sh)
60CPPFLAGS += -I$(THISDIR)
61
62# override LIBLINKS so that ROOTLIBS or anything else won't match the install
63# target "$(ROOTLIBDIR)/$(LIBLINKS)"
64#
65LIBLINKS = __no_liblinks__
66
67.KEEP_STATE:
68#############################################################################
69
70all: $(LIBS)
71install: $(ROOTLIBS)
72clean:
73clobber:
74lint: lintcheck
75
76$(ROOTLIBS): all
77
78objs/%.o pics/%.o: $(USR_SRC_BASE)/cmd/pcidr/%.c
79	$(COMPILE.c) -o $@ $<
80	$(POST_PROCESS_O)
81
82include $(SRC)/lib/Makefile.targ
83include ../Makefile.targ
84