cmd: remove sparc-only virtinfo
[unleashed.git] / usr / src / cmd / picl / plugins / sun4u / mpxu / frudr / Makefile
blobefcabe5a9fc72443077ebc8f7841ef5a833fc080
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
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
29 VERS = .1
31 OBJECTS = piclfrudr.o
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)
42 LIBS = $(DYNLIB)
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
61 CONFS += fru_SC.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
94 .KEEP_STATE:
96 SUBDIRS =
98 POFILE = piclfrudr.po
100 all := TARGET= all
101 install := TARGET= install
102 clean := TARGET= clean
103 clobber := TARGET= clobber
104 _msg := TARGET= _msg
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)
113 @$(RM) -f $@
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' >> $@
119 @$(CHMOD) 644 $@
121 _msg: $(MSGDOMAIN) $(POFILE)
122 $(RM) $(MSGDOMAIN)/$(POFILE)
123 $(CP) $(POFILE) $(MSGDOMAIN)/mpxu_$(POFILE)
125 $(MSGDOMAIN):
126 $(INS.dir)
128 $(LIBLINKS): FRC
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)
136 $(INS.file) ;\
137 $(RM) -r $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) ;\
138 $(SYMLINK) ./$(DYNLIB) $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS)
140 $(PLAT_PLATFORM):
141 $(INS.dir)
142 $(PLAT_LIB_DIR):
143 $(INS.dir)
144 $(PLAT_PICL_DIR):
145 $(INS.dir)
147 $(PLAT_PLUGINS_DIRS):
148 $(INS.dir)
150 $(USR_PLAT_PLUGINS_DYNLIBS): $(PLAT_PLUGINS_DIRS)
151 $(RM) -r $@ ;\
152 $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@
154 $(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS)
155 $(RM) -r $@ ;\
156 $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@
158 $(SUBDIRS): FRC
159 @cd $@; pwd; $(MAKE) $(TARGET)
161 FRC: