Makefile revision 29ab75c9a733dad2978c4860efd954b5625e3467
481N/A#
481N/A# CDDL HEADER START
911N/A#
919N/A# The contents of this file are subject to the terms of the
481N/A# Common Development and Distribution License (the "License").
481N/A# You may not use this file except in compliance with the License.
919N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A#
919N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
919N/A# Use is subject to license terms.
481N/A#
481N/A# ident "%Z%%M% %I% %E% SMI"
481N/A#
493N/A
493N/APROG= zfs
481N/AOBJS= zfs_main.o zfs_iter.o
481N/ASRCS= $(OBJS:%.o=%.c)
493N/APOFILES= zfs_main.po zfs_iter.po
481N/APOFILE= zfs.po
911N/A
911N/Ainclude ../Makefile.cmd
911N/A
911N/AFSTYPE= zfs
481N/ALINKPROGS= mount umount
481N/AROOTETCFSTYPE= $(ROOTETC)/fs/$(FSTYPE)
481N/AUSRLIBFSTYPE= $(ROOTLIB)/fs/$(FSTYPE)
493N/A
493N/ALDLIBS += -lzfs -luutil -lumem -lnvpair -lavl
493N/A
493N/AC99MODE= -xc99=%all
481N/AC99LMODE= -Xc99=%all
481N/A
493N/ACPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT
481N/A$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
# lint complains about unused _umem_* functions
LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
ROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
USRLIBFSTYPELINKS = $(LINKPROGS:%=$(USRLIBFSTYPE)/%)
ROOTETCFSTYPELINKS = $(LINKPROGS:%=$(ROOTETCFSTYPE)/%)
.KEEP_STATE:
.PARALLEL:
all: $(PROG)
$(PROG): $(OBJS)
$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
$(POST_PROCESS)
install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(USRLIBFSTYPELINKS) \
$(ROOTETCFSTYPELINKS)
$(POFILE): $(POFILES)
$(RM) $@
cat $(POFILES) > $@
clean:
$(RM) $(OBJS)
lint: lint_SRCS
# Links from /usr/sbin to /sbin
$(ROOTUSRSBINLINKS):
-$(RM) $@; $(SYMLINK) ../../sbin/$(PROG) $@
# Links from /usr/lib/fs/zfs to /sbin
$(USRLIBFSTYPELINKS):
-$(RM) $@; $(SYMLINK) ../../../../sbin/$(PROG) $@
# Links from /etc/fs/zfs to /sbin
$(ROOTETCFSTYPELINKS):
-$(RM) $@; $(SYMLINK) ../../../sbin/$(PROG) $@
FRC:
include ../Makefile.targ