http://linux-ntfs.sourceforge.net/snapshots/ntfsprogs-200309071734.tar.bz2
[ntfsprogs.git] / ntfsprogs / Makefile.am
1 # Later gcc require -fms-extensions to work.
2 if GCC_NEEDS_MS_EXTENSIONS
3 GCCflag = -fms-extensions
4 else
5 GCCflag =
6 endif
7
8 # Need this to enable 64-bit (device) file access functions and parameters.
9 if DEBUG
10 AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -Wall -g -DDEBUG $(GCCflag)
11 else
12 AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -Wall $(GCCflag)
13 endif
14
15 if REALLYSTATIC
16 AM_LIBS         = $(top_srcdir)/libntfs/.libs/libntfs.a
17 AM_LFLAGS       = -static
18 STATIC_LINK     = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
19 else
20 AM_LIBS         = $(top_srcdir)/libntfs/libntfs.la
21 AM_LFLAGS       = $(all_libraries)
22 LIBTOOL_LINK    = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
23 endif
24
25 # Workaround to make REALLYSTATIC work with automake 1.5.
26 LINK=$(STATIC_LINK) $(LIBTOOL_LINK)
27
28 bin_PROGRAMS            = ntfsfix ntfsinfo ntfscluster
29 sbin_PROGRAMS           = mkntfs ntfslabel ntfsundelete ntfsresize
30 EXTRA_PROGRAMS          = ntfsdump_logfile dumplog ntfswipe ntfstruncate
31
32 man_MANS                = mkntfs.8 ntfsfix.8 ntfslabel.8 ntfsinfo.8 \
33                           ntfsundelete.8 ntfsresize.8 ntfscluster.8 ntfsprogs.8
34 EXTRA_MANS              =
35
36 CLEANFILES              = $(EXTRA_PROGRAMS)
37
38 linux_ntfsincludedir    = -I$(top_srcdir)/include
39
40 # Set the include path.
41 INCLUDES                = -I$(top_srcdir)/include $(all_includes)
42
43 ntfsfix_SOURCES         = ntfsfix.c
44 ntfsfix_LDADD           = $(AM_LIBS)
45 ntfsfix_LDFLAGS         = $(AM_LFLAGS)
46
47 mkntfs_SOURCES          = attrdef.c upcase.c boot.c sd.c mkntfs.c utils.c utils.h
48 mkntfs_LDADD            = $(AM_LIBS)
49 mkntfs_LDFLAGS          = $(AM_LFLAGS)
50
51 ntfslabel_SOURCES       = ntfslabel.c utils.c utils.h
52 ntfslabel_LDADD         = $(AM_LIBS)
53 ntfslabel_LDFLAGS       = $(AM_LFLAGS)
54
55 ntfsinfo_SOURCES        = ntfsinfo.c utils.c utils.h
56 ntfsinfo_LDADD          = $(AM_LIBS)
57 ntfsinfo_LDFLAGS        = $(AM_LFLAGS)
58
59 ntfsundelete_SOURCES    = ntfsundelete.c ntfsundelete.h utils.c utils.h
60 ntfsundelete_LDADD      = $(AM_LIBS)
61 ntfsundelete_LDFLAGS    = $(AM_LFLAGS)
62
63 ntfsresize_SOURCES      = ntfsresize.c utils.c utils.h
64 ntfsresize_LDADD        = $(AM_LIBS)
65 ntfsresize_LDFLAGS      = $(AM_LFLAGS)
66
67 ntfscluster_SOURCES     = ntfscluster.c ntfscluster.h utils.c utils.h
68 ntfscluster_LDADD       = $(AM_LIBS)
69 ntfscluster_LDFLAGS     = $(AM_LFLAGS)
70
71 # We don't distribute these
72
73 ntfstruncate_SOURCES    = attrdef.c ntfstruncate.c utils.c utils.h
74 ntfstruncate_LDADD      = $(AM_LIBS)
75 ntfstruncate_LDFLAGS    = $(AM_LFLAGS)
76
77 ntfswipe_SOURCES        = ntfswipe.c ntfswipe.h utils.c utils.h
78 ntfswipe_LDADD          = $(AM_LIBS)
79 ntfswipe_LDFLAGS        = $(AM_LFLAGS)
80
81 ntfsdump_logfile_SOURCES= ntfsdump_logfile.c
82 ntfsdump_logfile_LDADD  = $(AM_LIBS)
83 ntfsdump_logfile_LDFLAGS= $(AM_LFLAGS)
84
85 dumplog_SOURCES         = dumplog.c
86 dumplog_LDADD           = $(AM_LIBS)
87 dumplog_LDFLAGS         = $(AM_LFLAGS)
88
89 # Extra targets
90
91 strip:  $(bin_PROGRAMS) $(sbin_PROGRAMS)
92         $(STRIP) $^
93