Makefile.am 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. SUBDIRS = filemanager man2hlp vfs viewer
  2. if USE_EDIT
  3. SUBDIRS += editor
  4. endif
  5. if USE_DIFF
  6. SUBDIRS += diffviewer
  7. endif
  8. AM_CPPFLAGS = \
  9. -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" \
  10. -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" \
  11. -DDATADIR=\""$(pkgdatadir)/"\" \
  12. -DLOCALEDIR=\""$(localedir)"\"
  13. if CONS_SAVER
  14. SUBDIRS += consaver
  15. AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
  16. endif
  17. AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
  18. localedir = $(datadir)/locale
  19. pkglibexecdir = $(libexecdir)/@PACKAGE@
  20. bin_PROGRAMS = mc
  21. if USE_EDIT
  22. EDITLIB = editor/libedit.la
  23. endif
  24. if USE_DIFF
  25. DIFFLIB = diffviewer/libdiffviewer.la
  26. endif
  27. mc_LDADD = \
  28. vfs/libmc-vfs.la \
  29. viewer/libmcviewer.la \
  30. filemanager/libmcfilemanager.la \
  31. $(DIFFLIB) $(EDITLIB) \
  32. $(top_builddir)/lib/libmc.la
  33. if ENABLE_VFS_SMB
  34. # this is a hack for linking with own samba library in simple way
  35. mc_LDADD += vfs/smbfs/helpers/libsamba.a
  36. endif
  37. SRC_mc_conssaver = \
  38. cons.handler.c consaver/cons.saver.h
  39. mc_SOURCES = \
  40. $(SRC_mc_conssaver) \
  41. args.c args.h \
  42. clipboard.c clipboard.h \
  43. events_init.c events_init.h \
  44. execute.c execute.h \
  45. help.c help.h \
  46. history.h \
  47. keybind-defaults.c keybind-defaults.h \
  48. learn.c learn.h \
  49. main.c main.h \
  50. setup.c setup.h \
  51. subshell.c subshell.h \
  52. textconf.c textconf.h \
  53. util.c util.h
  54. if CHARSET
  55. mc_SOURCES += selcodepage.c selcodepage.h
  56. endif
  57. if ENABLE_BACKGROUND
  58. mc_SOURCES += background.c background.h
  59. endif
  60. EXTRA_DIST = $(SRC_maintainer) $(SRC_charset)
  61. # end of automated testing
  62. install-exec-hook:
  63. $(MAKE) install_mcview
  64. if USE_EDIT
  65. $(MAKE) install_mcedit
  66. endif
  67. if USE_DIFF
  68. $(MAKE) install_mcdiff
  69. endif
  70. #
  71. # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
  72. #
  73. install_mcview:
  74. cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
  75. install_mcedit:
  76. cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
  77. install_mcdiff:
  78. cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff
  79. uninstall-hook:
  80. rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
  81. if USE_EDIT
  82. rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
  83. endif
  84. if USE_DIFF
  85. rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff
  86. endif