Clarify usage of sftpfs_internal_stat() return value.
[midnight-commander.git] / src / Makefile.am
blob56063be20e8f8ce461e40712cc24f73f53e022b7
1 SUBDIRS = filemanager man2hlp vfs viewer
3 if USE_INTERNAL_EDIT
4 SUBDIRS += editor
5 endif
7 if USE_DIFF
8 SUBDIRS += diffviewer
9 endif
11 if ENABLE_SUBSHELL
12 SUBDIRS += subshell
13 endif
15 noinst_LTLIBRARIES = libinternal.la
17 AM_CPPFLAGS = \
18         -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" \
19         -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" \
20         -DDATADIR=\""$(pkgdatadir)/"\" \
21         -DLOCALEDIR=\""$(localedir)"\" \
22         -DEXTHELPERSDIR=\""@EXTHELPERSDIR@/"\"
24 if CONS_SAVER
25 SUBDIRS += consaver
26 AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
27 endif
29 AM_CPPFLAGS += -I$(top_srcdir) $(GLIB_CFLAGS)
31 localedir = $(datadir)/locale
32 pkglibexecdir = $(libexecdir)/@PACKAGE@
34 bin_PROGRAMS = mc
36 if USE_INTERNAL_EDIT
37 EDITLIB = editor/libedit.la
38 endif
40 if USE_DIFF
41 DIFFLIB = diffviewer/libdiffviewer.la
42 endif
44 if ENABLE_SUBSHELL
45 SUBSHELLLIB = subshell/libsubshell.la
46 endif
48 libinternal_la_LIBADD = \
49         filemanager/libmcfilemanager.la \
50         vfs/libmc-vfs.la \
51         viewer/libmcviewer.la \
52         $(DIFFLIB) $(EDITLIB) $(SUBSHELLLIB)
54 mc_LDADD = \
55         libinternal.la \
56         $(top_builddir)/lib/libmc.la
58 if ENABLE_VFS_SMB
59 # this is a hack for linking with own samba library in simple way
60 mc_LDADD += vfs/smbfs/helpers/libsamba.a
61 endif
63 SRC_mc_conssaver = \
64         cons.handler.c consaver/cons.saver.h
66 mc_SOURCES = \
67         main.c
69 libinternal_la_SOURCES = \
70         $(SRC_mc_conssaver) \
71         args.c args.h \
72         clipboard.c clipboard.h \
73         events_init.c events_init.h \
74         execute.c execute.h \
75         help.c help.h \
76         history.h \
77         keybind-defaults.c keybind-defaults.h \
78         learn.c learn.h \
79         setup.c setup.h \
80         textconf.c textconf.h \
81         usermenu.c usermenu.h \
82         util.c util.h
84 if CHARSET
85     libinternal_la_SOURCES += selcodepage.c selcodepage.h
86 endif
89 if ENABLE_BACKGROUND
90     libinternal_la_SOURCES += background.c background.h
91 endif
93 EXTRA_DIST = $(SRC_maintainer) $(SRC_charset)
95 # end of automated testing
97 install-exec-hook:
98         $(MAKE) install_mcview
99 if USE_INTERNAL_EDIT
100         $(MAKE) install_mcedit
101 endif
102 if USE_DIFF
103         $(MAKE) install_mcdiff
104 endif
107 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
109 install_mcview:
110         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
112 install_mcedit:
113         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
115 install_mcdiff:
116         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff
118 uninstall-hook:
119         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
120 if USE_INTERNAL_EDIT
121         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
122 endif
123 if USE_DIFF
124         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff
125 endif