xref: /illumos-gate/usr/src/cmd/boot/bootadm/Makefile (revision d17be682)
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
558091fd8Ssetje# Common Development and Distribution License (the "License").
658091fd8Ssetje# 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#
2248847494SEnrico Perla - Sun Microsystems# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
245f10ef69SYuri Pankov#
252dc23587SToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com>
265f10ef69SYuri Pankov# Copyright 2016 Nexenta Systems, Inc.
2775383e32SAndy Fiddaman# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
285661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gatePROG= bootadm
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateSBINLINKS= $(PROG)
337c478bd9Sstevel@tonic-gate
34c262cbbcSToomas SoomeOBJS= bootadm.o bootadm_upgrade.o bootadm_hyper.o bootadm_digest.o \
35c262cbbcSToomas Soome	bootadm_loader.o
36c262cbbcSToomas SoomePOFILES= $(OBJS:%.o=%.po)
379632cfadSsetje
387c478bd9Sstevel@tonic-gateinclude ../Makefile.com
397c478bd9Sstevel@tonic-gate
40c262cbbcSToomas SoomePOFILE= bootadm_cmd.po
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gate.KEEP_STATE:
437c478bd9Sstevel@tonic-gate
44e998e519SSheshadri VasudevanLDLIBS_i386= -lfdisk
45703ced38SDan McDonaldLDLIBS += -lficl-sys -lmd -lcryptoutil -lnvpair -lgen -ladm -lefi
4675383e32SAndy FiddamanLDLIBS += -lscf -lz -lbe -lzfs -lofmt $(LDLIBS_$(MACH))
47*5801b0f0SToomas SoomeNATIVE_LIBS += libz.so
487c478bd9Sstevel@tonic-gate
4958091fd8SsetjeCPPFLAGS +=	-D_FILE_OFFSET_BITS=64
50c262cbbcSToomas SoomeCPPFLAGS +=	-I$(SRC)/uts/common -I$(SRC)/common -I$(SRC)/common/ficl
51ae115bc7Smrj
525661bb76SJohn LevonSMOFF +=	all_func_returns
535661bb76SJohn Levon
54bd0ce624SYuri PankovCSTD=	$(CSTD_GNU99)
557014882cSRichard Lowe
567c478bd9Sstevel@tonic-gateall: $(PROG)
577c478bd9Sstevel@tonic-gate
58ae115bc7Smrj$(PROG): $(OBJS) bootadm.h
599632cfadSsetje	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
609632cfadSsetje	$(POST_PROCESS)
619632cfadSsetje
62986fd29aSsetjeinstall: all $(ROOTSBINPROG) .WAIT $(ROOTUSRSBINLINKS)
637c478bd9Sstevel@tonic-gate
64c262cbbcSToomas Soome$(POFILE): $(POFILES)
65c262cbbcSToomas Soome	$(RM) $@
66c262cbbcSToomas Soome	$(CAT) $(POFILES) > $@
677c478bd9Sstevel@tonic-gate
68c262cbbcSToomas Soomeclean:
69c262cbbcSToomas Soome	-$(RM) $(OBJS) $(POFILE) $(POFILES)
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
72