xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
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 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27LIBRARY=	libmdescplugin.a
28VERS=		.1
29
30OBJS_DIR=	pics
31
32OBJECTS=	mdescplugin.o init.o dr.o \
33		cpu_prop_update.o disk_discovery.o \
34		mdesc_findname.o mdesc_findnodeprop.o \
35		mdesc_fini.o mdesc_getpropstr.o \
36		mdesc_getpropval.o mdesc_init_intern.o \
37		mdesc_nodecount.o mdesc_rootnode.o \
38		mdesc_scandag.o mdesc_getpropdata.o
39
40# include library definitions
41include $(SRC)/lib/Makefile.lib
42include $(SRC)/Makefile.psm
43
44include $(SRC)/cmd/picl/plugins/Makefile.com
45
46SRCS=		$(OBJECTS:%.o=%.c)
47
48$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
49	$(COMPILE.c) -o $@ $<
50	$(CTFCONVERT_O)
51
52LIBS =		$(DYNLIB)
53
54ROOT_PLATFORM =		$(USR_PLAT_DIR)/sun4v
55DYNFLAGS_PLAT =		/usr/platform/\$$PLATFORM/lib/picl/plugins
56DYNFLAGS_SUN4V =	/usr/platform/sun4v/lib/picl/plugins
57DYNFLAGS_COM =		/usr/lib/picl/plugins
58
59ROOTLIBDIR =	$(ROOT_PLAT_PLUGINDIR)
60
61CPPFLAGS +=	-I$(SRC)/common/mdesc
62CPPFLAGS +=	-I$(SRC)/uts/common/sys
63CPPFLAGS +=	-D_REENTRANT
64
65CFLAGS +=	$(CCVERBOSE)
66LDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
67LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9
68DYNFLAGS +=	-R$(DYNFLAGS_COM)
69
70LDLIBS +=	-lc -lpicltree -ldevinfo -lcfgadm -lnvpair
71
72.KEEP_STATE:
73
74all: $(LIBS) $(LIBLINKS)
75
76install:	all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
77
78$(LIBLINKS):	FRC
79	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
80
81# include library targets
82include $(SRC)/cmd/picl/plugins/Makefile.targ
83include $(SRC)/lib/Makefile.targ
84
85lint :
86
87FRC:
88