xref: /illumos-gate/usr/src/cmd/halt/Makefile (revision e557d412e15c7f384b2ea3bf316a739a0f81cd55)
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
519397407SSherry Moore# Common Development and Distribution License (the "License").
619397407SSherry Moore# 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*e557d412SChristopher Kiick# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gatePROG = halt
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
297c478bd9Sstevel@tonic-gate
30753a6d45SSherry Moore#
31753a6d45SSherry Moore# Currently Fast Reboot is only supported on x86.
32050c4bfeSGangadhar Mylapuram# A new propery config/uadmin_boot_archive_sync is added to
33050c4bfeSGangadhar Mylapuram# boot-config service. Which needs a support on sparc also.
34753a6d45SSherry Moore#
35*e557d412SChristopher Kiicksparc_SUBDIRS = smf.sparc
36*e557d412SChristopher Kiicki386_SUBDIRS = smf.i386
37753a6d45SSherry MooreSUBDIRS = $($(MACH)_SUBDIRS)
38753a6d45SSherry Moore
39753a6d45SSherry MooreROOTLINKS = $(ROOTUSRSBIN)/poweroff $(ROOTUSRSBIN)/reboot
40753a6d45SSherry MooreROOTSYMLINKS= $(ROOTETC)/halt $(ROOTETC)/reboot
41753a6d45SSherry Moore
427c478bd9Sstevel@tonic-gateFILEMODE = 0755
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gate.KEEP_STATE:
457c478bd9Sstevel@tonic-gate
4619397407SSherry MooreCPPFLAGS += -I../../lib/libzpool/common
47753a6d45SSherry MooreCPPFLAGS += -I../../lib/libscf/inc
4819397407SSherry MooreCPPFLAGS += -I../../uts/common/fs/zfs
4919397407SSherry Moore
5019397407SSherry MooreLDLIBS += -lbsm -lscf -lzfs -lgen
51753a6d45SSherry MooreLDLIBS_i386 +=	-lgrubmgmt
52753a6d45SSherry MooreLDLIBS +=	$(LDLIBS_$(MACH))
537c478bd9Sstevel@tonic-gate
54753a6d45SSherry MooreCLOBBERFILES += $(ROOTLINKS) $(ROOTSYMLINKS)
55753a6d45SSherry Moore
56753a6d45SSherry Mooreall     :=	TARGET = all
57753a6d45SSherry Mooreinstall :=	TARGET = install
58753a6d45SSherry Mooreclean   :=	TARGET = clean
59753a6d45SSherry Mooreclobber :=	TARGET = clobber
60753a6d45SSherry Moorelint    :=	TARGET = lint
61753a6d45SSherry Moorelint	:=	LINTFLAGS = -u
62753a6d45SSherry Moore
63753a6d45SSherry Moore
64753a6d45SSherry Mooreall: $(PROG)
65753a6d45SSherry Moore
66753a6d45SSherry Mooreinstall: all $(ROOTUSRSBINPROG) $(ROOTLINKS) $(ROOTSYMLINKS) $(SUBDIRS)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate$(ROOTLINKS): $(ROOTUSRSBINPROG)
697c478bd9Sstevel@tonic-gate	$(RM) $@
707c478bd9Sstevel@tonic-gate	$(LN) $(ROOTUSRSBINPROG) $@
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate$(ROOTSYMLINKS):
737c478bd9Sstevel@tonic-gate	$(RM) $@
747c478bd9Sstevel@tonic-gate	$(SYMLINK) ../usr/sbin/$(PROG) $@
757c478bd9Sstevel@tonic-gate
76753a6d45SSherry Moore$(SUBDIRS):	FRC
77753a6d45SSherry Moore	@cd $@; pwd; $(MAKE) $(TARGET)
78753a6d45SSherry Moore
797c478bd9Sstevel@tonic-gateclean:
807c478bd9Sstevel@tonic-gate
81753a6d45SSherry Mooreclobber: $(SUBDIRS)
82753a6d45SSherry Moore
837c478bd9Sstevel@tonic-gatelint:	lint_PROG
847c478bd9Sstevel@tonic-gate
85753a6d45SSherry Moorecheck: $(CHKMANIFEST)
86753a6d45SSherry Moore
87753a6d45SSherry MooreFRC:
88753a6d45SSherry Moore
897c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
90