Makefile.am 2.5 KB

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