Forgot to remove some more .s strings and do a rename in order to prevent compiler...
[midnight-commander.git] / src / Makefile.am
blob23ed7cdf7fed720a5ffb26b8989892eacc26a0d9
1 AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
3 localedir = $(datadir)/locale
4 pkglibexecdir =         $(libexecdir)/@PACKAGE@
6 bin_PROGRAMS = mc mcmfmt
8 if CONS_SAVER
9 pkglibexec_PROGRAMS = cons.saver
10 AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" \
11         -DSAVERDIR=\""$(pkglibexecdir)"\"
12 else
13 AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
14 endif
16 noinst_PROGRAMS = man2hlp
17 man2hlp_LDADD = $(GLIB_LIBS)
19 mcmfmt_SOURCES = mfmt.c
21 cons_saver_SOURCES = cons.saver.c
23 man2hlp_SOURCES = man2hlp.c glibcompat.c
25 if USE_EDIT
26 EDITLIB = ../edit/libedit.a
27 endif
29 if USE_VFS
30 if USE_SAMBA_FS
31 VFSLIB = ../vfs/libvfs-mc.a ../vfs/samba/libsamba.a
32 else
33 VFSLIB = ../vfs/libvfs-mc.a
34 endif
35 endif
37 mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) \
38         $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV)
40 CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h
42 SRCS =  achown.c achown.h background.c background.h boxes.c boxes.h     \
43         chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h     \
44         command.c command.h complete.c cons.handler.c   \
45         cons.saver.h dialog.c dialog.h dir.c dir.h                      \
46         eregex.h execute.c execute.h ext.c ext.h file.c filegui.c       \
47         filegui.h file.h filenot.c fileopctx.c fileopctx.h find.c       \
48         find.h findme.c findme.h fs.h                                   \
49         glibcompat.c glibcompat.h global.h help.c help.h hotlist.c      \
50         hotlist.h info.c info.h key.c key.h keyxdef.c layout.c          \
51         layout.h learn.c learn.h listmode.c listmode.h                  \
52         logging.h logging.c                                             \
53         main.c main.h                                                   \
54         menu.c menu.h mountlist.c mountlist.h mouse.c mouse.h myslang.h \
55         option.c option.h panel.h panelize.c panelize.h poptalloca.h    \
56         popt.c poptconfig.c popt.h popthelp.c poptint.h poptparse.c     \
57         profile.c profile.h regex.c rxvt.c screen.c setup.c setup.h     \
58         slint.c subshell.c subshell.h textconf.c textconf.h             \
59         tree.c tree.h treestore.c treestore.h timefmt.h tty.c tty.h user.c      \
60         user.h util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c       \
61         widget.h win.c win.h wtools.c wtools.h unixcompat.h             \
62         x11conn.h x11conn.c ecs.h ecs.c
64 if CHARSET
65 mc_SOURCES = $(SRCS) $(CHARSET_SRC)
66 else
67 mc_SOURCES = $(SRCS)
68 endif
70 EXTRA_DIST = ChangeLog OChangeLog man2hlp.c $(CHARSET_SRC)
72 # automated testing
74 TESTS =                 ecs-test
76 check_PROGRAMS =        ecs-test
77 ecs_test_SOURCES =      ecs-test.c ecs.h ecs.c
78 ecs_test_LDADD =        $(GLIB_LIBS) $(INTLLIBS) $(MCLIBS)
80 # end of automated testing
82 install-exec-hook:
83         $(MAKE) install_mcview
84 if USE_EDIT
85         $(MAKE) install_mcedit
86 endif
89 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
91 install_mcview:
92         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
94 install_mcedit:
95         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
97 uninstall-hook:
98         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
99 if USE_EDIT
100         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
101 endif