xref: /illumos-gate/usr/src/lib/cfgadm_plugins/sata/Makefile.com (revision cbab2b2687744cbfdc12fae90f8088127a0b266c)
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#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/cfgadm_plugins/sata/Makefile.com
29#
30
31LIBRARY= sata.a
32VERS= .1
33
34OBJECTS= cfga_sata.o cfga_rcm.o
35
36# include library definitions
37include ../../../Makefile.lib
38
39ROOTLIBDIR=	$(ROOT)/usr/lib/cfgadm
40ROOTLIBDIR64=	$(ROOTLIBDIR)/$(MACH64)
41
42MAPFILE=	$(MAPDIR)/mapfile
43CLOBBERFILES +=	$(MAPFILE)
44
45SRCS=		$(OBJECTS:%.o=../common/%.c)
46
47LIBS=	$(DYNLIB)
48
49LINTFLAGS +=	-DDEBUG
50LINTFLAGS64 +=	-DDEBUG
51
52CFLAGS +=	$(CCVERBOSE)
53CFLAGS64 +=	$(CCVERBOSE)
54
55DYNFLAGS +=	-M $(MAPFILE)
56LDLIBS +=	-lc -ldevice -ldevinfo -lrcm -lnvpair
57
58.KEEP_STATE:
59
60all:	$(LIBS)
61
62lint:	lintcheck
63
64$(DYNLIB):	$(MAPFILE)
65
66$(MAPFILE):
67	@cd $(MAPDIR); $(MAKE) mapfile
68
69# Install rules
70
71$(ROOTLIBDIR)/%: % $(ROOTLIBDIR)
72	$(INS.file)
73
74$(ROOTLIBDIR64)/%: % $(ROOTLIBDIR64)
75	$(INS.file)
76
77$(ROOTLIBDIR) $(ROOTLIBDIR64):
78	$(INS.dir)
79
80# include library targets
81include ../../../Makefile.targ
82
83objs/%.o pics/%.o: ../common/%.c
84	$(COMPILE.c) -o $@ $<
85	$(POST_PROCESS_O)
86