xref: /titanic_41/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile (revision 6dfee4834394825da35b977ca71cdc965bc7b6a4)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28# cmd/picl/plugins/sun4v/mdesc/Makefile
29#
30LIBRARY=	libmdescplugin.a
31VERS=		.1
32
33OBJS_DIR=	pics
34
35OBJECTS=	mdescplugin.o init.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 \
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 -lrt -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