xref: /titanic_52/usr/src/cmd/picl/plugins/sun4v/pri/Makefile (revision 672986541be54a7a471bb088e60780c37e371d7e)
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 2007 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/pri/Makefile
29#
30LIBRARY=	libpriplugin.a
31VERS=		.1
32
33OBJS_DIR=	pics
34
35OBJECTS=	priplugin.o init.o \
36		mem_prop_update.o io_dev_label.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=	./priplugin.c ./init.c \
52		./mem_prop_update.c io_dev_label.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 +=	-I$(SRC)/lib/libpri/common
82CPPFLAGS +=	-D_REENTRANT
83
84CFLAGS +=	$(CCVERBOSE)
85LDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
86LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9
87LDLIBS +=	-L$(ROOT)/usr/lib/libpri
88LDLIBS +=	-L$(ROOT_PLATFORM)/lib -L$(ROOT_PLATFORM)/lib/picl/plugins
89
90LDLIBS +=	-lc -lpicl -lpicltree -lpicldevtree -lpri
91
92# No interfaces from libsnmpplugin.so directly used here, but we need the
93# snmp plugin to load and init before libpriplugin.so.
94#
95LDLIBS +=	-lsnmpplugin
96
97#DYNFLAGS +=	-R$(DYNFLAGS_COM)
98$(SPARC_BLD)LDLIBS +=	-R$(DYNFLAGS_PLAT) \
99			-R$(DYNFLAGS_SUN4V)
100LDLIBS +=	-R$(DYNFLAGS_COM)
101
102LINTFLAGS +=	-erroff=E_BAD_PTR_CAST_ALIGN -v
103
104.KEEP_STATE:
105
106all: $(LIBS) $(LIBLINKS)
107
108install:	all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
109
110$(LIBLINKS):	FRC
111	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
112
113# include library targets
114include $(SRC)/cmd/picl/plugins/Makefile.targ
115include $(SRC)/lib/Makefile.targ
116
117lint :
118	$(LINT.c) $(LINT_SRC)
119
120FRC:
121