(file_op_context_create_ui): apply callback to the "Abort" button
[midnight-commander.git] / src / Makefile.am
blob06bd0bacbbec1e80ddb0d5f0f01b3074f00f472a
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 # required for textconf.c
30 if ENABLE_VFS
31 if ENABLE_VFS_SFTP
32 AM_CPPFLAGS += $(LIBSSH_CFLAGS)
33 endif
34 endif
36 AM_CPPFLAGS += -I$(top_srcdir) $(GLIB_CFLAGS)
38 localedir = $(datadir)/locale
39 pkglibexecdir = $(libexecdir)/@PACKAGE@
41 bin_PROGRAMS = mc
43 if USE_INTERNAL_EDIT
44 EDITLIB = editor/libedit.la
45 endif
47 if USE_DIFF
48 DIFFLIB = diffviewer/libdiffviewer.la
49 endif
51 if ENABLE_SUBSHELL
52 SUBSHELLLIB = subshell/libsubshell.la
53 endif
55 libinternal_la_LIBADD = \
56         filemanager/libmcfilemanager.la \
57         vfs/libmc-vfs.la \
58         viewer/libmcviewer.la \
59         $(DIFFLIB) $(EDITLIB) $(SUBSHELLLIB)
61 mc_LDADD = \
62         libinternal.la
64 if ENABLE_MCLIB
65 libinternal_la_LIBADD += \
66         $(top_builddir)/lib/libmc.la
67 else
68 mc_LDADD += \
69         $(top_builddir)/lib/libmc.la
70 endif
72 SRC_mc_conssaver = \
73         cons.handler.c consaver/cons.saver.h
75 mc_SOURCES = \
76         main.c
78 libinternal_la_SOURCES = \
79         $(SRC_mc_conssaver) \
80         args.c args.h \
81         clipboard.c clipboard.h \
82         events_init.c events_init.h \
83         execute.c execute.h \
84         file_history.c file_history.h \
85         help.c help.h \
86         history.h \
87         keymap.c keymap.h \
88         learn.c learn.h \
89         setup.c setup.h \
90         textconf.c textconf.h \
91         usermenu.c usermenu.h \
92         util.c util.h
94 if CHARSET
95     libinternal_la_SOURCES += selcodepage.c selcodepage.h
96 endif
99 if ENABLE_BACKGROUND
100     libinternal_la_SOURCES += background.c background.h
101 endif
103 EXTRA_DIST = $(SRC_maintainer) $(SRC_charset)
105 # end of automated testing
107 install-exec-hook:
108         $(MAKE) install_mcview
109 if USE_INTERNAL_EDIT
110         $(MAKE) install_mcedit
111 endif
112 if USE_DIFF
113         $(MAKE) install_mcdiff
114 endif
117 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
119 install_mcview:
120         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
122 install_mcedit:
123         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
125 install_mcdiff:
126         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff
128 uninstall-hook:
129         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
130 if USE_INTERNAL_EDIT
131         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
132 endif
133 if USE_DIFF
134         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff
135 endif