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