Split file src/keybind.[ch] to lib/keybind.[ch] and src/keybind-defaults.[ch].
[midnight-commander.git] / src / Makefile.am
blob12cd7f6908c219e35e6d304e77d00eefec462a86
1 SUBDIRS = 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 SRC_charset = selcodepage.c selcodepage.h
38 if CHARSET
39     SRC_USE_charset=$(SRC_charset)
40 endif
42 mc_LDADD = \
43         viewer/libmcviewer.la \
44         $(DIFFLIB) $(EDITLIB) \
45         ../lib/libmc.la \
46         $(MCLIBS) $(SLANGLIB) $(GLIB_LIBS) \
47         $(PCRE_LIBS) $(LIBICONV) $(INTLLIBS)
49 if ENABLE_VFS_SMB
50 # this is a hack for linking with own samba library in simple way
51 mc_LDADD += ../lib/vfs/mc-vfs/samba/libsamba.a
52 endif
54 SRC_mc_widgets = \
55         tree.c tree.h \
56         screen.c panel.h
58 SRC_mc_conssaver = \
59         cons.handler.c consaver/cons.saver.h
61 SRC_mc_options = \
62         learn.c learn.h \
63         option.c option.h \
64         setup.c setup.h
66 mc_SOURCES = \
67         $(SRC_USE_charset) \
68         $(SRC_mc_widgets) \
69         $(SRC_mc_conssaver) \
70         $(SRC_mc_options) \
71         achown.c achown.h \
72         args.c args.h \
73         background.c background.h \
74         boxes.c boxes.h \
75         chmod.c chmod.h \
76         chown.c chown.h \
77         clipboard.c clipboard.h \
78         cmd.c cmd.h \
79         command.c command.h \
80         complete.c \
81         dir.c dir.h \
82         execute.c execute.h \
83         ext.c ext.h \
84         file.c file.h \
85         filegui.c filegui.h \
86         filenot.c \
87         fileopctx.c fileopctx.h \
88         find.c find.h \
89         help.c help.h \
90         history.h \
91         hotlist.c hotlist.h \
92         info.c info.h \
93         keybind-defaults.c keybind-defaults.h \
94         layout.c layout.h \
95         listmode.c listmode.h \
96         main.c main.h \
97         main-widgets.h \
98         panelize.c panelize.h \
99         subshell.c subshell.h \
100         textconf.c textconf.h \
101         treestore.c treestore.h \
102         user.c user.h
104 #if USE_MOUNTLIST
105 mc_SOURCES += mountlist.c mountlist.h
106 #endif
108 EXTRA_DIST = $(SRC_maintainer) $(SRC_charset)
110 # end of automated testing
112 install-exec-hook:
113         $(MAKE) install_mcview
114 if USE_EDIT
115         $(MAKE) install_mcedit
116 endif
117 if USE_DIFF
118         $(MAKE) install_mcdiff
119 endif
122 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
124 install_mcview:
125         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
127 install_mcedit:
128         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
130 install_mcdiff:
131         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff
133 uninstall-hook:
134         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
135 if USE_EDIT
136         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
137 endif
138 if USE_DIFF
139         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff
140 endif