Fixup update of command line after window resize.
[midnight-commander.git] / src / Makefile.am
blob8ad6c817bd2c00c3f12b7858b9233b4e6e143b9e
1 SUBDIRS = filemanager man2hlp vfs viewer
3 if USE_EDIT
4 SUBDIRS += editor
5 endif
7 if USE_DIFF
8 SUBDIRS += diffviewer
9 endif
11 AM_CPPFLAGS = \
12         -DLOCALEDIR=\""$(localedir)"\" \
13         -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\"
15 if CONS_SAVER
16 SUBDIRS += consaver
17 AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
18 endif
20 AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
22 localedir = $(datadir)/locale
23 pkglibexecdir = $(libexecdir)/@PACKAGE@
25 bin_PROGRAMS = mc
27 if USE_EDIT
28 EDITLIB = editor/libedit.la
29 endif
31 if USE_DIFF
32 DIFFLIB = diffviewer/libdiffviewer.la
33 endif
35 mc_LDADD = \
36         vfs/libmc-vfs.la \
37         viewer/libmcviewer.la \
38         filemanager/libmcfilemanager.la \
39         $(DIFFLIB) $(EDITLIB) \
40         $(top_builddir)/lib/libmc.la
42 if ENABLE_VFS_SMB
43 # this is a hack for linking with own samba library in simple way
44 mc_LDADD += vfs/smbfs/helpers/libsamba.a
45 endif
47 SRC_mc_conssaver = \
48         cons.handler.c consaver/cons.saver.h
50 mc_SOURCES = \
51         $(SRC_mc_conssaver) \
52         args.c args.h \
53         background.c background.h \
54         clipboard.c clipboard.h \
55         events_init.c events_init.h \
56         execute.c execute.h \
57         help.c help.h \
58         history.h \
59         keybind-defaults.c keybind-defaults.h \
60         learn.c learn.h \
61         main.c main.h \
62         setup.c setup.h \
63         subshell.c subshell.h \
64         textconf.c textconf.h \
65         util.c util.h
67 if CHARSET
68     mc_SOURCES += selcodepage.c selcodepage.h
69 endif
71 EXTRA_DIST = $(SRC_maintainer) $(SRC_charset)
73 # end of automated testing
75 install-exec-hook:
76         $(MAKE) install_mcview
77 if USE_EDIT
78         $(MAKE) install_mcedit
79 endif
80 if USE_DIFF
81         $(MAKE) install_mcdiff
82 endif
85 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
87 install_mcview:
88         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
90 install_mcedit:
91         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
93 install_mcdiff:
94         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff
96 uninstall-hook:
97         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
98 if USE_EDIT
99         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
100 endif
101 if USE_DIFF
102         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff
103 endif