misc/mc.lib: changes in hotkeys definitions.
[midnight-commander.git] / src / Makefile.am
blob88faaf172f4c596bf5f32e789170b62fc22815db
1 SUBDIRS = mcconfig search
3 AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
5 localedir = $(datadir)/locale
6 pkglibexecdir =         $(libexecdir)/@PACKAGE@
8 bin_PROGRAMS = mc mcmfmt
10 if CONS_SAVER
11 pkglibexec_PROGRAMS = cons.saver
12 AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" \
13         -DSAVERDIR=\""$(pkglibexecdir)"\" \
14         -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
15 else
16 AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" \
17         -DLOCALEDIR=\""$(localedir)"\" \
18         -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
19 endif
21 noinst_PROGRAMS = man2hlp
22 man2hlp_LDADD = $(GLIB_LIBS)
24 mcmfmt_SOURCES = mfmt.c
26 cons_saver_SOURCES = cons.saver.c
28 man2hlp_SOURCES = man2hlp.c glibcompat.c
30 if USE_EDIT
31 EDITLIB = ../edit/libedit.a
32 endif
34 if USE_VFS
35 if USE_SAMBA_FS
36 VFSLIB = ../vfs/libvfs-mc.a ../vfs/samba/libsamba.a
37 else
38 VFSLIB = ../vfs/libvfs-mc.a
39 endif
40 endif
42 mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) \
43         $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV) search/libsearch.la \
44         mcconfig/libmcconfig.la
46 CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h
48 SRCS =  achown.c achown.h background.c background.h boxes.c boxes.h     \
49         chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h     \
50         command.c command.h complete.c cons.handler.c   \
51         cons.saver.h dialog.c dialog.h dir.c dir.h                      \
52         execute.c execute.h ext.c ext.h file.c filegui.c        \
53         filegui.h file.h filenot.c fileopctx.c fileopctx.h find.c       \
54         find.h findme.c findme.h fs.h                                   \
55         glibcompat.c glibcompat.h global.h help.c help.h hotlist.c      \
56         hotlist.h info.c info.h key.c key.h keyxdef.c layout.c          \
57         layout.h learn.c learn.h listmode.c listmode.h history.h        \
58         logging.h logging.c                                             \
59         main.c main.h main-widgets.h                                    \
60         menu.c menu.h mountlist.c mountlist.h mouse.c mouse.h myslang.h \
61         option.c option.h panel.h panelize.c panelize.h poptalloca.h    \
62         popt.c poptconfig.c popt.h popthelp.c poptint.h poptparse.c     \
63         rxvt.c screen.c setup.c setup.h \
64         slint.c subshell.c subshell.h textconf.c textconf.h             \
65         tree.c tree.h treestore.c treestore.h timefmt.h tty.c tty.h user.c      \
66         user.h util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c       \
67         widget.h win.c win.h wtools.c wtools.h unixcompat.h             \
68         x11conn.h x11conn.c ecs.h ecs.c \
69         strutil.h strutil.c strutilascii.c strutil8bit.c strutilutf8.c \
70         search/search.h
72 if CHARSET
73 mc_SOURCES = $(SRCS) $(CHARSET_SRC)
74 else
75 mc_SOURCES = $(SRCS)
76 endif
78 EXTRA_DIST = man2hlp.c $(CHARSET_SRC)
80 # automated testing
82 TESTS =                 ecs-test
84 check_PROGRAMS =        ecs-test
85 ecs_test_SOURCES =      ecs-test.c ecs.h ecs.c
86 ecs_test_LDADD =        $(GLIB_LIBS) $(INTLLIBS) $(MCLIBS)
88 # end of automated testing
90 install-exec-hook:
91         $(MAKE) install_mcview
92 if USE_EDIT
93         $(MAKE) install_mcedit
94 endif
97 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
99 install_mcview:
100         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
102 install_mcedit:
103         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
105 uninstall-hook:
106         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
107 if USE_EDIT
108         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
109 endif