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 5f841f6adSraf# Common Development and Distribution License (the "License"). 6f841f6adSraf# 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# 22*1cfa752fSRamaswamy Tummala# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 237c478bd9Sstevel@tonic-gate# 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gateCOMMON = ../common 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateRCM_SRC = \ 307c478bd9Sstevel@tonic-gate $(COMMON)/rcm_event.c \ 317c478bd9Sstevel@tonic-gate $(COMMON)/rcm_main.c \ 327c478bd9Sstevel@tonic-gate $(COMMON)/rcm_impl.c \ 337c478bd9Sstevel@tonic-gate $(COMMON)/rcm_subr.c \ 347c478bd9Sstevel@tonic-gate $(COMMON)/rcm_lock.c \ 357c478bd9Sstevel@tonic-gate $(COMMON)/rcm_script.c 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gateRCM_OBJ = \ 387c478bd9Sstevel@tonic-gate rcm_event.o \ 397c478bd9Sstevel@tonic-gate rcm_main.o \ 407c478bd9Sstevel@tonic-gate rcm_impl.o \ 417c478bd9Sstevel@tonic-gate rcm_subr.o \ 427c478bd9Sstevel@tonic-gate rcm_lock.o \ 437c478bd9Sstevel@tonic-gate rcm_script.o 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateCOMMON_MOD_SRC = \ 467c478bd9Sstevel@tonic-gate $(COMMON)/filesys_rcm.c \ 477c478bd9Sstevel@tonic-gate $(COMMON)/dump_rcm.c \ 487c478bd9Sstevel@tonic-gate $(COMMON)/swap_rcm.c \ 497c478bd9Sstevel@tonic-gate $(COMMON)/network_rcm.c \ 50d62bc4baSyz147064 $(COMMON)/vlan_rcm.c \ 51da14cebeSEric Cheng $(COMMON)/vnic_rcm.c \ 52*1cfa752fSRamaswamy Tummala $(COMMON)/ibpart_rcm.c \ 53d62bc4baSyz147064 $(COMMON)/aggr_rcm.c \ 547c478bd9Sstevel@tonic-gate $(COMMON)/ip_rcm.c \ 557c478bd9Sstevel@tonic-gate $(COMMON)/cluster_rcm.c \ 567c478bd9Sstevel@tonic-gate $(COMMON)/pool_rcm.c \ 577c478bd9Sstevel@tonic-gate $(COMMON)/mpxio_rcm.c \ 587c478bd9Sstevel@tonic-gate $(COMMON)/ip_anon_rcm.c \ 594eaa4710SRishi Srivatsavai $(COMMON)/svm_rcm.c \ 604eaa4710SRishi Srivatsavai $(COMMON)/bridge_rcm.c 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gatesparc_MOD_SRC = $(COMMON)/ttymux_rcm.c 637c478bd9Sstevel@tonic-gate 64045b72beSjm22469COMMON_PERL_SCRIPT_SRC = 65045b72beSjm22469 66045b72beSjm22469sparc_PERL_SCRIPT_SRC = SUNW,vdevices.pl 67045b72beSjm22469 6851f34d4bSRajkumar SivaprakasamCOMMON_SHELL_SCRIPT_SRC = SUNW,ibsdpu.sh 6951f34d4bSRajkumar Sivaprakasam 707c478bd9Sstevel@tonic-gateCOMMON_MOD_OBJ = \ 717c478bd9Sstevel@tonic-gate filesys_rcm.o \ 727c478bd9Sstevel@tonic-gate dump_rcm.o \ 737c478bd9Sstevel@tonic-gate swap_rcm.o \ 747c478bd9Sstevel@tonic-gate network_rcm.o \ 75d62bc4baSyz147064 vlan_rcm.o \ 76da14cebeSEric Cheng vnic_rcm.o \ 77*1cfa752fSRamaswamy Tummala ibpart_rcm.o \ 78d62bc4baSyz147064 aggr_rcm.o \ 797c478bd9Sstevel@tonic-gate ip_rcm.o \ 807c478bd9Sstevel@tonic-gate cluster_rcm.o \ 817c478bd9Sstevel@tonic-gate pool_rcm.o \ 827c478bd9Sstevel@tonic-gate mpxio_rcm.o \ 837c478bd9Sstevel@tonic-gate ip_anon_rcm.o \ 844eaa4710SRishi Srivatsavai svm_rcm.o \ 854eaa4710SRishi Srivatsavai bridge_rcm.o 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gatesparc_MOD_OBJ = ttymux_rcm.o 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gateRCM_DAEMON = rcm_daemon 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateCOMMON_RCM_MODS = \ 927c478bd9Sstevel@tonic-gate SUNW_filesys_rcm.so \ 937c478bd9Sstevel@tonic-gate SUNW_dump_rcm.so \ 947c478bd9Sstevel@tonic-gate SUNW_swap_rcm.so \ 957c478bd9Sstevel@tonic-gate SUNW_network_rcm.so \ 96d62bc4baSyz147064 SUNW_vlan_rcm.so \ 97da14cebeSEric Cheng SUNW_vnic_rcm.so \ 98*1cfa752fSRamaswamy Tummala SUNW_ibpart_rcm.so \ 99d62bc4baSyz147064 SUNW_aggr_rcm.so \ 1007c478bd9Sstevel@tonic-gate SUNW_ip_rcm.so \ 1017c478bd9Sstevel@tonic-gate SUNW_cluster_rcm.so \ 1027c478bd9Sstevel@tonic-gate SUNW_pool_rcm.so \ 1037c478bd9Sstevel@tonic-gate SUNW_mpxio_rcm.so \ 1047c478bd9Sstevel@tonic-gate SUNW_ip_anon_rcm.so \ 1054eaa4710SRishi Srivatsavai SUNW_svm_rcm.so \ 1064eaa4710SRishi Srivatsavai SUNW_bridge_rcm.so 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gatesparc_RCM_MODS = SUNW_ttymux_rcm.so 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gateRCM_DIR = rcm 1117c478bd9Sstevel@tonic-gateMOD_DIR = modules 1127c478bd9Sstevel@tonic-gateSCRIPT_DIR = scripts 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gateCLOBBERFILES = $(COMMON_RCM_MODS) $($(MACH)_RCM_MODS) $(RCM_DAEMON) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gateLINT_MODULES = $(COMMON_MOD_SRC:.c=.ln) $($(MACH)_MOD_SRC:.c=.ln) 1177c478bd9Sstevel@tonic-gate 1180406ceaaSmeemCPPFLAGS += -I.. 1197c478bd9Sstevel@tonic-gateCPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT 1207c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) $(C_PICFLAGS) 1217c478bd9Sstevel@tonic-gate 12224da5b34SrieMAPFILES = ../common/mapfile-intf $(MAPFILE.NGB) 12324da5b34Sriercm_daemon := LDFLAGS += $(MAPFILES:%=-M%) 12424da5b34Srie 1257c478bd9Sstevel@tonic-gateLINTFLAGS += -u -erroff=E_FUNC_ARG_UNUSED 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gateLDLIBS_MODULES = 1287c478bd9Sstevel@tonic-gateSUNW_pool_rcm.so := LDLIBS_MODULES += -L$(ROOT)/usr/lib -lpool 1297c478bd9Sstevel@tonic-gateSUNW_svm_rcm.so := LDLIBS_MODULES += -L$(ROOT)/usr/lib -lmeta 130f595a68aSyz147064SUNW_network_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm 131d62bc4baSyz147064SUNW_vlan_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm 132da14cebeSEric ChengSUNW_vnic_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm 133*1cfa752fSRamaswamy TummalaSUNW_ibpart_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm 134d62bc4baSyz147064SUNW_aggr_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm 1356e91bba0SGirish MoodalbailSUNW_ip_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -linetutil -ldladm -lipmp -lipadm 1360406ceaaSmeemSUNW_ip_anon_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -linetutil 1374eaa4710SRishi SrivatsavaiSUNW_bridge_rcm.so := LDLIBS_MODULES += -L$(ROOT)/lib -ldladm 1387c478bd9Sstevel@tonic-gate 13906e1a714SrafLDLIBS += -lgen -lelf -lrcm -lnvpair -ldevinfo -lnsl -lsocket 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gateSRCS = $(RCM_SRC) $(COMMON_MOD_SRC) 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gatePOFILES = $(SRCS:.c=.po) 1447c478bd9Sstevel@tonic-gatePOFILE = prcm_daemon.po 1457c478bd9Sstevel@tonic-gate 146045b72beSjm22469PERL_SCRIPTS = $(COMMON_PERL_SRC) $($(MACH)_PERL_SCRIPT_SRC) 14751f34d4bSRajkumar SivaprakasamSHELL_SCRIPTS = $(COMMON_SHELL_SCRIPT_SRC) 14851f34d4bSRajkumar SivaprakasamRCM_SCRIPTS = $(PERL_SCRIPTS) $(SHELL_SCRIPTS) 149045b72beSjm22469 1507c478bd9Sstevel@tonic-gate# install specifics 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gateROOTLIB_RCM = $(ROOTLIB)/$(RCM_DIR) 1537c478bd9Sstevel@tonic-gateROOTLIB_RCM_MOD = $(ROOTLIB_RCM)/$(MOD_DIR) 1547c478bd9Sstevel@tonic-gateROOTLIB_RCM_DAEMON = $(RCM_DAEMON:%=$(ROOTLIB_RCM)/%) 1557c478bd9Sstevel@tonic-gateROOTLIB_RCM_MODULES = $(COMMON_RCM_MODS:%=$(ROOTLIB_RCM_MOD)/%) \ 1567c478bd9Sstevel@tonic-gate $($(MACH)_RCM_MODS:%=$(ROOTLIB_RCM_MOD)/%) 1577c478bd9Sstevel@tonic-gateROOTLIB_RCM_SCRIPT = $(ROOTLIB_RCM)/$(SCRIPT_DIR) 158045b72beSjm22469ROOTLIB_RCM_SCRIPTS = $(RCM_SCRIPTS:%=$(ROOTLIB_RCM_SCRIPT)/%) 1597c478bd9Sstevel@tonic-gateROOTETC_RCM = $(ROOTETC)/$(RCM_DIR) 1607c478bd9Sstevel@tonic-gateROOTETC_RCM_SCRIPT = $(ROOTETC_RCM)/$(SCRIPT_DIR) 1617c478bd9Sstevel@tonic-gate 1627c478bd9Sstevel@tonic-gateall := TARGET= all 1637c478bd9Sstevel@tonic-gateinstall := TARGET= install 1647c478bd9Sstevel@tonic-gateclean := TARGET= clean 1657c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 1667c478bd9Sstevel@tonic-gatelint := TARGET= lint 1677c478bd9Sstevel@tonic-gate 168045b72beSjm22469$(ROOTLIB_RCM_SCRIPTS) := FILEMODE = 555 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gate.KEEP_STATE: 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gateall: $(RCM_DAEMON) $(COMMON_RCM_MODS) $($(MACH)_RCM_MODS) 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gateinstall: all \ 1757c478bd9Sstevel@tonic-gate $(ROOTLIB_RCM) \ 1767c478bd9Sstevel@tonic-gate $(ROOTLIB_RCM_DAEMON) \ 1777c478bd9Sstevel@tonic-gate $(ROOTLIB_RCM_MOD) \ 1787c478bd9Sstevel@tonic-gate $(ROOTLIB_RCM_MODULES) \ 1797c478bd9Sstevel@tonic-gate $(ROOTLIB_RCM_SCRIPT) \ 1807c478bd9Sstevel@tonic-gate $(ROOTETC_RCM) \ 181045b72beSjm22469 $(ROOTETC_RCM_SCRIPT) \ 182045b72beSjm22469 $(ROOTLIB_RCM_SCRIPTS) 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gateclean: 1857c478bd9Sstevel@tonic-gate $(RM) $(RCM_OBJ) $(COMMON_MOD_OBJ) $($(MACH)_MOD_OBJ) $(POFILES) 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gatelint: $(RCM_DAEMON).ln $(LINT_MODULES) 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate$(RCM_DAEMON).ln: FRC 1907c478bd9Sstevel@tonic-gate $(LINT.c) $(RCM_SRC) $(LDLIBS) 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate%.ln: FRC 1937c478bd9Sstevel@tonic-gate $(LINT.c) $(RCM_SRC) $(@:.ln=.c) $(LDLIBS) 1947c478bd9Sstevel@tonic-gate 1957c478bd9Sstevel@tonic-gateFRC: 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 1987c478bd9Sstevel@tonic-gate 1997c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) 2007c478bd9Sstevel@tonic-gate $(RM) $@; cat $(POFILES) > $@ 2017c478bd9Sstevel@tonic-gate 20224da5b34Srie$(RCM_DAEMON): $(RCM_OBJ) $(MAPFILES) 2037c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $< $(RCM_OBJ) $(LDLIBS) 2047c478bd9Sstevel@tonic-gate $(POST_PROCESS) 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gateSUNW_%.so: %.o 2077c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(GSHARED) -h $@ $< $(LDLIBS_MODULES) 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate%.o: $(COMMON)/%.c 2107c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2117c478bd9Sstevel@tonic-gate 2127c478bd9Sstevel@tonic-gate$(ROOTLIB_RCM): 2137c478bd9Sstevel@tonic-gate $(INS.dir) 2147c478bd9Sstevel@tonic-gate 2157c478bd9Sstevel@tonic-gate$(ROOTLIB_RCM)/%: % 2167c478bd9Sstevel@tonic-gate $(INS.file) 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate$(ROOTLIB_RCM_MOD): 2197c478bd9Sstevel@tonic-gate $(INS.dir) 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate$(ROOTLIB_RCM_MOD)/%: % 2227c478bd9Sstevel@tonic-gate $(INS.file) 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate$(ROOTLIB_RCM_SCRIPT): 2257c478bd9Sstevel@tonic-gate $(INS.dir) 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gate$(ROOTETC_RCM): 2287c478bd9Sstevel@tonic-gate $(INS.dir) 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gate$(ROOTETC_RCM_SCRIPT): 2317c478bd9Sstevel@tonic-gate $(INS.dir) 232045b72beSjm22469 233045b72beSjm22469$(ROOTLIB_RCM_SCRIPT)/%: $(COMMON)/% 234045b72beSjm22469 $(INS.file) 235