lib/Makefile.am: added lib/skin.h into distribution
[midnight-commander.git] / src / Makefile.am
blob4dce0cc8f619943ab1840ffcd6d28863c6f1ace3
1 SUBDIRS = viewer
3 if USE_EDIT
4 SUBDIRS += editor
5 endif
8 AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" \
9         -DLOCALEDIR=\""$(localedir)"\" \
10         -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
13 if CONS_SAVER
14 SUBDIRS += consaver
15 AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
16 endif
18 AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
20 localedir = $(datadir)/locale
21 pkglibexecdir =         $(libexecdir)/@PACKAGE@
23 bin_PROGRAMS = mc mcmfmt
25 noinst_PROGRAMS = man2hlp
27 mcmfmt_SOURCES = mfmt.c
29 man2hlp_SOURCES = man2hlp.c
31 man2hlp_LDADD = \
32     ../lib/libmc.la \
33     $(GLIB_LIBS) $(PCRE_LIBS)
35 if USE_EDIT
36 EDITLIB = editor/libedit.la
37 endif
39 SRC_charset = charsets.c charsets.h selcodepage.c selcodepage.h
41 if CHARSET
42     SRC_USE_charset=$(SRC_charset)
43 endif
45 mc_LDADD = \
46         ../lib/libmc.la \
47         $(EDITLIB) \
48         viewer/libmcviewer.la \
49         $(INTLLIBS) $(MCLIBS) $(SLANGLIB) $(LIBICONV) \
50         $(GLIB_LIBS) $(PCRE_LIBS)
52 if USE_SAMBA_FS
53 # this is a hack for linking with own samba library in simple way
54 mc_LDADD += ../lib/vfs/mc-vfs/samba/libsamba.a
55 endif
58 SRC_mc_widgets = \
59         dialog.c dialog.h \
60         menu.c menu.h \
61         screen.c panel.h \
62         tree.c tree.h \
63         widget.c widget.h \
64         wtools.c wtools.h
66 SRC_mc_conssaver = \
67         cons.handler.c consaver/cons.saver.h
69 SRC_mc_options = \
70         learn.c learn.h \
71         option.c option.h \
72         setup.c setup.h
74 SRC_mc_keybind = \
75         keybind.c keybind.h \
76         cmddef.h
78 SRC_mc_extended_charset = \
79         ecs.c ecs.h
81 mc_SOURCES = \
82         $(SRC_USE_charset) \
83         $(SRC_mc_widgets) \
84         $(SRC_mc_conssaver) \
85         $(SRC_mc_options) \
86         $(SRC_mc_keybind) \
87         $(SRC_mc_extended_charset) \
88         achown.c achown.h \
89         args.c args.h \
90         background.c background.h \
91         boxes.c boxes.h \
92         chmod.c chmod.h \
93         chown.c chown.h \
94         cmd.c cmd.h \
95         command.c command.h \
96         complete.c \
97         dir.c dir.h \
98         execute.c execute.h \
99         ext.c ext.h \
100         file.c file.h \
101         filegui.c filegui.h \
102         filenot.c \
103         fileopctx.c fileopctx.h \
104         find.c find.h \
105         help.c help.h \
106         history.h \
107         hotlist.c hotlist.h \
108         info.c info.h \
109         layout.c layout.h \
110         listmode.c listmode.h \
111         main.c main.h \
112         main-widgets.h \
113         mountlist.c mountlist.h \
114         panelize.c panelize.h \
115         subshell.c subshell.h \
116         textconf.c textconf.h \
117         treestore.c treestore.h \
118         user.c user.h
120 EXTRA_DIST = man2hlp.c $(SRC_maintainer) $(SRC_charset)
122 # automated testing
124 TESTS =                 ecs-test
126 check_PROGRAMS =        ecs-test
127 ecs_test_SOURCES =      ecs-test.c ecs.h ecs.c
128 ecs_test_LDADD =        $(GLIB_LIBS) $(INTLLIBS) $(MCLIBS)
130 # end of automated testing
132 install-exec-hook:
133         $(MAKE) install_mcview
134 if USE_EDIT
135         $(MAKE) install_mcedit
136 endif
139 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
141 install_mcview:
142         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
144 install_mcedit:
145         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
147 uninstall-hook:
148         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
149 if USE_EDIT
150         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
151 endif