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]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 include $(SRC
)/Makefile.psm
28 LIBRARY
= libpiclfrudr.a
33 # include library definitions
34 include $(SRC
)/lib
/Makefile.lib
36 ROOT_PLATFORM
= $(USR_PLAT_DIR
)/SUNW
,Sun-Fire-V240
38 include $(SRC
)/cmd
/picl
/plugins
/Makefile.com
40 SRCS
= $(OBJECTS
:%.o
=%.c
)
44 ROOTLIBDIR
= $(ROOT_PLAT_PLUGINDIR
)
46 PLAT_PLATFORM
= $(USR_PLAT_DIR
)/SUNW
,Sun-Fire-V440
48 PLAT_LIB_DIR
= $(PLAT_PLATFORM
:%=%/lib
)
50 PLAT_PICL_DIR
= $(PLAT_LIB_DIR
:%=%/picl
)
52 PLAT_PLUGINS_DIRS
= $(PLAT_PICL_DIR
:%=%/plugins
)
54 USR_PLAT_PLUGINS_DYNLIBS
= $(PLAT_PLUGINS_DIRS
:%=%/$(DYNLIB
))
55 USR_PLAT_PLUGINS_LIBLINKS
= $(PLAT_PLUGINS_DIRS
:%=%/$(LIBLINKS
))
56 MPXU_DYNLIB_DIR
= ..
/..
/..
/..
/SUNW
,Sun-Fire-V240
/lib
/picl
/plugins
58 CONFS
= fru_PS0.conf fru_PS1.conf
59 CONFS
+= fru_HDD0.conf fru_HDD1.conf fru_HDD2.conf
60 CONFS
+= fru_HDD3.conf
62 CONFS
+= fru_usb-a-1.conf fru_usb-a-2.conf
63 ROOTCONF
= $(CONFS
:%=$(ROOTLIBDIR
)/%)
64 $(ROOTCONF
) := FILEMODE
= 0644
65 MAININFO
= $(CONFS
:%.conf
=%.
info)
66 OTHERINFOS
= fru_PS0_data.
info fru_PS1_data.
info
67 OTHERINFOS
+= fru_HDD0_data.
info fru_HDD1_data.
info
68 OTHERINFOS
+= fru_HDD2_data.
info fru_HDD3_data.
info
69 OTHERINFOS
+= fru_SC_data.
info SB-tables.
info
70 OTHERINFOS
+= fru_usb-a-1_data.
info fru_usb-a-2_data.
info
72 LINTSRC
= $(LINTLIB
:%.ln
=%)
73 ROOTLINTDIR
= $(ROOTLIBDIR
)
74 ROOTLINT
= $(LINTSRC
:%=$(ROOTLINTDIR
)/%)
76 CLEANFILES
= $(LINTOUT
) $(LINTLIB
)
78 CPPFLAGS
+= -D_REENTRANT
79 CPPFLAGS
+= -I
$(SRC
)/cmd
/picl
/plugins
/lib
/picld_pluginutil
80 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
/mpxu
81 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
/ -I
$(SRC
)/uts
/common
/
82 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
/sys
/i2c
/clients
84 CFLAGS
+= $(CCVERBOSE
)
86 DYNFLAGS
+= -R
/usr
/platform
/\
$$PLATFORM/lib
/picl
/plugins
87 DYNFLAGS
+= -R
/usr
/platform
/sun4u
/lib
/picl
/plugins
:/usr
/lib
/picl
/plugins
88 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/lib
/picld_pluginutil
/$(MACH
)
89 LDLIBS
+= -L
$(DEVTREE_SRC_DIR
)
90 LDLIBS
+= -L
$(SRC
)/lib
/libpicltree
/$(MACH
)
91 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/memcfg
92 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/devtree
93 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/piclevent
94 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/sun4u
/envmon
95 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/frutree
96 LDLIBS
+= -L
$(ROOT
)/usr
/lib
/picl
/plugins
97 LDLIBS
+= -lc
-ldevinfo
-ldevice
98 LDLIBS
+= -lpicltree
-lpicld_pluginutil
-lnvpair
-lkstat
99 LDLIBS
+= -lpiclevent
-lpiclenvmon
-lpiclfrutree
105 POFILE
= piclfrudr.po
108 install := TARGET
= install
109 clean := TARGET
= clean
110 clobber := TARGET
= clobber
114 all: $(LIBS
) $(LIBLINKS
) $(CONFS
)
116 install: $(ROOTLIBDIR
) all $(ROOTLIBS
) $(ROOTLINKS
) $(ROOTCONF
) \
117 $(PLAT_PLATFORM
) $(PLAT_LIB_DIR
) $(PLAT_PICL_DIR
) \
118 $(USR_PLAT_PLUGINS_DYNLIBS
) $(USR_PLAT_PLUGINS_LIBLINKS
)
120 $(CONFS
): $(MAININFO
) $(OTHERINFOS
)
122 @echo
"# Copyright 2003 Sun Microsystems, Inc. " \
123 "All rights reserved." > $@
124 @echo
"# This is a generated file. #ident lines identify sources" >> $@
125 $(CPP
) -P
$(@
:%.conf
=%.
info) | \
126 $(SED
) -e
'/^[ ]*$$/d' >> $@
129 _msg
: $(MSGDOMAIN
) $(POFILE
)
130 $(RM
) $(MSGDOMAIN
)/$(POFILE
)
131 $(CP
) $(POFILE
) $(MSGDOMAIN
)/mpxu_
$(POFILE
)
137 $(RM
) $@
; $(SYMLINK
) $(DYNLIB
) $@
139 # include library targets
140 include $(SRC
)/lib
/Makefile.targ
141 include $(SRC
)/cmd
/picl
/plugins
/Makefile.targ
143 $(ROOT_PLAT_PLUGINDIR
)/%: % $(ROOT_PLAT_PLUGINDIR
)
145 $(RM
) -r
$(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
) ;\
146 $(SYMLINK
) .
/$(DYNLIB
) $(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
)
155 $(PLAT_PLUGINS_DIRS
):
158 $(USR_PLAT_PLUGINS_DYNLIBS
): $(PLAT_PLUGINS_DIRS
)
160 $(SYMLINK
) $(MPXU_DYNLIB_DIR
)/$(DYNLIB
) $@
162 $(USR_PLAT_PLUGINS_LIBLINKS
): $(PLAT_PLUGINS_DIRS
)
164 $(SYMLINK
) $(MPXU_DYNLIB_DIR
)/$(DYNLIB
) $@
166 $(ROOTLINTDIR
)/%: ..
/%
173 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)