• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if REALLYSTATIC
2AM_LIBS		= $(top_builddir)/libntfs-3g/.libs/libntfs-3g.a $(NTFSPROGS_STATIC_LIBS)
3# older builds may need -static instead of newer -all-static
4AM_LFLAGS	= -static
5STATIC_LINK     = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
6else
7AM_LIBS		= $(top_builddir)/libntfs-3g/libntfs-3g.la
8AM_LFLAGS	= $(all_libraries)
9LIBTOOL_LINK    = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
10endif
11
12# Workaround to make REALLYSTATIC work with automake 1.5.
13LINK=$(STATIC_LINK) $(LIBTOOL_LINK)
14
15if ENABLE_NTFSPROGS
16
17bin_PROGRAMS		= ntfsfix ntfsinfo ntfscluster ntfsls ntfscat ntfscmp
18sbin_PROGRAMS		= mkntfs ntfslabel ntfsundelete ntfsresize ntfsclone \
19			  ntfscp
20EXTRA_PROGRAM_NAMES	= ntfswipe ntfstruncate ntfsrecover \
21			  ntfsusermap ntfssecaudit
22
23QUARANTINED_PROGRAM_NAMES = ntfsdump_logfile ntfsmftalloc ntfsmove ntfsck \
24			   ntfsfallocate
25
26man_MANS		= mkntfs.8 ntfsfix.8 ntfslabel.8 ntfsinfo.8 \
27			  ntfsundelete.8 ntfsresize.8 ntfsprogs.8 ntfsls.8 \
28			  ntfsclone.8 ntfscluster.8 ntfscat.8 ntfscp.8 \
29			  ntfscmp.8 ntfswipe.8 ntfstruncate.8 \
30			  ntfsdecrypt.8 ntfsfallocate.8 ntfsrecover.8 \
31			  ntfsusermap.8 ntfssecaudit.8
32EXTRA_MANS		=
33
34CLEANFILES		= $(EXTRA_PROGRAMS)
35
36MAINTAINERCLEANFILES = Makefile.in
37
38if ENABLE_CRYPTO
39EXTRA_PROGRAM_NAMES	+= ntfsdecrypt
40endif
41
42if ENABLE_EXTRAS
43bin_PROGRAMS		+= $(EXTRA_PROGRAM_NAMES)
44if ENABLE_QUARANTINED
45bin_PROGRAMS		+= $(QUARANTINED_PROGRAM_NAMES)
46endif
47else
48EXTRA_PROGRAMS		= $(EXTRA_PROGRAM_NAMES)
49endif
50
51# Set the include path.
52AM_CPPFLAGS		= -I$(top_srcdir)/include/ntfs-3g $(all_includes)
53
54ntfsfix_SOURCES		= ntfsfix.c utils.c utils.h
55ntfsfix_LDADD		= $(AM_LIBS)
56ntfsfix_LDFLAGS		= $(AM_LFLAGS)
57
58mkntfs_CPPFLAGS		= $(AM_CPPFLAGS) $(MKNTFS_CPPFLAGS)
59mkntfs_SOURCES		= attrdef.c attrdef.h boot.c boot.h sd.c sd.h mkntfs.c utils.c utils.h
60mkntfs_LDADD		= $(AM_LIBS) $(MKNTFS_LIBS)
61mkntfs_LDFLAGS		= $(AM_LFLAGS)
62
63ntfslabel_SOURCES	= ntfslabel.c utils.c utils.h
64ntfslabel_LDADD		= $(AM_LIBS)
65ntfslabel_LDFLAGS	= $(AM_LFLAGS)
66
67ntfsinfo_SOURCES	= ntfsinfo.c utils.c utils.h
68ntfsinfo_LDADD		= $(AM_LIBS)
69ntfsinfo_LDFLAGS	= $(AM_LFLAGS)
70
71ntfsundelete_SOURCES	= ntfsundelete.c ntfsundelete.h utils.c utils.h list.h
72ntfsundelete_LDADD	= $(AM_LIBS)
73ntfsundelete_LDFLAGS	= $(AM_LFLAGS)
74
75ntfsresize_SOURCES	= ntfsresize.c utils.c utils.h
76ntfsresize_LDADD	= $(AM_LIBS)
77ntfsresize_LDFLAGS	= $(AM_LFLAGS)
78
79ntfsclone_SOURCES	= ntfsclone.c utils.c utils.h
80ntfsclone_LDADD		= $(AM_LIBS)
81ntfsclone_LDFLAGS	= $(AM_LFLAGS)
82
83ntfscluster_SOURCES	= ntfscluster.c ntfscluster.h cluster.c cluster.h utils.c utils.h
84ntfscluster_LDADD	= $(AM_LIBS)
85ntfscluster_LDFLAGS	= $(AM_LFLAGS)
86
87ntfsls_SOURCES		= ntfsls.c utils.c utils.h list.h
88ntfsls_LDADD		= $(AM_LIBS)
89ntfsls_LDFLAGS		= $(AM_LFLAGS)
90
91ntfscat_SOURCES		= ntfscat.c ntfscat.h utils.c utils.h
92ntfscat_LDADD		= $(AM_LIBS)
93ntfscat_LDFLAGS		= $(AM_LFLAGS)
94
95ntfscp_SOURCES		= ntfscp.c utils.c utils.h
96ntfscp_LDADD		= $(AM_LIBS)
97ntfscp_LDFLAGS		= $(AM_LFLAGS)
98
99ntfsck_SOURCES		= ntfsck.c utils.c utils.h
100ntfsck_LDADD		= $(AM_LIBS)
101ntfsck_LDFLAGS		= $(AM_LFLAGS)
102
103ntfscmp_SOURCES		= ntfscmp.c utils.c utils.h
104ntfscmp_LDADD		= $(AM_LIBS)
105ntfscmp_LDFLAGS		= $(AM_LFLAGS)
106
107ntfsrecover_SOURCES	= playlog.c ntfsrecover.c utils.c utils.h ntfsrecover.h
108ntfsrecover_LDADD	= $(AM_LIBS) $(NTFSRECOVER_LIBS)
109ntfsrecover_LDFLAGS	= $(AM_LFLAGS)
110
111ntfsusermap_SOURCES	= ntfsusermap.c utils.c utils.h
112ntfsusermap_LDADD	= $(AM_LIBS) $(NTFSRECOVER_LIBS)
113ntfsusermap_LDFLAGS	= $(AM_LFLAGS)
114
115ntfssecaudit_SOURCES	= ntfssecaudit.c utils.c utils.h
116ntfssecaudit_LDADD	= $(AM_LIBS) $(NTFSRECOVER_LIBS)
117ntfssecaudit_LDFLAGS	= $(AM_LFLAGS)
118
119# We don't distribute these
120
121ntfstruncate_SOURCES	= attrdef.c ntfstruncate.c utils.c utils.h
122ntfstruncate_LDADD	= $(AM_LIBS)
123ntfstruncate_LDFLAGS	= $(AM_LFLAGS)
124
125ntfsmftalloc_SOURCES	= ntfsmftalloc.c utils.c utils.h
126ntfsmftalloc_LDADD	= $(AM_LIBS)
127ntfsmftalloc_LDFLAGS	= $(AM_LFLAGS)
128
129ntfsmove_SOURCES	= ntfsmove.c ntfsmove.h utils.c utils.h
130ntfsmove_LDADD		= $(AM_LIBS)
131ntfsmove_LDFLAGS	= $(AM_LFLAGS)
132
133ntfswipe_SOURCES	= ntfswipe.c ntfswipe.h utils.c utils.h
134ntfswipe_LDADD		= $(AM_LIBS)
135ntfswipe_LDFLAGS	= $(AM_LFLAGS)
136
137ntfsdump_logfile_SOURCES= ntfsdump_logfile.c
138ntfsdump_logfile_LDADD	= $(AM_LIBS)
139ntfsdump_logfile_LDFLAGS= $(AM_LFLAGS)
140
141ntfsfallocate_SOURCES	= ntfsfallocate.c utils.c utils.h
142ntfsfallocate_LDADD	= $(AM_LIBS)
143ntfsfallocate_LDFLAGS	= $(AM_LFLAGS)
144
145if ENABLE_CRYPTO
146ntfsdecrypt_SOURCES	= ntfsdecrypt.c utils.c utils.h
147ntfsdecrypt_LDADD	= $(AM_LIBS) $(GNUTLS_LIBS) $(LIBGCRYPT_LIBS)
148ntfsdecrypt_LDFLAGS	= $(AM_LFLAGS)
149ntfsdecrypt_CFLAGS	= $(GNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
150endif
151
152# Extra targets
153
154strip:	$(bin_PROGRAMS) $(sbin_PROGRAMS)
155	$(STRIP) $^
156
157libs:
158	(cd ../libntfs-3g && $(MAKE) libs) || exit 1;
159
160extra:	extras
161
162extras:	libs $(EXTRA_PROGRAMS)
163
164# mkfs.ntfs[.8] hard link
165
166if ENABLE_MOUNT_HELPER
167install-exec-hook:
168	$(INSTALL) -d $(DESTDIR)/$(sbindir)
169	$(LN_S) -f $(sbindir)/mkntfs $(DESTDIR)$(sbindir)/mkfs.ntfs
170
171install-data-hook:
172	$(INSTALL) -d $(DESTDIR)$(man8dir)
173	$(LN_S) -f mkntfs.8 $(DESTDIR)$(man8dir)/mkfs.ntfs.8
174
175uninstall-local:
176	$(RM) -f $(DESTDIR)/sbin/mkfs.ntfs
177	$(RM) -f $(DESTDIR)$(man8dir)/mkfs.ntfs.8
178endif
179
180endif
181