Home | History | Annotate | Download | only in zpool
      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   2474    eschrock # Common Development and Distribution License (the "License").
      6   2474    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  10265  Krishnendu # 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= zpool
     27   2474    eschrock OBJS= zpool_main.o zpool_vdev.o zpool_iter.o zpool_util.o
     28    789      ahrens SRCS= $(OBJS:%.o=%.c)
     29    952    eschrock POFILES=$(OBJS:%.o=%.po)
     30    789      ahrens POFILE= zpool.po
     31    789      ahrens 
     32    789      ahrens include ../Makefile.cmd
     33  10889    Jonathan include ../Makefile.ctf
     34    789      ahrens 
     35  10265  Krishnendu STATCOMMONDIR = $(SRC)/cmd/stat/common
     36  10265  Krishnendu 
     37  10265  Krishnendu STAT_COMMON_OBJS = timestamp.o
     38  10265  Krishnendu STAT_COMMON_SRCS = $(STAT_COMMON_OBJS:%.o=$(STATCOMMONDIR)/%.c)
     39  10265  Krishnendu SRCS += $(STAT_COMMON_SRCS)
     40  10265  Krishnendu 
     41    789      ahrens LDLIBS += -lzfs -lnvpair -ldevid -lefi -ldiskmgt -luutil -lumem
     42    789      ahrens 
     43  10265  Krishnendu INCS += -I../../common/zfs -I$(STATCOMMONDIR)
     44   5913      perrin 
     45   5913      perrin CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS)
     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 
     54    789      ahrens .KEEP_STATE:
     55    789      ahrens 
     56    789      ahrens all: $(PROG)
     57    789      ahrens 
     58  10265  Krishnendu $(PROG): $(OBJS) $(STAT_COMMON_OBJS)
     59  10265  Krishnendu 	$(LINK.c) -o $@ $(OBJS) $(STAT_COMMON_OBJS) $(LDLIBS)
     60    789      ahrens 	$(POST_PROCESS)
     61  10265  Krishnendu 
     62  10265  Krishnendu %.o:    $(STATCOMMONDIR)/%.c
     63  10265  Krishnendu 	$(COMPILE.c) $<
     64  10265  Krishnendu 	$(POST_PROCESS_O)
     65    789      ahrens 
     66    952    eschrock install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS)
     67    789      ahrens 
     68    789      ahrens $(POFILE): $(POFILES)
     69    789      ahrens 	$(RM) $@
     70    952    eschrock 	$(CAT) $(POFILES) > $@
     71  10265  Krishnendu 
     72    789      ahrens clean:
     73  10430  Krishnendu 	$(RM) $(OBJS) $(STAT_COMMON_OBJS)
     74    789      ahrens 
     75    789      ahrens lint:	lint_SRCS
     76    789      ahrens 
     77    789      ahrens # Links from /usr/sbin to /sbin
     78    789      ahrens $(ROOTUSRSBINLINKS):
     79    789      ahrens 	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
     80    789      ahrens 
     81    789      ahrens include ../Makefile.targ
     82