src/diffviewer/ydiff.c: code indentation & cleanup.
[midnight-commander.git] / src / Makefile.am
blob6d87a3952d40b8a14e3079a31c26ba65b39f38e8
1 SUBDIRS = viewer
3 if USE_EDIT
4 SUBDIRS += editor
5 endif
7 if USE_DIFF
8 SUBDIRS += diffviewer
9 endif
11 AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" \
12         -DLOCALEDIR=\""$(localedir)"\" \
13         -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
16 if CONS_SAVER
17 SUBDIRS += consaver
18 AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
19 endif
21 AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
23 localedir = $(datadir)/locale
24 pkglibexecdir =         $(libexecdir)/@PACKAGE@
26 bin_PROGRAMS = mc mcmfmt
28 noinst_PROGRAMS = man2hlp
30 mcmfmt_SOURCES = mfmt.c
32 man2hlp_SOURCES = man2hlp.c
34 man2hlp_LDADD = \
35     ../lib/libmc.la \
36     $(GLIB_LIBS) $(PCRE_LIBS)
38 if USE_EDIT
39 EDITLIB = editor/libedit.la
40 endif
42 if USE_DIFF
43 DIFFLIB = diffviewer/libdiffviewer.la
44 endif
46 SRC_charset = charsets.c charsets.h selcodepage.c selcodepage.h
48 if CHARSET
49     SRC_USE_charset=$(SRC_charset)
50 endif
53 mc_LDADD = \
54         ../lib/libmc.la \
55         viewer/libmcviewer.la \
56         $(EDITLIB) \
57         $(DIFFLIB) \
58         $(INTLLIBS) $(MCLIBS) $(SLANGLIB) $(LIBICONV) \
59         $(GLIB_LIBS) $(PCRE_LIBS)
61 if USE_SAMBA_FS
62 # this is a hack for linking with own samba library in simple way
63 mc_LDADD += ../lib/vfs/mc-vfs/samba/libsamba.a
64 endif
67 SRC_mc_widgets = \
68         dialog.c dialog.h \
69         menu.c menu.h \
70         screen.c panel.h \
71         tree.c tree.h \
72         widget.c widget.h \
73         wtools.c wtools.h
75 SRC_mc_conssaver = \
76         cons.handler.c consaver/cons.saver.h
78 SRC_mc_options = \
79         learn.c learn.h \
80         option.c option.h \
81         setup.c setup.h
83 SRC_mc_keybind = \
84         keybind.c keybind.h \
85         cmddef.h
87 SRC_mc_extended_charset = \
88         ecs.c ecs.h
90 mc_SOURCES = \
91         $(SRC_USE_charset) \
92         $(SRC_mc_widgets) \
93         $(SRC_mc_conssaver) \
94         $(SRC_mc_options) \
95         $(SRC_mc_keybind) \
96         $(SRC_mc_extended_charset) \
97         achown.c achown.h \
98         args.c args.h \
99         background.c background.h \
100         boxes.c boxes.h \
101         chmod.c chmod.h \
102         chown.c chown.h \
103         cmd.c cmd.h \
104         command.c command.h \
105         complete.c \
106         dir.c dir.h \
107         execute.c execute.h \
108         ext.c ext.h \
109         file.c file.h \
110         filegui.c filegui.h \
111         filenot.c \
112         fileopctx.c fileopctx.h \
113         find.c find.h \
114         help.c help.h \
115         history.h \
116         hotlist.c hotlist.h \
117         info.c info.h \
118         layout.c layout.h \
119         listmode.c listmode.h \
120         main.c main.h \
121         main-widgets.h \
122         mountlist.c mountlist.h \
123         panelize.c panelize.h \
124         subshell.c subshell.h \
125         textconf.c textconf.h \
126         treestore.c treestore.h \
127         user.c user.h
129 EXTRA_DIST = man2hlp.c $(SRC_maintainer) $(SRC_charset)
131 # automated testing
133 TESTS =                 ecs-test
135 check_PROGRAMS =        ecs-test
136 ecs_test_SOURCES =      ecs-test.c ecs.h ecs.c
137 ecs_test_LDADD =        $(GLIB_LIBS) $(INTLLIBS) $(MCLIBS)
139 # end of automated testing
141 install-exec-hook:
142         $(MAKE) install_mcview
143 if USE_EDIT
144         $(MAKE) install_mcedit
145 endif
148 # Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'.
150 install_mcview:
151         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview
153 install_mcedit:
154         cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit
156 uninstall-hook:
157         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview
158 if USE_EDIT
159         rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit
160 endif