xref: /illumos-gate/usr/src/cmd/halt/Makefile (revision 1b2ec6d6)
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#
219abc7a57SToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com>
22e557d412SChristopher Kiick# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
24*ab618543SJohn Levon# Copyright 2018 Joyent, Inc.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gatePROG = halt
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
307c478bd9Sstevel@tonic-gate
31753a6d45SSherry Moore#
32753a6d45SSherry Moore# Currently Fast Reboot is only supported on x86.
33050c4bfeSGangadhar Mylapuram# A new propery config/uadmin_boot_archive_sync is added to
34050c4bfeSGangadhar Mylapuram# boot-config service. Which needs a support on sparc also.
35753a6d45SSherry Moore#
36e557d412SChristopher Kiicksparc_SUBDIRS = smf.sparc
37e557d412SChristopher Kiicki386_SUBDIRS = smf.i386
38753a6d45SSherry MooreSUBDIRS = $($(MACH)_SUBDIRS)
39753a6d45SSherry Moore
40753a6d45SSherry MooreROOTLINKS = $(ROOTUSRSBIN)/poweroff $(ROOTUSRSBIN)/reboot
41753a6d45SSherry MooreROOTSYMLINKS= $(ROOTETC)/halt $(ROOTETC)/reboot
42753a6d45SSherry Moore
437c478bd9Sstevel@tonic-gateFILEMODE = 0755
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gate.KEEP_STATE:
467c478bd9Sstevel@tonic-gate
4719397407SSherry MooreCPPFLAGS += -I../../lib/libzpool/common
48753a6d45SSherry MooreCPPFLAGS += -I../../lib/libscf/inc
4919397407SSherry MooreCPPFLAGS += -I../../uts/common/fs/zfs
5019397407SSherry Moore
5119397407SSherry MooreLDLIBS += -lbsm -lscf -lzfs -lgen
529abc7a57SToomas SoomeLDLIBS_i386 +=	-lbe
53753a6d45SSherry MooreLDLIBS +=	$(LDLIBS_$(MACH))
54753a6d45SSherry Moore
55753a6d45SSherry MooreCLOBBERFILES += $(ROOTLINKS) $(ROOTSYMLINKS)
56753a6d45SSherry Moore
57753a6d45SSherry Mooreall     :=	TARGET = all
58753a6d45SSherry Mooreinstall :=	TARGET = install
59753a6d45SSherry Mooreclean   :=	TARGET = clean
60753a6d45SSherry Mooreclobber :=	TARGET = clobber
61753a6d45SSherry Moorelint    :=	TARGET = lint
62*ab618543SJohn Levonlint	:=	LINTFLAGS += -u
63753a6d45SSherry Moore
64753a6d45SSherry Moore
65*ab618543SJohn Levonall: $(PROG)
667c478bd9Sstevel@tonic-gate
67753a6d45SSherry Mooreinstall: all $(ROOTUSRSBINPROG) $(ROOTLINKS) $(ROOTSYMLINKS) $(SUBDIRS)
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gate$(ROOTLINKS): $(ROOTUSRSBINPROG)
707c478bd9Sstevel@tonic-gate	$(RM) $@
717c478bd9Sstevel@tonic-gate	$(LN) $(ROOTUSRSBINPROG) $@
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate$(ROOTSYMLINKS):
747c478bd9Sstevel@tonic-gate	$(RM) $@
757c478bd9Sstevel@tonic-gate	$(SYMLINK) ../usr/sbin/$(PROG) $@
767c478bd9Sstevel@tonic-gate
77753a6d45SSherry Moore$(SUBDIRS):	FRC
78753a6d45SSherry Moore	@cd $@; pwd; $(MAKE) $(TARGET)
79753a6d45SSherry Moore
807c478bd9Sstevel@tonic-gateclean:
817c478bd9Sstevel@tonic-gate
82753a6d45SSherry Mooreclobber: $(SUBDIRS)
83753a6d45SSherry Moore
847c478bd9Sstevel@tonic-gatelint:	lint_PROG
857c478bd9Sstevel@tonic-gate
86753a6d45SSherry Moorecheck: $(CHKMANIFEST)
87753a6d45SSherry Moore
88753a6d45SSherry MooreFRC:
89753a6d45SSherry Moore
907c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
91