Home | History | Annotate | Download | only in zfs
      1    789    ahrens #
      2    789    ahrens # CDDL HEADER START
      3    789    ahrens #
      4    789    ahrens # The contents of this file are subject to the terms of the
      5   2676  eschrock # Common Development and Distribution License (the "License").
      6   2676  eschrock # You may not use this file except in compliance with the License.
      7    789    ahrens #
      8    789    ahrens # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9    789    ahrens # or http://www.opensolaris.org/os/licensing.
     10    789    ahrens # See the License for the specific language governing permissions
     11    789    ahrens # and limitations under the License.
     12    789    ahrens #
     13    789    ahrens # When distributing Covered Code, include this CDDL HEADER in each
     14    789    ahrens # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15    789    ahrens # If applicable, add the following below this CDDL HEADER, with the
     16    789    ahrens # fields enclosed by brackets "[]" replaced with your own identifying
     17    789    ahrens # information: Portions Copyright [yyyy] [name of copyright owner]
     18    789    ahrens #
     19    789    ahrens # CDDL HEADER END
     20    789    ahrens #
     21    789    ahrens #
     22   9396   Matthew # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23    789    ahrens # Use is subject to license terms.
     24    789    ahrens #
     25    789    ahrens 
     26    789    ahrens PROG=		zfs
     27    789    ahrens OBJS=		zfs_main.o zfs_iter.o
     28    789    ahrens SRCS=		$(OBJS:%.o=%.c)
     29    789    ahrens POFILES=	zfs_main.po zfs_iter.po
     30    789    ahrens POFILE=		zfs.po
     31    789    ahrens 
     32    789    ahrens include ../Makefile.cmd
     33  10889  Jonathan include ../Makefile.ctf
     34    789    ahrens 
     35    789    ahrens FSTYPE=         zfs
     36    789    ahrens LINKPROGS=	mount umount
     37    789    ahrens ROOTETCFSTYPE=  $(ROOTETC)/fs/$(FSTYPE)
     38    789    ahrens USRLIBFSTYPE=	$(ROOTLIB)/fs/$(FSTYPE)
     39    789    ahrens 
     40   9396   Matthew LDLIBS += -lzfs -luutil -lumem -lnvpair
     41    789    ahrens 
     42    789    ahrens C99MODE=	-xc99=%all
     43    789    ahrens C99LMODE=	-Xc99=%all
     44    789    ahrens 
     45    789    ahrens CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT
     46   6865  rm160521 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
     47    789    ahrens 
     48    789    ahrens # lint complains about unused _umem_* functions
     49    789    ahrens LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 
     50    789    ahrens LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2 
     51    789    ahrens 
     52    789    ahrens ROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
     53    789    ahrens USRLIBFSTYPELINKS = $(LINKPROGS:%=$(USRLIBFSTYPE)/%)
     54    789    ahrens ROOTETCFSTYPELINKS = $(LINKPROGS:%=$(ROOTETCFSTYPE)/%)
     55    789    ahrens 
     56    789    ahrens .KEEP_STATE:
     57    789    ahrens 
     58    789    ahrens .PARALLEL:
     59    789    ahrens 
     60    789    ahrens all: $(PROG)
     61    789    ahrens 
     62    789    ahrens $(PROG): $(OBJS)
     63    789    ahrens 	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
     64    789    ahrens 	$(POST_PROCESS)
     65    789    ahrens 
     66    789    ahrens install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(USRLIBFSTYPELINKS) \
     67    789    ahrens 	$(ROOTETCFSTYPELINKS)
     68    789    ahrens 
     69    789    ahrens $(POFILE): $(POFILES)
     70    789    ahrens 	$(RM) $@
     71    789    ahrens 	cat $(POFILES) > $@
     72    789    ahrens 
     73    789    ahrens clean:
     74    789    ahrens 	$(RM) $(OBJS)
     75    789    ahrens 
     76    789    ahrens lint:	lint_SRCS
     77    789    ahrens 
     78    789    ahrens # Links from /usr/sbin to /sbin
     79    789    ahrens $(ROOTUSRSBINLINKS):
     80    789    ahrens 	-$(RM) $@; $(SYMLINK) ../../sbin/$(PROG) $@
     81    789    ahrens 
     82    789    ahrens # Links from /usr/lib/fs/zfs to /sbin
     83    789    ahrens $(USRLIBFSTYPELINKS):
     84    789    ahrens 	-$(RM) $@; $(SYMLINK) ../../../../sbin/$(PROG) $@
     85    789    ahrens 
     86    789    ahrens # Links from /etc/fs/zfs to /sbin
     87    789    ahrens $(ROOTETCFSTYPELINKS):
     88    789    ahrens 	-$(RM) $@; $(SYMLINK) ../../../sbin/$(PROG) $@
     89    789    ahrens 
     90    789    ahrens FRC:
     91    789    ahrens 
     92    789    ahrens include ../Makefile.targ
     93