Makefile revision 9663:ace9a2ac3683
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 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27MKNTFS=		mkntfs
28NTFSCAT=	ntfscat
29NTFSCLONE=	ntfsclone
30NTFSCLUSTER=	ntfscluster
31NTFSCMP=	ntfscmp
32NTFSCP=		ntfscp
33NTFSFIX=	ntfsfix
34NTFSINFO=	ntfsinfo
35NTFSLABEL=	ntfslabel
36NTFSLS=		ntfsls
37NTFSRESIZE=	ntfsresize
38NTFSUNDELETE=	ntfsundelete
39
40include		../Makefile.cmd
41
42C99MODE=	$(C99_ENABLE)
43CERRWARN +=	-erroff=E_ATTRIBUTE_PARAM_UNDEFINED
44CERRWARN +=	-erroff=E_ENUM_VAL_OVERFLOWS_INT_MAX
45CERRWARN +=	-erroff=E_STRUCT_DERIVED_FROM_FLEX_MBR
46
47CPPFLAGS +=	-DHAVE_CONFIG_H \
48		-I. \
49		-I../../lib/libntfs/common/include/ntfs
50
51MKNTFSOBJS=	attrdef.o boot.o sd.o mkntfs.o utils.o
52NTFSCATOBJS=	ntfscat.o utils.o
53NTFSCLONEOBJS=	ntfsclone.o utils.o
54NTFSCLUSTEROBJS=ntfscluster.o cluster.o utils.o
55NTFSCMPOBJS=	ntfscmp.o utils.o
56NTFSCPOBJS=	ntfscp.o utils.o
57NTFSFIXOBJS=	ntfsfix.o utils.o
58NTFSINFOOBJS=	ntfsinfo.o utils.o
59NTFSLABELOBJS=	ntfslabel.o utils.o
60NTFSLSOBJS=	ntfsls.o utils.o
61NTFSRESIZEOBJS=	ntfsresize.o utils.o
62NTFSUNDELETEOBJS=ntfsundelete.o utils.o
63
64LDLIBS +=	../../lib/libntfs/i386/libntfs.so.10
65
66ROOTPROG=	$(MKNTFS:%=$(ROOTUSRSBIN)/%) \
67		$(NTFSCAT:%=$(ROOTUSRSBIN)/%) \
68		$(NTFSCLONE:%=$(ROOTUSRSBIN)/%) \
69		$(NTFSCLUSTER:%=$(ROOTUSRSBIN)/%) \
70		$(NTFSCMP:%=$(ROOTUSRSBIN)/%) \
71		$(NTFSCP:%=$(ROOTUSRSBIN)/%) \
72		$(NTFSFIX:%=$(ROOTUSRSBIN)/%) \
73		$(NTFSINFO:%=$(ROOTUSRSBIN)/%) \
74		$(NTFSLABEL:%=$(ROOTUSRSBIN)/%) \
75		$(NTFSLS:%=$(ROOTUSRSBIN)/%) \
76		$(NTFSRESIZE:%=$(ROOTUSRSBIN)/%) \
77		$(NTFSUNDELETE:%=$(ROOTUSRSBIN)/%)
78
79.KEEP_STATE:
80all:		$(MKNTFS) $(NTFSCAT) $(NTFSCLONE) $(NTFSCLUSTER) \
81		$(NTFSCMP) $(NTFSCP) $(NTFSFIX) $(NTFSINFO) \
82		$(NTFSLABEL) $(NTFSLS) $(NTFSRESIZE) $(NTFSUNDELETE)
83
84$(MKNTFS):	$(MKNTFSOBJS)
85	$(LINK.c) -o $(MKNTFS) $(MKNTFSOBJS) $(LDLIBS) -luuid
86	$(POST_PROCESS)
87
88$(NTFSCAT):	$(NTFSCATOBJS)
89	$(LINK.c) -o $(NTFSCAT) $(NTFSCATOBJS) $(LDLIBS)
90	$(POST_PROCESS)
91
92$(NTFSCLONE):	$(NTFSCLONEOBJS)
93	$(LINK.c) -o $(NTFSCLONE) $(NTFSCLONEOBJS) $(LDLIBS)
94	$(POST_PROCESS)
95
96$(NTFSCLUSTER):	$(NTFSCLUSTEROBJS)
97	$(LINK.c) -o $(NTFSCLUSTER) $(NTFSCLUSTEROBJS) $(LDLIBS)
98	$(POST_PROCESS)
99
100$(NTFSCMP):	$(NTFSCMPOBJS)
101	$(LINK.c) -o $(NTFSCMP) $(NTFSCMPOBJS) $(LDLIBS)
102	$(POST_PROCESS)
103
104$(NTFSCP):	$(NTFSCPOBJS)
105	$(LINK.c) -o $(NTFSCP) $(NTFSCPOBJS) $(LDLIBS)
106	$(POST_PROCESS)
107
108$(NTFSFIX):	$(NTFSFIXOBJS)
109	$(LINK.c) -o $(NTFSFIX) $(NTFSFIXOBJS) $(LDLIBS)
110	$(POST_PROCESS)
111
112$(NTFSINFO):	$(NTFSINFOOBJS)
113	$(LINK.c) -o $(NTFSINFO) $(NTFSINFOOBJS) $(LDLIBS)
114	$(POST_PROCESS)
115
116$(NTFSLABEL):	$(NTFSLABELOBJS)
117	$(LINK.c) -o $(NTFSLABEL) $(NTFSLABELOBJS) $(LDLIBS)
118	$(POST_PROCESS)
119
120$(NTFSLS):	$(NTFSLSOBJS)
121	$(LINK.c) -o $(NTFSLS) $(NTFSLSOBJS) $(LDLIBS)
122	$(POST_PROCESS)
123
124$(NTFSRESIZE):	$(NTFSRESIZEOBJS)
125	$(LINK.c) -o $(NTFSRESIZE) $(NTFSRESIZEOBJS) $(LDLIBS)
126	$(POST_PROCESS)
127
128$(NTFSUNDELETE):	$(NTFSUNDELETEOBJS)
129	$(LINK.c) -o $(NTFSUNDELETE) $(NTFSUNDELETEOBJS) $(LDLIBS)
130	$(POST_PROCESS)
131
132install:	all $(ROOTPROG)
133
134clean:
135	$(RM) $(MKNTFS) $(MKNTFSOBJS) \
136		$(NTFSCAT) $(NTFSCATOBJS) \
137		$(NTFSCLONE) $(NTFSCLONEOBJS) \
138		$(NTFSCLUSTER) $(NTFSCLUSTEROBJS) \
139		$(NTFSCMP) $(NTFSCMPOBJS) \
140		$(NTFSCP) $(NTFSCPOBJS) \
141		$(NTFSFIX) $(NTFSFIXOBJS) \
142		$(NTFSINFO) $(NTFSINFOOBJS) \
143		$(NTFSLABEL) $(NTFSLABELOBJS) \
144		$(NTFSLS) $(NTFSLSOBJS) \
145		$(NTFSRESIZE) $(NTFSRESIZEOBJS) \
146		$(NTFSUNDELETE) $(NTFSUNDELETEOBJS)
147
148#
149# This open source is exempted from lint
150#
151lint:
152
153include		../Makefile.targ
154