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
73 CPPFLAGS
+= -I
$(SRC
)/cmd
/picl
/plugins
/lib
/picld_pluginutil
74 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
/mpxu
75 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
/ -I
$(SRC
)/uts
/common
/
76 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
/sys
/i2c
/clients
79 DYNFLAGS
+= -R
/usr
/platform
/\
$$PLATFORM/lib
/picl
/plugins
80 DYNFLAGS
+= -R
/usr
/platform
/sun4u
/lib
/picl
/plugins
:/usr
/lib
/picl
/plugins
81 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/lib
/picld_pluginutil
/$(MACH
)
82 LDLIBS
+= -L
$(DEVTREE_SRC_DIR
)
83 LDLIBS
+= -L
$(SRC
)/lib
/libpicltree
/$(MACH
)
84 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/memcfg
85 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/devtree
86 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/piclevent
87 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/sun4u
/envmon
88 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/frutree
89 LDLIBS
+= -L
$(ROOT
)/usr
/lib
/picl
/plugins
90 LDLIBS
+= -lc
-ldevinfo
-ldevice
91 LDLIBS
+= -lpicltree
-lpicld_pluginutil
-lnvpair
-lkstat
92 LDLIBS
+= -lpiclevent
-lpiclenvmon
-lpiclfrutree
101 install := TARGET
= install
102 clean := TARGET
= clean
103 clobber := TARGET
= clobber
106 all: $(LIBS
) $(LIBLINKS
) $(CONFS
)
108 install: $(ROOTLIBDIR
) all $(ROOTLIBS
) $(ROOTLINKS
) $(ROOTCONF
) \
109 $(PLAT_PLATFORM
) $(PLAT_LIB_DIR
) $(PLAT_PICL_DIR
) \
110 $(USR_PLAT_PLUGINS_DYNLIBS
) $(USR_PLAT_PLUGINS_LIBLINKS
)
112 $(CONFS
): $(MAININFO
) $(OTHERINFOS
)
114 @echo
"# Copyright 2003 Sun Microsystems, Inc. " \
115 "All rights reserved." > $@
116 @echo
"# This is a generated file. #ident lines identify sources" >> $@
117 $(CPP
) -P
$(@
:%.conf
=%.
info) | \
118 $(SED
) -e
'/^[ ]*$$/d' >> $@
121 _msg
: $(MSGDOMAIN
) $(POFILE
)
122 $(RM
) $(MSGDOMAIN
)/$(POFILE
)
123 $(CP
) $(POFILE
) $(MSGDOMAIN
)/mpxu_
$(POFILE
)
129 $(RM
) $@
; $(SYMLINK
) $(DYNLIB
) $@
131 # include library targets
132 include $(SRC
)/lib
/Makefile.targ
133 include $(SRC
)/cmd
/picl
/plugins
/Makefile.targ
135 $(ROOT_PLAT_PLUGINDIR
)/%: % $(ROOT_PLAT_PLUGINDIR
)
137 $(RM
) -r
$(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
) ;\
138 $(SYMLINK
) .
/$(DYNLIB
) $(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
)
147 $(PLAT_PLUGINS_DIRS
):
150 $(USR_PLAT_PLUGINS_DYNLIBS
): $(PLAT_PLUGINS_DIRS
)
152 $(SYMLINK
) $(MPXU_DYNLIB_DIR
)/$(DYNLIB
) $@
154 $(USR_PLAT_PLUGINS_LIBLINKS
): $(PLAT_PLUGINS_DIRS
)
156 $(SYMLINK
) $(MPXU_DYNLIB_DIR
)/$(DYNLIB
) $@
159 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)