fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# The contents of this file are subject to the terms of the
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrock# Common Development and Distribution License (the "License").
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrock# You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens# or http://www.opensolaris.org/os/licensing.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens# and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens# fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens# information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Use is subject to license terms.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
4445fffbbb1ea25fd0e9ea68b9380dd7a6709025Matthew Ahrens# Copyright 2010 Nexenta Systems, Inc. All rights reserved.
f83b46baf98d276f5f84fa84c8b461f412ac1f5ePaul Dagnelie# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
c16bcc4577f389573eff411c7b7e040294078c3bIgor Kozhukhov# Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
4445fffbbb1ea25fd0e9ea68b9380dd7a6709025Matthew Ahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensPROG= zfs
fa9e4066f08beec538e775443c5be79dd423fcabahrensOBJS= zfs_main.o zfs_iter.o
fa9e4066f08beec538e775443c5be79dd423fcabahrensSRCS= $(OBJS:%.o=%.c)
fa9e4066f08beec538e775443c5be79dd423fcabahrensPOFILES= zfs_main.po zfs_iter.po
fa9e4066f08beec538e775443c5be79dd423fcabahrensPOFILE= zfs.po
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../Makefile.cmd
e0ad97e30ea0a9af63c42d71690b5f387c763420Jonathan Adamsinclude ../Makefile.ctf
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensFSTYPE= zfs
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINKPROGS= mount umount
fa9e4066f08beec538e775443c5be79dd423fcabahrensROOTETCFSTYPE= $(ROOTETC)/fs/$(FSTYPE)
fa9e4066f08beec538e775443c5be79dd423fcabahrensUSRLIBFSTYPE= $(ROOTLIB)/fs/$(FSTYPE)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
4445fffbbb1ea25fd0e9ea68b9380dd7a6709025Matthew AhrensLDLIBS += -lzfs_core -lzfs -luutil -lumem -lnvpair -lsec -lidmap
fa9e4066f08beec538e775443c5be79dd423fcabahrens
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark ShellenbaumINCS += -I../../common/zfs
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum
fa9e4066f08beec538e775443c5be79dd423fcabahrensC99MODE= -xc99=%all
fa9e4066f08beec538e775443c5be79dd423fcabahrensC99LMODE= -Xc99=%all
fa9e4066f08beec538e775443c5be79dd423fcabahrens
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark ShellenbaumCPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
29ab75c9a733dad2978c4860efd954b5625e3467rm$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# lint complains about unused _umem_* functions
f83b46baf98d276f5f84fa84c8b461f412ac1f5ePaul DagnelieLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
f83b46baf98d276f5f84fa84c8b461f412ac1f5ePaul DagnelieLINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
fa9e4066f08beec538e775443c5be79dd423fcabahrensUSRLIBFSTYPELINKS = $(LINKPROGS:%=$(USRLIBFSTYPE)/%)
fa9e4066f08beec538e775443c5be79dd423fcabahrensROOTETCFSTYPELINKS = $(LINKPROGS:%=$(ROOTETCFSTYPE)/%)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens.KEEP_STATE:
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens.PARALLEL:
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensall: $(PROG)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(PROG): $(OBJS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(POST_PROCESS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(USRLIBFSTYPELINKS) \
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(ROOTETCFSTYPELINKS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(POFILE): $(POFILES)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(RM) $@
fa9e4066f08beec538e775443c5be79dd423fcabahrens cat $(POFILES) > $@
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensclean:
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(RM) $(OBJS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenslint: lint_SRCS
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Links from /usr/sbin to /sbin
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(ROOTUSRSBINLINKS):
fa9e4066f08beec538e775443c5be79dd423fcabahrens -$(RM) $@; $(SYMLINK) ../../sbin/$(PROG) $@
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Links from /usr/lib/fs/zfs to /sbin
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(USRLIBFSTYPELINKS):
fa9e4066f08beec538e775443c5be79dd423fcabahrens -$(RM) $@; $(SYMLINK) ../../../../sbin/$(PROG) $@
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Links from /etc/fs/zfs to /sbin
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(ROOTETCFSTYPELINKS):
fa9e4066f08beec538e775443c5be79dd423fcabahrens -$(RM) $@; $(SYMLINK) ../../../sbin/$(PROG) $@
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensFRC:
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../Makefile.targ