Makefile revision a211e62b4643abef28f572d6839d7da55c547a29
70N/A#
70N/A# CDDL HEADER START
70N/A#
70N/A# The contents of this file are subject to the terms of the
371N/A# Common Development and Distribution License (the "License").
70N/A# You may not use this file except in compliance with the License.
70N/A#
70N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
70N/A# or http://www.opensolaris.org/os/licensing.
70N/A# See the License for the specific language governing permissions
70N/A# and limitations under the License.
70N/A#
70N/A# When distributing Covered Code, include this CDDL HEADER in each
70N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
70N/A# If applicable, add the following below this CDDL HEADER, with the
70N/A# fields enclosed by brackets "[]" replaced with your own identifying
70N/A# information: Portions Copyright [yyyy] [name of copyright owner]
70N/A#
70N/A# CDDL HEADER END
70N/A#
70N/A#
70N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
70N/A# Use is subject to license terms.
70N/A#
70N/A
70N/APROG= zpool
70N/AOBJS= zpool_main.o zpool_vdev.o zpool_iter.o zpool_util.o
70N/ASRCS= $(OBJS:%.o=%.c)
70N/APOFILES=$(OBJS:%.o=%.po)
70N/APOFILE= zpool.po
70N/A
70N/Ainclude ../Makefile.cmd
371N/A
70N/ASTATCOMMONDIR = $(SRC)/cmd/stat/common
70N/A
70N/ASTAT_COMMON_OBJS = timestamp.o
70N/ASTAT_COMMON_SRCS = $(STAT_COMMON_OBJS:%.o=$(STATCOMMONDIR)/%.c)
70N/ASRCS += $(STAT_COMMON_SRCS)
70N/A
371N/ALDLIBS += -lzfs -lnvpair -ldevid -lefi -ldiskmgt -luutil -lumem
70N/A
70N/AINCS += -I../../common/zfs -I$(STATCOMMONDIR)
70N/A
70N/ACPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
70N/A$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
70N/A
70N/A# lint complains about unused _umem_* functions
70N/ALINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
70N/ALINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
70N/A
70N/AROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
70N/A
70N/A.KEEP_STATE:
70N/A
70N/Aall: $(PROG)
70N/A
70N/A$(PROG): $(OBJS) $(STAT_COMMON_OBJS)
70N/A $(LINK.c) -o $@ $(OBJS) $(STAT_COMMON_OBJS) $(LDLIBS)
70N/A $(POST_PROCESS)
70N/A
%.o: $(STATCOMMONDIR)/%.c
$(COMPILE.c) $<
$(POST_PROCESS_O)
install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS)
$(POFILE): $(POFILES)
$(RM) $@
$(CAT) $(POFILES) > $@
clean:
$(RM) $(OBJS) $(STAT_COMMON_OBJS)
lint: lint_SRCS
# Links from /usr/sbin to /sbin
$(ROOTUSRSBINLINKS):
-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
include ../Makefile.targ