summaryrefslogtreecommitdiff
path: root/ntfsprogs/Makefile.am (plain)
blob: 247912a5e2c45f4978ff06352dfa7735eb9ca37f
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 = ntfsdump_logfile ntfswipe ntfstruncate ntfsmove \
21 ntfsmftalloc ntfsck
22
23man_MANS = mkntfs.8 ntfsfix.8 ntfslabel.8 ntfsinfo.8 \
24 ntfsundelete.8 ntfsresize.8 ntfsprogs.8 ntfsls.8 \
25 ntfsclone.8 ntfscluster.8 ntfscat.8 ntfscp.8 \
26 ntfscmp.8
27EXTRA_MANS =
28
29CLEANFILES = $(EXTRA_PROGRAMS)
30
31MAINTAINERCLEANFILES = Makefile.in
32
33if ENABLE_CRYPTO
34EXTRA_PROGRAM_NAMES += ntfsdecrypt
35endif
36
37if ENABLE_EXTRAS
38bin_PROGRAMS += $(EXTRA_PROGRAM_NAMES)
39else
40EXTRA_PROGRAMS = $(EXTRA_PROGRAM_NAMES)
41endif
42
43# Set the include path.
44AM_CPPFLAGS = -I$(top_srcdir)/include/ntfs-3g $(all_includes)
45
46ntfsfix_SOURCES = ntfsfix.c utils.c utils.h
47ntfsfix_LDADD = $(AM_LIBS)
48ntfsfix_LDFLAGS = $(AM_LFLAGS)
49
50mkntfs_CPPFLAGS = $(AM_CPPFLAGS) $(MKNTFS_CPPFLAGS)
51mkntfs_SOURCES = attrdef.c attrdef.h boot.c boot.h sd.c sd.h mkntfs.c utils.c utils.h
52mkntfs_LDADD = $(AM_LIBS) $(MKNTFS_LIBS)
53mkntfs_LDFLAGS = $(AM_LFLAGS)
54
55ntfslabel_SOURCES = ntfslabel.c utils.c utils.h
56ntfslabel_LDADD = $(AM_LIBS)
57ntfslabel_LDFLAGS = $(AM_LFLAGS)
58
59ntfsinfo_SOURCES = ntfsinfo.c utils.c utils.h
60ntfsinfo_LDADD = $(AM_LIBS)
61ntfsinfo_LDFLAGS = $(AM_LFLAGS)
62
63ntfsundelete_SOURCES = ntfsundelete.c ntfsundelete.h utils.c utils.h list.h
64ntfsundelete_LDADD = $(AM_LIBS)
65ntfsundelete_LDFLAGS = $(AM_LFLAGS)
66
67ntfsresize_SOURCES = ntfsresize.c utils.c utils.h
68ntfsresize_LDADD = $(AM_LIBS)
69ntfsresize_LDFLAGS = $(AM_LFLAGS)
70
71ntfsclone_SOURCES = ntfsclone.c utils.c utils.h
72ntfsclone_LDADD = $(AM_LIBS)
73ntfsclone_LDFLAGS = $(AM_LFLAGS)
74
75ntfscluster_SOURCES = ntfscluster.c ntfscluster.h cluster.c cluster.h utils.c utils.h
76ntfscluster_LDADD = $(AM_LIBS)
77ntfscluster_LDFLAGS = $(AM_LFLAGS)
78
79ntfsls_SOURCES = ntfsls.c utils.c utils.h list.h
80ntfsls_LDADD = $(AM_LIBS)
81ntfsls_LDFLAGS = $(AM_LFLAGS)
82
83ntfscat_SOURCES = ntfscat.c ntfscat.h utils.c utils.h
84ntfscat_LDADD = $(AM_LIBS)
85ntfscat_LDFLAGS = $(AM_LFLAGS)
86
87ntfscp_SOURCES = ntfscp.c utils.c utils.h
88ntfscp_LDADD = $(AM_LIBS)
89ntfscp_LDFLAGS = $(AM_LFLAGS)
90
91ntfsck_SOURCES = ntfsck.c utils.c utils.h
92ntfsck_LDADD = $(AM_LIBS)
93ntfsck_LDFLAGS = $(AM_LFLAGS)
94
95ntfscmp_SOURCES = ntfscmp.c utils.c utils.h
96ntfscmp_LDADD = $(AM_LIBS)
97ntfscmp_LDFLAGS = $(AM_LFLAGS)
98
99# We don't distribute these
100
101ntfstruncate_SOURCES = attrdef.c ntfstruncate.c utils.c utils.h
102ntfstruncate_LDADD = $(AM_LIBS)
103ntfstruncate_LDFLAGS = $(AM_LFLAGS)
104
105ntfsmftalloc_SOURCES = ntfsmftalloc.c utils.c utils.h
106ntfsmftalloc_LDADD = $(AM_LIBS)
107ntfsmftalloc_LDFLAGS = $(AM_LFLAGS)
108
109ntfsmove_SOURCES = ntfsmove.c ntfsmove.h utils.c utils.h
110ntfsmove_LDADD = $(AM_LIBS)
111ntfsmove_LDFLAGS = $(AM_LFLAGS)
112
113ntfswipe_SOURCES = ntfswipe.c ntfswipe.h utils.c utils.h
114ntfswipe_LDADD = $(AM_LIBS)
115ntfswipe_LDFLAGS = $(AM_LFLAGS)
116
117ntfsdump_logfile_SOURCES= ntfsdump_logfile.c
118ntfsdump_logfile_LDADD = $(AM_LIBS)
119ntfsdump_logfile_LDFLAGS= $(AM_LFLAGS)
120
121if ENABLE_CRYPTO
122ntfsdecrypt_SOURCES = ntfsdecrypt.c utils.c utils.h
123ntfsdecrypt_LDADD = $(AM_LIBS) $(GNUTLS_LIBS) $(LIBGCRYPT_LIBS)
124ntfsdecrypt_LDFLAGS = $(AM_LFLAGS)
125ntfsdecrypt_CFLAGS = $(GNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
126endif
127
128# Extra targets
129
130strip: $(bin_PROGRAMS) $(sbin_PROGRAMS)
131 $(STRIP) $^
132
133libs:
134 (cd ../libntfs-3g && $(MAKE) libs) || exit 1;
135
136extra: extras
137
138extras: libs $(EXTRA_PROGRAMS)
139
140# mkfs.ntfs[.8] hard link
141
142install-exec-hook:
143 $(INSTALL) -d $(DESTDIR)/sbin
144 $(LN_S) -f $(sbindir)/mkntfs $(DESTDIR)/sbin/mkfs.ntfs
145
146install-data-hook:
147 $(INSTALL) -d $(DESTDIR)$(man8dir)
148 $(LN_S) -f mkntfs.8 $(DESTDIR)$(man8dir)/mkfs.ntfs.8
149
150uninstall-local:
151 $(RM) -f $(DESTDIR)/sbin/mkfs.ntfs
152 $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ntfs.8
153
154endif
155