Makefile revision b7b97454b9b1f6625e7e655e9651e744a8dee09d
36983956d7c3d9e294903eeda29548f67ac17daeBob Halley#
40d01ce8f3a1889f5799d9b22b26d5398fa75a1bBob Halley# CDDL HEADER START
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt#
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# The contents of this file are subject to the terms of the
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# Common Development and Distribution License (the "License").
16803617e47c83272013e45ba8eb83a3b11983edAndreas Gustafsson# You may not use this file except in compliance with the License.
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt#
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# or http://www.opensolaris.org/os/licensing.
16803617e47c83272013e45ba8eb83a3b11983edAndreas Gustafsson# See the License for the specific language governing permissions
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# and limitations under the License.
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt#
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# When distributing Covered Code, include this CDDL HEADER in each
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16803617e47c83272013e45ba8eb83a3b11983edAndreas Gustafsson# If applicable, add the following below this CDDL HEADER, with the
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# information: Portions Copyright [yyyy] [name of copyright owner]
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt#
16803617e47c83272013e45ba8eb83a3b11983edAndreas Gustafsson# CDDL HEADER END
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt#
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt#
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# Use is subject to license terms.
16803617e47c83272013e45ba8eb83a3b11983edAndreas Gustafsson#
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# ident "%Z%%M% %I% %E% SMI"
16803617e47c83272013e45ba8eb83a3b11983edAndreas Gustafsson#
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
16803617e47c83272013e45ba8eb83a3b11983edAndreas GustafssonPROG= zpool
b90dd6c0a9df584619d3c47be7c9417f55d5ccf6Bob HalleyOBJS= zpool_main.o zpool_vdev.o zpool_iter.o zpool_util.o
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan HuntSRCS= $(OBJS:%.o=%.c)
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan HuntPOFILES=$(OBJS:%.o=%.po)
b90dd6c0a9df584619d3c47be7c9417f55d5ccf6Bob HalleyPOFILE= zpool.po
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Huntinclude ../Makefile.cmd
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan HuntLDLIBS += -lzfs -lnvpair -ldevid -lefi -ldiskmgt -luutil -lumem
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan HuntINCS += -I../../common/zfs
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan HuntCPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# lint complains about unused _umem_* functions
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan HuntLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
40d01ce8f3a1889f5799d9b22b26d5398fa75a1bBob HalleyLINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan HuntROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
b497531c76ea5f9aeed0c1707b6156c104c633ddEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt.KEEP_STATE:
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
b497531c76ea5f9aeed0c1707b6156c104c633ddEvan Huntall: $(PROG)
62714accee7c8d96e02f40d58751422972e2ed41Evan Hunt
3e366d0bebbe31d49950cdae18fdeddd05e64e72Evan Hunt$(PROG): $(OBJS)
62714accee7c8d96e02f40d58751422972e2ed41Evan Hunt $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
06a05efc07ac7b6ff1973a6463291f5d48ece6ebMark Andrews $(POST_PROCESS)
06a05efc07ac7b6ff1973a6463291f5d48ece6ebMark Andrews
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Huntinstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS)
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt$(POFILE): $(POFILES)
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt $(RM) $@
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt $(CAT) $(POFILES) > $@
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Huntclean:
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt $(RM) $(OBJS)
b99bfa184bc9375421b5df915eea7dfac6a68a99Evan Hunt
b99bfa184bc9375421b5df915eea7dfac6a68a99Evan Huntlint: lint_SRCS
b99bfa184bc9375421b5df915eea7dfac6a68a99Evan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt# Links from /usr/sbin to /sbin
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt$(ROOTUSRSBINLINKS):
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Huntinclude ../Makefile.targ
e08d5f3e3bdc29026224c9b730273a051db7dfeaEvan Hunt