17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 524fe0b3bSjmcp# Common Development and Distribution License (the "License"). 624fe0b3bSjmcp# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.psm 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateLIBRARY = libpiclfrudr.a 297c478bd9Sstevel@tonic-gateVERS = .1 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateOBJECTS = piclfrudr.o 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate# include library definitions 347c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.lib 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gateROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/picl/plugins/Makefile.com 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gateSRCS = $(OBJECTS:%.o=%.c) 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gateLIBS = $(DYNLIB) 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gatePLAT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V440 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gatePLAT_LIB_DIR = $(PLAT_PLATFORM:%=%/lib) 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gatePLAT_PICL_DIR = $(PLAT_LIB_DIR:%=%/picl) 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gatePLAT_PLUGINS_DIRS = $(PLAT_PICL_DIR:%=%/plugins) 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateUSR_PLAT_PLUGINS_DYNLIBS = $(PLAT_PLUGINS_DIRS:%=%/$(DYNLIB)) 557c478bd9Sstevel@tonic-gateUSR_PLAT_PLUGINS_LIBLINKS = $(PLAT_PLUGINS_DIRS:%=%/$(LIBLINKS)) 567c478bd9Sstevel@tonic-gateMPXU_DYNLIB_DIR = ../../../../SUNW,Sun-Fire-V240/lib/picl/plugins 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gateCONFS = fru_PS0.conf fru_PS1.conf 597c478bd9Sstevel@tonic-gateCONFS += fru_HDD0.conf fru_HDD1.conf fru_HDD2.conf 607c478bd9Sstevel@tonic-gateCONFS += fru_HDD3.conf 617c478bd9Sstevel@tonic-gateCONFS += fru_SC.conf 627c478bd9Sstevel@tonic-gateCONFS += fru_usb-a-1.conf fru_usb-a-2.conf 637c478bd9Sstevel@tonic-gateROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) 647c478bd9Sstevel@tonic-gate$(ROOTCONF) := FILEMODE = 0644 657c478bd9Sstevel@tonic-gateMAININFO= $(CONFS:%.conf=%.info) 667c478bd9Sstevel@tonic-gateOTHERINFOS = fru_PS0_data.info fru_PS1_data.info 677c478bd9Sstevel@tonic-gateOTHERINFOS += fru_HDD0_data.info fru_HDD1_data.info 687c478bd9Sstevel@tonic-gateOTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info 697c478bd9Sstevel@tonic-gateOTHERINFOS += fru_SC_data.info SB-tables.info 707c478bd9Sstevel@tonic-gateOTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gateCPPFLAGS += -D_REENTRANT 737c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil 747c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/sun4u/mpxu 757c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ 767c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/sun4u/sys/i2c/clients 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gateDYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins 817c478bd9Sstevel@tonic-gateDYNFLAGS += -R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins 827c478bd9Sstevel@tonic-gateLDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) 837c478bd9Sstevel@tonic-gateLDLIBS += -L$(DEVTREE_SRC_DIR) 847c478bd9Sstevel@tonic-gateLDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) 857c478bd9Sstevel@tonic-gateLDLIBS += -L$(SRC)/cmd/picl/plugins/common/memcfg 867c478bd9Sstevel@tonic-gateLDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree 877c478bd9Sstevel@tonic-gateLDLIBS += -L$(SRC)/cmd/picl/plugins/common/piclevent 887c478bd9Sstevel@tonic-gateLDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/envmon 897c478bd9Sstevel@tonic-gateLDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree 907c478bd9Sstevel@tonic-gateLDLIBS += -L$(ROOT)/usr/lib/picl/plugins 917c478bd9Sstevel@tonic-gateLDLIBS += -lc -ldevinfo -ldevice 92*1872d23eSToomas SoomeLDLIBS += -lpicltree -lpicld_pluginutil -lnvpair 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate.KEEP_STATE: 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateSUBDIRS = 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gatePOFILE = piclfrudr.po 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gateall := TARGET= all 1017c478bd9Sstevel@tonic-gateinstall := TARGET= install 1027c478bd9Sstevel@tonic-gateclean := TARGET= clean 1037c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 1047c478bd9Sstevel@tonic-gate_msg := TARGET= _msg 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gateall: $(LIBS) $(LIBLINKS) $(CONFS) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gateinstall: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) \ 1097c478bd9Sstevel@tonic-gate $(PLAT_PLATFORM) $(PLAT_LIB_DIR) $(PLAT_PICL_DIR) \ 1107c478bd9Sstevel@tonic-gate $(USR_PLAT_PLUGINS_DYNLIBS) $(USR_PLAT_PLUGINS_LIBLINKS) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate$(CONFS): $(MAININFO) $(OTHERINFOS) 1137c478bd9Sstevel@tonic-gate @$(RM) -f $@ 1147c478bd9Sstevel@tonic-gate @echo "# Copyright 2003 Sun Microsystems, Inc. " \ 1157c478bd9Sstevel@tonic-gate "All rights reserved." > $@ 1167c478bd9Sstevel@tonic-gate @echo "# This is a generated file. #ident lines identify sources" >> $@ 1177c478bd9Sstevel@tonic-gate $(CPP) -P $(@:%.conf=%.info) | \ 1187c478bd9Sstevel@tonic-gate $(SED) -e '/^[ ]*$$/d' >> $@ 1197c478bd9Sstevel@tonic-gate @$(CHMOD) 644 $@ 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate_msg: $(MSGDOMAIN) $(POFILE) 1227c478bd9Sstevel@tonic-gate $(RM) $(MSGDOMAIN)/$(POFILE) 1237c478bd9Sstevel@tonic-gate $(CP) $(POFILE) $(MSGDOMAIN)/mpxu_$(POFILE) 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate$(MSGDOMAIN): 1267c478bd9Sstevel@tonic-gate $(INS.dir) 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate$(LIBLINKS): FRC 1297c478bd9Sstevel@tonic-gate $(RM) $@; $(SYMLINK) $(DYNLIB) $@ 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate# include library targets 1327c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ 1337c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/picl/plugins/Makefile.targ 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate$(ROOT_PLAT_PLUGINDIR)/%: % $(ROOT_PLAT_PLUGINDIR) 1367c478bd9Sstevel@tonic-gate $(INS.file) ;\ 1377c478bd9Sstevel@tonic-gate $(RM) -r $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) ;\ 1387c478bd9Sstevel@tonic-gate $(SYMLINK) ./$(DYNLIB) $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gate$(PLAT_PLATFORM): 1417c478bd9Sstevel@tonic-gate $(INS.dir) 1427c478bd9Sstevel@tonic-gate$(PLAT_LIB_DIR): 1437c478bd9Sstevel@tonic-gate $(INS.dir) 1447c478bd9Sstevel@tonic-gate$(PLAT_PICL_DIR): 1457c478bd9Sstevel@tonic-gate $(INS.dir) 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate$(PLAT_PLUGINS_DIRS): 1487c478bd9Sstevel@tonic-gate $(INS.dir) 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate$(USR_PLAT_PLUGINS_DYNLIBS): $(PLAT_PLUGINS_DIRS) 1517c478bd9Sstevel@tonic-gate $(RM) -r $@ ;\ 1527c478bd9Sstevel@tonic-gate $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@ 1537c478bd9Sstevel@tonic-gate 1547c478bd9Sstevel@tonic-gate$(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS) 1557c478bd9Sstevel@tonic-gate $(RM) -r $@ ;\ 1567c478bd9Sstevel@tonic-gate $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@ 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gatelint: 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 1617c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gateFRC: 164