1SUBDIRS = filemanager man2hlp vfs viewer 2 3if USE_INTERNAL_EDIT 4SUBDIRS += editor 5endif 6 7if USE_DIFF 8SUBDIRS += diffviewer 9endif 10 11if ENABLE_SUBSHELL 12SUBDIRS += subshell 13endif 14 15noinst_LTLIBRARIES = libinternal.la 16 17AM_CPPFLAGS = \ 18 -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" \ 19 -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" \ 20 -DDATADIR=\""$(pkgdatadir)/"\" \ 21 -DLOCALEDIR=\""$(localedir)"\" \ 22 -DEXTHELPERSDIR=\""@EXTHELPERSDIR@/"\" 23 24if CONS_SAVER 25SUBDIRS += consaver 26AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\" 27endif 28 29AM_CPPFLAGS += -I$(top_srcdir) $(GLIB_CFLAGS) 30 31localedir = $(datadir)/locale 32pkglibexecdir = $(libexecdir)/@PACKAGE@ 33 34bin_PROGRAMS = mc 35 36if USE_INTERNAL_EDIT 37EDITLIB = editor/libedit.la 38endif 39 40if USE_DIFF 41DIFFLIB = diffviewer/libdiffviewer.la 42endif 43 44if ENABLE_SUBSHELL 45SUBSHELLLIB = subshell/libsubshell.la 46endif 47 48libinternal_la_LIBADD = \ 49 filemanager/libmcfilemanager.la \ 50 vfs/libmc-vfs.la \ 51 viewer/libmcviewer.la \ 52 $(DIFFLIB) $(EDITLIB) $(SUBSHELLLIB) 53 54mc_LDADD = \ 55 libinternal.la 56 57if ENABLE_MCLIB 58libinternal_la_LIBADD += \ 59 $(top_builddir)/lib/libmc.la 60else 61mc_LDADD += \ 62 $(top_builddir)/lib/libmc.la 63endif 64 65if ENABLE_VFS_SMB 66# this is a hack for linking with own samba library in simple way 67mc_LDADD += vfs/smbfs/helpers/libsamba.a 68endif 69 70SRC_mc_conssaver = \ 71 cons.handler.c consaver/cons.saver.h 72 73mc_SOURCES = \ 74 main.c 75 76libinternal_la_SOURCES = \ 77 $(SRC_mc_conssaver) \ 78 args.c args.h \ 79 clipboard.c clipboard.h \ 80 events_init.c events_init.h \ 81 execute.c execute.h \ 82 file_history.c file_history.h \ 83 help.c help.h \ 84 history.h \ 85 keymap.c keymap.h \ 86 learn.c learn.h \ 87 setup.c setup.h \ 88 textconf.c textconf.h \ 89 usermenu.c usermenu.h \ 90 util.c util.h 91 92if CHARSET 93 libinternal_la_SOURCES += selcodepage.c selcodepage.h 94endif 95 96 97if ENABLE_BACKGROUND 98 libinternal_la_SOURCES += background.c background.h 99endif 100 101EXTRA_DIST = $(SRC_maintainer) $(SRC_charset) 102 103# end of automated testing 104 105install-exec-hook: 106 $(MAKE) install_mcview 107if USE_INTERNAL_EDIT 108 $(MAKE) install_mcedit 109endif 110if USE_DIFF 111 $(MAKE) install_mcdiff 112endif 113 114# 115# Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'. 116# 117install_mcview: 118 cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview 119 120install_mcedit: 121 cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit 122 123install_mcdiff: 124 cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff 125 126uninstall-hook: 127 rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview 128if USE_INTERNAL_EDIT 129 rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit 130endif 131if USE_DIFF 132 rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff 133endif 134