8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / picl / plugins / sun4u / mpxu / frudr / Makefile
blob7624c2cf555cfe05e2cf569fcf0cdb415604e3be
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
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
101 .KEEP_STATE:
103 SUBDIRS =
105 POFILE = piclfrudr.po
107 all := TARGET= all
108 install := TARGET= install
109 clean := TARGET= clean
110 clobber := TARGET= clobber
111 lint := TARGET= lint
112 _msg := TARGET= _msg
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)
121 @$(RM) -f $@
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' >> $@
127 @$(CHMOD) 644 $@
129 _msg: $(MSGDOMAIN) $(POFILE)
130 $(RM) $(MSGDOMAIN)/$(POFILE)
131 $(CP) $(POFILE) $(MSGDOMAIN)/mpxu_$(POFILE)
133 $(MSGDOMAIN):
134 $(INS.dir)
136 $(LIBLINKS): FRC
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)
144 $(INS.file) ;\
145 $(RM) -r $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) ;\
146 $(SYMLINK) ./$(DYNLIB) $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS)
148 $(PLAT_PLATFORM):
149 $(INS.dir)
150 $(PLAT_LIB_DIR):
151 $(INS.dir)
152 $(PLAT_PICL_DIR):
153 $(INS.dir)
155 $(PLAT_PLUGINS_DIRS):
156 $(INS.dir)
158 $(USR_PLAT_PLUGINS_DYNLIBS): $(PLAT_PLUGINS_DIRS)
159 $(RM) -r $@ ;\
160 $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@
162 $(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS)
163 $(RM) -r $@ ;\
164 $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@
166 $(ROOTLINTDIR)/%: ../%
167 $(INS.file)
169 lint:
170 $(LINT.c) $(SRCS)
172 $(SUBDIRS): FRC
173 @cd $@; pwd; $(MAKE) $(TARGET)
175 FRC: