Ticket #380: About colors schemes (reopened ticket)
[midnight-commander.git] / src / Makefile.am
blobe1f3e72116be8c2f82f7aeeb13aa3fe412751461
1 SUBDIRS = mcconfig search tty viewer filehighlight skin
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         -DPACKAGE=\""@PACKAGE@\"
20 endif
22 noinst_PROGRAMS = man2hlp
23 man2hlp_LDADD = $(GLIB_LIBS)
25 mcmfmt_SOURCES = mfmt.c
27 cons_saver_SOURCES = cons.saver.c
29 man2hlp_SOURCES = man2hlp.c glibcompat.c
31 if USE_EDIT
32 EDITLIB = ../edit/libedit.a
33 endif
35 if USE_VFS
36 if USE_SAMBA_FS
37 VFSLIB = ../vfs/libvfs-mc.a ../vfs/samba/libsamba.a
38 else
39 VFSLIB = ../vfs/libvfs-mc.a
40 endif
41 endif
43 MCCONFIGLIB = mcconfig/libmcconfig.la
44 SEARCHLIB = search/libsearch.la
45 TTYLIB =  tty/libmctty.la
46 VIEWERLIB = viewer/libmcviewer.la
47 FILEHIGHLIGHTLIB=filehighlight/libmcfilehighlight.la
48 SKINLIB =  skin/libmcskin.la
50 mc_LDADD = $(EDITLIB) $(VFSLIB) $(FILEHIGHLIGHTLIB) $(SKINLIB) \
51         $(MCCONFIGLIB) $(SEARCHLIB) $(TTYLIB) $(VIEWERLIB) \
52         $(INTLLIBS) $(MCLIBS) $(SLANGLIB) $(LIBICONV) $(GLIB_LIBS)
54 CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h
56 SRCS =  args.c args.h achown.c achown.h background.c background.h       \
57         boxes.c boxes.h chmod.c chmod.h chown.c chown.h cmd.c cmd.h     \
58         command.c command.h complete.c cons.handler.c                   \
59         cons.saver.h dialog.c dialog.h dir.c dir.h                      \
60         execute.c execute.h ext.c ext.h file.c filegui.c                \
61         filegui.h file.h filenot.c fileopctx.c fileopctx.h find.c       \
62         find.h fs.h                                                     \
63         glibcompat.c glibcompat.h global.h help.c help.h hotlist.c      \
64         hotlist.h info.c info.h layout.c                                \
65         layout.h learn.c learn.h listmode.c listmode.h history.h        \
66         logging.h logging.c main.c main.h main-widgets.h                \
67         menu.c menu.h mountlist.c mountlist.h                           \
68         option.c option.h panel.h panelize.c panelize.h screen.c        \
69         setup.c setup.h  subshell.c subshell.h textconf.c textconf.h    \
70         tree.c tree.h treestore.c treestore.h timefmt.h user.c          \
71         user.h util.c util.h utilunix.c vfsdummy.h                      \
72         widget.c widget.h wtools.c wtools.h unixcompat.h                \
73         ecs.h ecs.c                                                     \
74         strutil.h strutil.c strutilascii.c strutil8bit.c strutilutf8.c  \
75         search/search.h strescape.c strescape.h
77 if CHARSET
78 mc_SOURCES = $(SRCS) $(CHARSET_SRC)
79 else
80 mc_SOURCES = $(SRCS)
81 endif
83 EXTRA_DIST = man2hlp.c $(CHARSET_SRC)
85 # automated testing
87 TESTS =                 ecs-test
89 check_PROGRAMS =        ecs-test
90 ecs_test_SOURCES =      ecs-test.c ecs.h ecs.c
91 ecs_test_LDADD =        $(GLIB_LIBS) $(INTLLIBS) $(MCLIBS)
93 # end of automated testing
95 install-exec-hook:
96         $(MAKE) install_mcview
97 if USE_EDIT
98         $(MAKE) install_mcedit
99 endif
102 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
104 install_mcview:
105         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
107 install_mcedit:
108         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
110 uninstall-hook:
111         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
112 if USE_EDIT
113         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
114 endif