1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  24 #
  25 
  26 MKNTFS=         mkntfs
  27 NTFSCAT=        ntfscat
  28 NTFSCLONE=      ntfsclone
  29 NTFSCLUSTER=    ntfscluster
  30 NTFSCMP=        ntfscmp
  31 NTFSCP=         ntfscp
  32 NTFSFIX=        ntfsfix
  33 NTFSINFO=       ntfsinfo
  34 NTFSLABEL=      ntfslabel
  35 NTFSLS=         ntfsls
  36 NTFSRESIZE=     ntfsresize
  37 NTFSUNDELETE=   ntfsundelete
  38 
  39 include         ../Makefile.cmd
  40 
  41 C99MODE=        $(C99_ENABLE)
  42 CERRWARN +=     -erroff=E_ATTRIBUTE_PARAM_UNDEFINED
  43 CERRWARN +=     -erroff=E_ENUM_VAL_OVERFLOWS_INT_MAX
  44 CERRWARN +=     -erroff=E_STRUCT_DERIVED_FROM_FLEX_MBR
  45 
  46 CPPFLAGS +=     -DHAVE_CONFIG_H \
  47                 -I. \
  48                 -I../../lib/libntfs/common/include/ntfs
  49 
  50 MKNTFSOBJS=     attrdef.o boot.o sd.o mkntfs.o utils.o
  51 NTFSCATOBJS=    ntfscat.o utils.o
  52 NTFSCLONEOBJS=  ntfsclone.o utils.o
  53 NTFSCLUSTEROBJS=ntfscluster.o cluster.o utils.o
  54 NTFSCMPOBJS=    ntfscmp.o utils.o
  55 NTFSCPOBJS=     ntfscp.o utils.o
  56 NTFSFIXOBJS=    ntfsfix.o utils.o
  57 NTFSINFOOBJS=   ntfsinfo.o utils.o
  58 NTFSLABELOBJS=  ntfslabel.o utils.o
  59 NTFSLSOBJS=     ntfsls.o utils.o
  60 NTFSRESIZEOBJS= ntfsresize.o utils.o
  61 NTFSUNDELETEOBJS=ntfsundelete.o utils.o
  62 
  63 LDLIBS +=       ../../lib/libntfs/i386/libntfs.so.10
  64 
  65 ROOTPROG=       $(MKNTFS:%=$(ROOTUSRSBIN)/%) \
  66                 $(NTFSCAT:%=$(ROOTUSRSBIN)/%) \
  67                 $(NTFSCLONE:%=$(ROOTUSRSBIN)/%) \
  68                 $(NTFSCLUSTER:%=$(ROOTUSRSBIN)/%) \
  69                 $(NTFSCMP:%=$(ROOTUSRSBIN)/%) \
  70                 $(NTFSCP:%=$(ROOTUSRSBIN)/%) \
  71                 $(NTFSFIX:%=$(ROOTUSRSBIN)/%) \
  72                 $(NTFSINFO:%=$(ROOTUSRSBIN)/%) \
  73                 $(NTFSLABEL:%=$(ROOTUSRSBIN)/%) \
  74                 $(NTFSLS:%=$(ROOTUSRSBIN)/%) \
  75                 $(NTFSRESIZE:%=$(ROOTUSRSBIN)/%) \
  76                 $(NTFSUNDELETE:%=$(ROOTUSRSBIN)/%)
  77 
  78 .KEEP_STATE:
  79 all:            $(MKNTFS) $(NTFSCAT) $(NTFSCLONE) $(NTFSCLUSTER) \
  80                 $(NTFSCMP) $(NTFSCP) $(NTFSFIX) $(NTFSINFO) \
  81                 $(NTFSLABEL) $(NTFSLS) $(NTFSRESIZE) $(NTFSUNDELETE)
  82 
  83 all install:    THIRDPARTYLICENSE
  84 
  85 CLOBBERFILES += THIRDPARTYLICENSE
  86 
  87 THIRDPARTYLICENSE: $(SRC)/common/GPLDISCLAIMER COPYING
  88         $(RM) $@
  89         $(CAT) $(SRC)/common/GPLDISCLAIMER COPYING > $@
  90 
  91 $(MKNTFS):      $(MKNTFSOBJS)
  92         $(LINK.c) -o $(MKNTFS) $(MKNTFSOBJS) $(LDLIBS) -luuid
  93         $(POST_PROCESS)
  94 
  95 $(NTFSCAT):     $(NTFSCATOBJS)
  96         $(LINK.c) -o $(NTFSCAT) $(NTFSCATOBJS) $(LDLIBS)
  97         $(POST_PROCESS)
  98 
  99 $(NTFSCLONE):   $(NTFSCLONEOBJS)
 100         $(LINK.c) -o $(NTFSCLONE) $(NTFSCLONEOBJS) $(LDLIBS)
 101         $(POST_PROCESS)
 102 
 103 $(NTFSCLUSTER): $(NTFSCLUSTEROBJS)
 104         $(LINK.c) -o $(NTFSCLUSTER) $(NTFSCLUSTEROBJS) $(LDLIBS)
 105         $(POST_PROCESS)
 106 
 107 $(NTFSCMP):     $(NTFSCMPOBJS)
 108         $(LINK.c) -o $(NTFSCMP) $(NTFSCMPOBJS) $(LDLIBS)
 109         $(POST_PROCESS)
 110 
 111 $(NTFSCP):      $(NTFSCPOBJS)
 112         $(LINK.c) -o $(NTFSCP) $(NTFSCPOBJS) $(LDLIBS)
 113         $(POST_PROCESS)
 114 
 115 $(NTFSFIX):     $(NTFSFIXOBJS)
 116         $(LINK.c) -o $(NTFSFIX) $(NTFSFIXOBJS) $(LDLIBS)
 117         $(POST_PROCESS)
 118 
 119 $(NTFSINFO):    $(NTFSINFOOBJS)
 120         $(LINK.c) -o $(NTFSINFO) $(NTFSINFOOBJS) $(LDLIBS)
 121         $(POST_PROCESS)
 122 
 123 $(NTFSLABEL):   $(NTFSLABELOBJS)
 124         $(LINK.c) -o $(NTFSLABEL) $(NTFSLABELOBJS) $(LDLIBS)
 125         $(POST_PROCESS)
 126 
 127 $(NTFSLS):      $(NTFSLSOBJS)
 128         $(LINK.c) -o $(NTFSLS) $(NTFSLSOBJS) $(LDLIBS)
 129         $(POST_PROCESS)
 130 
 131 $(NTFSRESIZE):  $(NTFSRESIZEOBJS)
 132         $(LINK.c) -o $(NTFSRESIZE) $(NTFSRESIZEOBJS) $(LDLIBS)
 133         $(POST_PROCESS)
 134 
 135 $(NTFSUNDELETE):        $(NTFSUNDELETEOBJS)
 136         $(LINK.c) -o $(NTFSUNDELETE) $(NTFSUNDELETEOBJS) $(LDLIBS)
 137         $(POST_PROCESS)
 138 
 139 install:        all $(ROOTPROG)
 140 
 141 clean:
 142         $(RM) $(MKNTFS) $(MKNTFSOBJS) \
 143                 $(NTFSCAT) $(NTFSCATOBJS) \
 144                 $(NTFSCLONE) $(NTFSCLONEOBJS) \
 145                 $(NTFSCLUSTER) $(NTFSCLUSTEROBJS) \
 146                 $(NTFSCMP) $(NTFSCMPOBJS) \
 147                 $(NTFSCP) $(NTFSCPOBJS) \
 148                 $(NTFSFIX) $(NTFSFIXOBJS) \
 149                 $(NTFSINFO) $(NTFSINFOOBJS) \
 150                 $(NTFSLABEL) $(NTFSLABELOBJS) \
 151                 $(NTFSLS) $(NTFSLSOBJS) \
 152                 $(NTFSRESIZE) $(NTFSRESIZEOBJS) \
 153                 $(NTFSUNDELETE) $(NTFSUNDELETEOBJS)
 154 
 155 #
 156 # This open source is exempted from lint
 157 #
 158 lint:
 159 
 160 include         ../Makefile.targ