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.
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.
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]
23 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
26 # ident "%Z%%M% %I% %E% SMI"
28 # cmd/picl/plugins/sun4v/pri/Makefile
30 LIBRARY
= libpriplugin.a
35 OBJECTS
= 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
43 # include library definitions
44 include $(SRC
)/lib
/Makefile.lib
45 include $(SRC
)/Makefile.psm
47 include $(SRC
)/cmd
/picl
/plugins
/Makefile.com
49 SRCS
= $(OBJECTS
:%.o
=%.c
)
51 LINT_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
64 $(OBJS_DIR
)/%.o
: $(SRC
)/common
/mdesc
/%.c
70 ROOT_PLATFORM
= $(USR_PLAT_DIR
)/sun4v
71 DYNFLAGS_PLAT
= /usr
/platform
/\
$$PLATFORM/lib
/picl
/plugins
72 DYNFLAGS_SUN4V
= /usr
/platform
/sun4v
/lib
/picl
/plugins
73 DYNFLAGS_COM
= /usr
/lib
/picl
/plugins
75 ROOTLIBDIR
= $(ROOT_PLAT_PLUGINDIR
)
77 CLEANFILES
= $(LINTOUT
) $(LINTLIB
)
79 CPPFLAGS
+= -I
$(SRC
)/common
/mdesc
80 CPPFLAGS
+= -I
$(SRC
)/uts
/common
/sys
81 CPPFLAGS
+= -I
$(SRC
)/lib
/libpri
/common
82 CPPFLAGS
+= -D_REENTRANT
84 CFLAGS
+= $(CCVERBOSE
)
85 LDLIBS
+= -L
$(SRC
)/lib
/libpicl
/$(MACH
) -L
$(SRC
)/lib
/libpicltree
/$(MACH
)
86 LDLIBS
+= -L
$(ROOT
)/usr
/lib
/picl
/plugins
-L
$(ROOT
)/usr
/lib
/sparcv9
87 LDLIBS
+= -L
$(ROOT
)/usr
/lib
/libpri
88 LDLIBS
+= -L
$(ROOT_PLATFORM
)/lib
-L
$(ROOT_PLATFORM
)/lib
/picl
/plugins
90 LDLIBS
+= -lc
-lpicl
-lpicltree
-lpicldevtree
-lpri
92 # No interfaces from libsnmpplugin.so directly used here, but we need the
93 # snmp plugin to load and init before libpriplugin.so.
95 LDLIBS
+= -lsnmpplugin
97 #DYNFLAGS += -R$(DYNFLAGS_COM)
98 $(SPARC_BLD
)LDLIBS
+= -R
$(DYNFLAGS_PLAT
) \
100 LDLIBS
+= -R
$(DYNFLAGS_COM
)
102 LINTFLAGS
+= -erroff
=E_BAD_PTR_CAST_ALIGN
-v
106 all: $(LIBS
) $(LIBLINKS
)
108 install: all $(ROOTLIBDIR
) $(ROOTLIBS
) $(ROOTLINKS
)
111 $(RM
) $(LIBLINKS
); $(SYMLINK
) $(DYNLIB
) $(LIBLINKS
)
113 # include library targets
114 include $(SRC
)/cmd
/picl
/plugins
/Makefile.targ
115 include $(SRC
)/lib
/Makefile.targ
118 $(LINT.c
) $(LINT_SRC
)