lib/widget/input_complete.c: minor refactoring and optimization.
[midnight-commander.git] / src / Makefile.am
blob09bede5ad14c926f03082a9412ea245a0594fa2b
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 noinst_LTLIBRARIES = libinternal.la
13 AM_CPPFLAGS = \
14         -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" \
15         -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" \
16         -DDATADIR=\""$(pkgdatadir)/"\" \
17         -DLOCALEDIR=\""$(localedir)"\" \
18         -DEXTHELPERSDIR=\""@EXTHELPERSDIR@/"\"
20 if CONS_SAVER
21 SUBDIRS += consaver
22 AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
23 endif
25 AM_CPPFLAGS += -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CPPFLAGS)
27 localedir = $(datadir)/locale
28 pkglibexecdir = $(libexecdir)/@PACKAGE@
30 bin_PROGRAMS = mc
32 if USE_EDIT
33 EDITLIB = editor/libedit.la
34 endif
36 if USE_DIFF
37 DIFFLIB = diffviewer/libdiffviewer.la
38 endif
40 libinternal_la_LIBADD = \
41         filemanager/libmcfilemanager.la \
42         vfs/libmc-vfs.la \
43         viewer/libmcviewer.la \
44         $(DIFFLIB) $(EDITLIB)
46 mc_LDADD = \
47         libinternal.la \
48         $(top_builddir)/lib/libmc.la
50 if ENABLE_VFS_SMB
51 # this is a hack for linking with own samba library in simple way
52 mc_LDADD += vfs/smbfs/helpers/libsamba.a
53 endif
55 SRC_mc_conssaver = \
56         cons.handler.c consaver/cons.saver.h
58 mc_SOURCES = \
59         main.c
61 libinternal_la_SOURCES = \
62         $(SRC_mc_conssaver) \
63         args.c args.h \
64         clipboard.c clipboard.h \
65         events_init.c events_init.h \
66         execute.c execute.h \
67         help.c help.h \
68         history.h \
69         keybind-defaults.c keybind-defaults.h \
70         learn.c learn.h \
71         setup.c setup.h \
72         textconf.c textconf.h \
73         util.c util.h
75 if CHARSET
76     libinternal_la_SOURCES += selcodepage.c selcodepage.h
77 endif
79 if ENABLE_SUBSHELL
80     libinternal_la_SOURCES += subshell.c subshell.h
81 endif
83 if ENABLE_BACKGROUND
84     libinternal_la_SOURCES += background.c background.h
85 endif
87 EXTRA_DIST = $(SRC_maintainer) $(SRC_charset)
89 # end of automated testing
91 install-exec-hook:
92         $(MAKE) install_mcview
93 if USE_EDIT
94         $(MAKE) install_mcedit
95 endif
96 if USE_DIFF
97         $(MAKE) install_mcdiff
98 endif
101 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
103 install_mcview:
104         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
106 install_mcedit:
107         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
109 install_mcdiff:
110         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff
112 uninstall-hook:
113         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
114 if USE_EDIT
115         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
116 endif
117 if USE_DIFF
118         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff
119 endif