Makefile revision fa9e4066f08beec538e775443c5be79dd423fcab
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER START
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# The contents of this file are subject to the terms of the
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# Common Development and Distribution License, Version 1.0 only
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# (the "License"). You may not use this file except in compliance
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# with the License.
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington#
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington# or http://www.opensolaris.org/os/licensing.
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington# See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# CDDL HEADER END
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Use is subject to license terms.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# ident "%Z%%M% %I% %E% SMI"
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley#
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyPROG= zfs
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyOBJS= zfs_main.o zfs_iter.o
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleySRCS= $(OBJS:%.o=%.c)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyPOFILES= zfs_main.po zfs_iter.po
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyPOFILE= zfs.po
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halleyinclude ../Makefile.cmd
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyFSTYPE= zfs
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLINKPROGS= mount umount
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinROOTETCFSTYPE= $(ROOTETC)/fs/$(FSTYPE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinUSRLIBFSTYPE= $(ROOTLIB)/fs/$(FSTYPE)
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLDLIBS += -lzfs -luutil -lumem
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinC99MODE= -xc99=%all
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinC99LMODE= -Xc99=%all
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# lint complains about unused _umem_* functions
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob HalleyUSRLIBFSTYPELINKS = $(LINKPROGS:%=$(USRLIBFSTYPE)/%)
0ffaee887ff5674b8c3bb0435ae838f641981706Mark AndrewsROOTETCFSTYPELINKS = $(LINKPROGS:%=$(ROOTETCFSTYPE)/%)
0ffaee887ff5674b8c3bb0435ae838f641981706Mark Andrews
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley.KEEP_STATE:
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley.PARALLEL:
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halleyall: $(PROG)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley$(PROG): $(OBJS)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley $(POST_PROCESS)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halleyinstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(USRLIBFSTYPELINKS) \
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley $(ROOTETCFSTYPELINKS)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley$(POFILE): $(POFILES)
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley $(RM) $@
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley cat $(POFILES) > $@
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinclean:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(RM) $(OBJS)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halleylint: lint_SRCS
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Links from /usr/sbin to /sbin
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(ROOTUSRSBINLINKS):
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein -$(RM) $@; $(SYMLINK) ../../sbin/$(PROG) $@
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Links from /usr/lib/fs/zfs to /sbin
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley$(USRLIBFSTYPELINKS):
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley -$(RM) $@; $(SYMLINK) ../../../../sbin/$(PROG) $@
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Links from /etc/fs/zfs to /sbin
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley$(ROOTETCFSTYPELINKS):
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley -$(RM) $@; $(SYMLINK) ../../../sbin/$(PROG) $@
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley
0ffaee887ff5674b8c3bb0435ae838f641981706Mark AndrewsFRC:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude ../Makefile.targ
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein