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. 247c478bd9Sstevel@tonic-gate# 25e373b6e4SYuri Pankov# Copyright 2016 Nexenta Systems, Inc. 26eeb2c267SToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com> 276debd3f5SAlexander Eremin# 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gatePROG= bootadm 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateSBINLINKS= $(PROG) 327c478bd9Sstevel@tonic-gate 33f64ca102SToomas SoomeOBJS= bootadm.o bootadm_upgrade.o bootadm_hyper.o bootadm_digest.o \ 34f64ca102SToomas Soome bootadm_loader.o 359632cfadSsetjeSRCS = $(OBJS:.o=.c) 36f64ca102SToomas SoomePOFILES= $(OBJS:%.o=%.po) 379632cfadSsetje 387c478bd9Sstevel@tonic-gateinclude ../Makefile.com 397c478bd9Sstevel@tonic-gate 40f64ca102SToomas SoomePOFILE= bootadm_cmd.po 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate.KEEP_STATE: 437c478bd9Sstevel@tonic-gate 44e998e519SSheshadri VasudevanLDLIBS_i386= -lfdisk 4559bbc19bSDan McDonaldLDLIBS += -lficl-sys -lmd -lcryptoutil -lnvpair -lgen -ladm -lefi 46*353ca6f2SToomas SoomeLDLIBS += -lz -lbe -lzfs -lofmt $(LDLIBS_$(MACH)) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate# Writing into string literals is incorrect. We need to match gcc's 497c478bd9Sstevel@tonic-gate# behavior, which causes us to take SIGSEGV on such a write. 507c478bd9Sstevel@tonic-gateCFLAGS += $(XSTRCONST) 5158091fd8SsetjeCPPFLAGS += -D_FILE_OFFSET_BITS=64 52f64ca102SToomas SoomeCPPFLAGS += -I$(SRC)/uts/common -I$(SRC)/common -I$(SRC)/common/ficl 53ae115bc7Smrj 54110570ceSToomas SoomeC99MODE= $(C99_ENABLE) 557014882cSRichard Lowe 5648847494SEnrico Perla - Sun MicrosystemsLINTFLAGS += -erroff=E_INCONS_ARG_DECL2 5748847494SEnrico Perla - Sun MicrosystemsLINTFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2 58e998e519SSheshadri VasudevanLINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 5948847494SEnrico Perla - Sun Microsystems 607c478bd9Sstevel@tonic-gateall: $(PROG) 617c478bd9Sstevel@tonic-gate 62ae115bc7Smrj$(PROG): $(OBJS) bootadm.h 639632cfadSsetje $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 649632cfadSsetje $(POST_PROCESS) 659632cfadSsetje 66986fd29aSsetjeinstall: all $(ROOTSBINPROG) .WAIT $(ROOTUSRSBINLINKS) 677c478bd9Sstevel@tonic-gate 68f64ca102SToomas Soome$(POFILE): $(POFILES) 69f64ca102SToomas Soome $(RM) $@ 70f64ca102SToomas Soome $(CAT) $(POFILES) > $@ 717c478bd9Sstevel@tonic-gate 72f64ca102SToomas Soomeclean: 73f64ca102SToomas Soome -$(RM) $(OBJS) $(POFILE) $(POFILES) 747c478bd9Sstevel@tonic-gate 75ae115bc7Smrjlint: lint_SRCS 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 78