xref: /titanic_50/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile (revision 142c9f13e148d687426ed2d4e8bd93717eeaebbc)
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# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/picl/plugins/sun4v/mdesc/Makefile
29#
30LIBRARY=	libmdescplugin.a
31VERS=		.1
32
33OBJS_DIR=	pics
34
35OBJECTS=	mdescplugin.o init.o dr.o \
36		cpu_prop_update.o disk_discovery.o \
37		mdesc_findname.o mdesc_findnodeprop.o \
38		mdesc_fini.o mdesc_getpropstr.o \
39		mdesc_getpropval.o mdesc_init_intern.o \
40		mdesc_nodecount.o mdesc_rootnode.o \
41		mdesc_scandag.o mdesc_getpropdata.o
42
43# include library definitions
44include $(SRC)/lib/Makefile.lib
45include $(SRC)/Makefile.psm
46
47include $(SRC)/cmd/picl/plugins/Makefile.com
48
49SRCS=		$(OBJECTS:%.o=%.c)
50
51LINT_SRC=	./mdescplugin.c ./init.c ./dr.c \
52		./cpu_prop_update.c ./disk_discovery.c \
53		$(SRC)/common/mdesc/mdesc_findname.c \
54		$(SRC)/common/mdesc/mdesc_findnodeprop.c \
55		$(SRC)/common/mdesc/mdesc_fini.c \
56		$(SRC)/common/mdesc/mdesc_getpropdata.c \
57		$(SRC)/common/mdesc/mdesc_getpropstr.c \
58		$(SRC)/common/mdesc/mdesc_getpropval.c \
59		$(SRC)/common/mdesc/mdesc_init_intern.c \
60		$(SRC)/common/mdesc/mdesc_nodecount.c \
61		$(SRC)/common/mdesc/mdesc_rootnode.c \
62		$(SRC)/common/mdesc/mdesc_scandag.c
63
64$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
65	$(COMPILE.c) -o $@ $<
66	$(CTFCONVERT_O)
67
68LIBS =		$(DYNLIB)
69
70ROOT_PLATFORM =		$(USR_PLAT_DIR)/sun4v
71DYNFLAGS_PLAT =		/usr/platform/\$$PLATFORM/lib/picl/plugins
72DYNFLAGS_SUN4V =	/usr/platform/sun4v/lib/picl/plugins
73DYNFLAGS_COM =		/usr/lib/picl/plugins
74
75ROOTLIBDIR =	$(ROOT_PLAT_PLUGINDIR)
76
77CLEANFILES=	$(LINTOUT) $(LINTLIB)
78
79CPPFLAGS +=	-I$(SRC)/common/mdesc
80CPPFLAGS +=	-I$(SRC)/uts/common/sys
81CPPFLAGS +=	-D_REENTRANT
82
83CFLAGS +=	$(CCVERBOSE)
84LDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
85LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9
86DYNFLAGS +=	-R$(DYNFLAGS_COM)
87
88LDLIBS +=	-lc -lpicltree -ldevinfo -lpicldevtree -lcfgadm -lnvpair
89
90LINTFLAGS +=	-erroff=E_BAD_PTR_CAST_ALIGN -v
91
92.KEEP_STATE:
93
94all: $(LIBS) $(LIBLINKS)
95
96install:	all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
97
98$(LIBLINKS):	FRC
99	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
100
101# include library targets
102include $(SRC)/cmd/picl/plugins/Makefile.targ
103include $(SRC)/lib/Makefile.targ
104
105lint :
106	$(LINT.c) $(LINT_SRC)
107
108FRC:
109