xref: /titanic_44/usr/src/cmd/picl/plugins/sun4v/pri/Makefile (revision 0d63ce2b32a9e1cc8ed71d4d92536c44d66a530a)
1*0d63ce2bSvenki#
2*0d63ce2bSvenki# CDDL HEADER START
3*0d63ce2bSvenki#
4*0d63ce2bSvenki# The contents of this file are subject to the terms of the
5*0d63ce2bSvenki# Common Development and Distribution License (the "License").
6*0d63ce2bSvenki# You may not use this file except in compliance with the License.
7*0d63ce2bSvenki#
8*0d63ce2bSvenki# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*0d63ce2bSvenki# or http://www.opensolaris.org/os/licensing.
10*0d63ce2bSvenki# See the License for the specific language governing permissions
11*0d63ce2bSvenki# and limitations under the License.
12*0d63ce2bSvenki#
13*0d63ce2bSvenki# When distributing Covered Code, include this CDDL HEADER in each
14*0d63ce2bSvenki# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*0d63ce2bSvenki# If applicable, add the following below this CDDL HEADER, with the
16*0d63ce2bSvenki# fields enclosed by brackets "[]" replaced with your own identifying
17*0d63ce2bSvenki# information: Portions Copyright [yyyy] [name of copyright owner]
18*0d63ce2bSvenki#
19*0d63ce2bSvenki# CDDL HEADER END
20*0d63ce2bSvenki#
21*0d63ce2bSvenki
22*0d63ce2bSvenki#
23*0d63ce2bSvenki# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24*0d63ce2bSvenki# Use is subject to license terms.
25*0d63ce2bSvenki#
26*0d63ce2bSvenki# ident	"%Z%%M%	%I%	%E% SMI"
27*0d63ce2bSvenki#
28*0d63ce2bSvenki# cmd/picl/plugins/sun4v/pri/Makefile
29*0d63ce2bSvenki#
30*0d63ce2bSvenkiLIBRARY=	libpriplugin.a
31*0d63ce2bSvenkiVERS=		.1
32*0d63ce2bSvenki
33*0d63ce2bSvenkiOBJS_DIR=	pics
34*0d63ce2bSvenki
35*0d63ce2bSvenkiOBJECTS=	priplugin.o init.o \
36*0d63ce2bSvenki		mem_prop_update.o io_dev_label.o \
37*0d63ce2bSvenki		mdesc_findname.o mdesc_findnodeprop.o \
38*0d63ce2bSvenki		mdesc_fini.o mdesc_getpropstr.o \
39*0d63ce2bSvenki		mdesc_getpropval.o mdesc_init_intern.o \
40*0d63ce2bSvenki		mdesc_nodecount.o mdesc_rootnode.o \
41*0d63ce2bSvenki		mdesc_scandag.o mdesc_getpropdata.o
42*0d63ce2bSvenki
43*0d63ce2bSvenki# include library definitions
44*0d63ce2bSvenkiinclude $(SRC)/lib/Makefile.lib
45*0d63ce2bSvenkiinclude $(SRC)/Makefile.psm
46*0d63ce2bSvenki
47*0d63ce2bSvenkiinclude $(SRC)/cmd/picl/plugins/Makefile.com
48*0d63ce2bSvenki
49*0d63ce2bSvenkiSRCS=		$(OBJECTS:%.o=%.c)
50*0d63ce2bSvenki
51*0d63ce2bSvenkiLINT_SRC=	./priplugin.c ./init.c \
52*0d63ce2bSvenki		./mem_prop_update.c io_dev_label.c \
53*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_findname.c \
54*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_findnodeprop.c \
55*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_fini.c \
56*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_getpropdata.c \
57*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_getpropstr.c \
58*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_getpropval.c \
59*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_init_intern.c \
60*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_nodecount.c \
61*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_rootnode.c \
62*0d63ce2bSvenki		$(SRC)/common/mdesc/mdesc_scandag.c
63*0d63ce2bSvenki
64*0d63ce2bSvenki$(OBJS_DIR)/%.o:		$(SRC)/common/mdesc/%.c
65*0d63ce2bSvenki	$(COMPILE.c) -o $@ $<
66*0d63ce2bSvenki	$(CTFCONVERT_O)
67*0d63ce2bSvenki
68*0d63ce2bSvenkiLIBS =		$(DYNLIB)
69*0d63ce2bSvenki
70*0d63ce2bSvenkiROOT_PLATFORM =		$(USR_PLAT_DIR)/sun4v
71*0d63ce2bSvenkiDYNFLAGS_PLAT =		/usr/platform/\$$PLATFORM/lib/picl/plugins
72*0d63ce2bSvenkiDYNFLAGS_SUN4V =	/usr/platform/sun4v/lib/picl/plugins
73*0d63ce2bSvenkiDYNFLAGS_COM =		/usr/lib/picl/plugins
74*0d63ce2bSvenki
75*0d63ce2bSvenkiROOTLIBDIR =	$(ROOT_PLAT_PLUGINDIR)
76*0d63ce2bSvenki
77*0d63ce2bSvenkiCLEANFILES =	$(LINTOUT) $(LINTLIB)
78*0d63ce2bSvenki
79*0d63ce2bSvenkiCPPFLAGS +=	-I$(SRC)/common/mdesc
80*0d63ce2bSvenkiCPPFLAGS +=	-I$(SRC)/uts/common/sys
81*0d63ce2bSvenkiCPPFLAGS +=	-I$(SRC)/lib/libpri/common
82*0d63ce2bSvenkiCPPFLAGS +=	-D_REENTRANT
83*0d63ce2bSvenki
84*0d63ce2bSvenkiCFLAGS +=	$(CCVERBOSE)
85*0d63ce2bSvenkiLDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
86*0d63ce2bSvenkiLDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9
87*0d63ce2bSvenkiLDLIBS +=	-L$(ROOT)/usr/lib/libpri
88*0d63ce2bSvenkiLDLIBS +=	-L$(ROOT_PLATFORM)/lib -L$(ROOT_PLATFORM)/lib/picl/plugins
89*0d63ce2bSvenki
90*0d63ce2bSvenkiLDLIBS +=	-lc -lpicl -lpicltree -lpicldevtree -lpri
91*0d63ce2bSvenki
92*0d63ce2bSvenki# No interfaces from libsnmpplugin.so directly used here, but we need the
93*0d63ce2bSvenki# snmp plugin to load and init before libpriplugin.so.
94*0d63ce2bSvenki#
95*0d63ce2bSvenkiLDLIBS +=	-lsnmpplugin
96*0d63ce2bSvenki
97*0d63ce2bSvenki#DYNFLAGS +=	-R$(DYNFLAGS_COM)
98*0d63ce2bSvenki$(SPARC_BLD)LDLIBS +=	-R$(DYNFLAGS_PLAT) \
99*0d63ce2bSvenki			-R$(DYNFLAGS_SUN4V)
100*0d63ce2bSvenkiLDLIBS +=	-R$(DYNFLAGS_COM)
101*0d63ce2bSvenki
102*0d63ce2bSvenkiLINTFLAGS +=	-erroff=E_BAD_PTR_CAST_ALIGN -v
103*0d63ce2bSvenki
104*0d63ce2bSvenki.KEEP_STATE:
105*0d63ce2bSvenki
106*0d63ce2bSvenkiall: $(LIBS) $(LIBLINKS)
107*0d63ce2bSvenki
108*0d63ce2bSvenkiinstall:	all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
109*0d63ce2bSvenki
110*0d63ce2bSvenki$(LIBLINKS):	FRC
111*0d63ce2bSvenki	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
112*0d63ce2bSvenki
113*0d63ce2bSvenki# include library targets
114*0d63ce2bSvenkiinclude $(SRC)/cmd/picl/plugins/Makefile.targ
115*0d63ce2bSvenkiinclude $(SRC)/lib/Makefile.targ
116*0d63ce2bSvenki
117*0d63ce2bSvenkilint :
118*0d63ce2bSvenki	$(LINT.c) $(LINT_SRC)
119*0d63ce2bSvenki
120*0d63ce2bSvenkiFRC:
121