Fix of DLG_ACTION handling in 'Configure options' dialog window.
[midnight-commander.git] / src / Makefile.am
blob2da86c38066424ed30607287384ba7995f184b8c
1 SUBDIRS = filemanager man2hlp viewer
3 if USE_EDIT
4 SUBDIRS += editor
5 endif
7 if USE_DIFF
8 SUBDIRS += diffviewer
9 endif
11 AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" \
12         -DLOCALEDIR=\""$(localedir)"\" \
13         -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
16 if CONS_SAVER
17 SUBDIRS += consaver
18 AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
19 endif
21 AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
23 localedir = $(datadir)/locale
24 pkglibexecdir = $(libexecdir)/@PACKAGE@
26 bin_PROGRAMS = mc
28 if USE_EDIT
29 EDITLIB = editor/libedit.la
30 endif
32 if USE_DIFF
33 DIFFLIB = diffviewer/libdiffviewer.la
34 endif
36 mc_LDADD = \
37         viewer/libmcviewer.la \
38         filemanager/libmcfilemanager.la \
39         $(DIFFLIB) $(EDITLIB) \
40         ../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 += ../lib/vfs/mc-vfs/samba/libsamba.a
45 endif
47 mc_LDADD += $(MCLIBS) $(SLANGLIB)
49 if HAVE_GMODULE
50 mc_LDADD += $(GMODULE_LIBS)
51 else
52 mc_LDADD += $(GLIB_LIBS)
53 endif
55 mc_LDADD += $(PCRE_LIBS) $(LIBICONV) $(INTLLIBS)
57 SRC_mc_conssaver = \
58         cons.handler.c consaver/cons.saver.h
60 mc_SOURCES = \
61         $(SRC_mc_conssaver) \
62         args.c args.h \
63         background.c background.h \
64         clipboard.c clipboard.h \
65         execute.c execute.h \
66         help.c help.h \
67         history.h \
68         keybind-defaults.c keybind-defaults.h \
69         learn.c learn.h \
70         main.c main.h \
71         setup.c setup.h \
72         subshell.c subshell.h \
73         textconf.c textconf.h
75 if CHARSET
76     mc_SOURCES += selcodepage.c selcodepage.h
77 endif
79 EXTRA_DIST = $(SRC_maintainer) $(SRC_charset)
81 # end of automated testing
83 install-exec-hook:
84         $(MAKE) install_mcview
85 if USE_EDIT
86         $(MAKE) install_mcedit
87 endif
88 if USE_DIFF
89         $(MAKE) install_mcdiff
90 endif
93 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
95 install_mcview:
96         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
98 install_mcedit:
99         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
101 install_mcdiff:
102         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff
104 uninstall-hook:
105         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
106 if USE_EDIT
107         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
108 endif
109 if USE_DIFF
110         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff
111 endif