README.rst: reformat the "Links" section
[ncmpc-debian.git] / Makefile.am
1 SUBDIRS = \
2   po
3
4 ACLOCAL_AMFLAGS = -I m4
5 AUTOMAKE_OPTIONS = foreign 1.11 dist-xz subdir-objects
6
7 AM_CPPFLAGS = \
8         $(CURSES_CFLAGS) \
9         $(LIBMPDCLIENT_CFLAGS) \
10         $(GLIB_CFLAGS) \
11         $(LIBLIRCCLIENT_CFLAGS) \
12         -DLOCALE_DIR=\""$(datadir)/locale"\"\
13         -DSYSCONFDIR=\""$(sysconfdir)"\"
14
15 bin_PROGRAMS = src/ncmpc
16
17 src_ncmpc_LDADD = \
18         $(CURSES_LIBS) \
19         $(LIBMPDCLIENT_LIBS) \
20         $(GLIB_LIBS) \
21         $(LIBLIRCCLIENT_LIBS)
22
23 src_ncmpc_SOURCES = \
24         src/Compiler.h \
25         src/ncmpc.h \
26         src/defaults.h \
27         src/ncmpc_curses.h \
28         src/i18n.h \
29         src/main.c \
30         src/gidle.c src/gidle.h \
31         src/mpdclient.c src/mpdclient.h \
32         src/callbacks.c src/callbacks.h \
33         src/playlist.c src/playlist.h \
34         src/filelist.c src/filelist.h \
35         src/options.c src/options.h \
36         src/command.c src/command.h \
37         src/keyboard.c src/keyboard.h \
38         src/ncfix.h \
39         src/ncu.c src/ncu.h \
40         src/player_command.c src/player_command.h \
41         src/title_bar.c src/title_bar.h \
42         src/progress_bar.c src/progress_bar.h \
43         src/status_bar.c src/status_bar.h \
44         src/screen.c src/screen.h \
45         src/screen_interface.h \
46         src/screen_init.c \
47         src/screen_paint.c \
48         src/screen_utils.c src/screen_utils.h \
49         src/screen_status.c src/screen_status.h \
50         src/screen_list.c src/screen_list.h \
51         src/screen_find.c src/screen_find.h \
52         src/screen_client.c src/screen_client.h \
53         src/screen_queue.c src/screen_queue.h \
54         src/screen_browser.c src/screen_browser.h \
55         src/screen_file.c src/screen_file.h \
56         src/list_window.c src/list_window.h \
57         src/save_playlist.c src/save_playlist.h \
58         src/paint.h \
59         src/song_paint.c src/song_paint.h \
60         src/colors.c src/colors.h \
61         src/charset.c src/charset.h \
62         src/window.h \
63         src/wreadln.c src/wreadln.h \
64         src/strfsong.c src/strfsong.h \
65         src/time_format.c src/time_format.h \
66         src/utils.c src/utils.h
67
68 if ENABLE_ASYNC_CONNECT
69 src_ncmpc_SOURCES += \
70         src/net/types.h \
71         src/net/socket.c src/net/socket.h \
72         src/net/resolver.c src/net/resolver.h \
73         src/net/async_connect.c src/net/async_connect.h \
74         src/net/async_rconnect.c src/net/async_rconnect.h \
75         src/aconnect.c src/aconnect.h
76 endif
77
78 #
79 # Windows resource file
80 #
81
82 src/win/ncmpc_win32_rc.$(OBJEXT): src/win/ncmpc_win32_rc.rc
83         $(WINDRES) -i $< -o $@
84
85 if HAVE_WINDOWS
86 noinst_DATA = src/win/ncmpc_win32_rc.rc
87
88 src_ncmpc_DEPENDENCIES = src/win/ncmpc_win32_rc.$(OBJEXT)
89 src_ncmpc_LDFLAGS = -Wl,src/win/ncmpc_win32_rc.$(OBJEXT)
90 else
91 src_ncmpc_SOURCES += src/signals.c src/signals.h
92 endif
93
94 if NCMPC_MINI
95 else
96 src_ncmpc_SOURCES += \
97         src/db_completion.c src/db_completion.h \
98         src/xterm_title.c src/xterm_title.h \
99         src/hscroll.c src/hscroll.h \
100         src/match.c src/match.h \
101         src/conf.c src/conf.h
102 endif
103
104 if ENABLE_HELP_SCREEN
105 src_ncmpc_SOURCES += src/screen_help.c src/screen_help.h
106 endif
107
108 if ENABLE_ARTIST_SCREEN
109 src_ncmpc_SOURCES += src/screen_artist.c src/screen_artist.h
110 endif
111
112 if ENABLE_SEARCH_SCREEN
113 src_ncmpc_SOURCES += src/screen_search.c src/screen_search.h
114 endif
115
116 if ENABLE_SONG_SCREEN
117 src_ncmpc_SOURCES += src/screen_song.c src/screen_song.h
118 endif
119
120 if ENABLE_KEYDEF_SCREEN
121 src_ncmpc_SOURCES += src/screen_keydef.c src/screen_keydef.h
122 endif
123
124 if ENABLE_PLUGIN_LIBRARY
125 src_ncmpc_SOURCES += src/plugin.c src/plugin.h
126 endif
127
128 if ENABLE_SCREEN_TEXT
129 src_ncmpc_SOURCES += src/screen_text.c src/screen_text.h
130 endif
131
132 if ENABLE_LYRICS_SCREEN
133 src_ncmpc_SOURCES += \
134         src/screen_lyrics.c src/screen_lyrics.h \
135         src/lyrics.c src/lyrics.h
136 endif
137
138 if ENABLE_OUTPUTS_SCREEN
139 src_ncmpc_SOURCES += src/screen_outputs.c src/screen_outputs.h
140 endif
141
142 if ENABLE_CHAT_SCREEN
143 src_ncmpc_SOURCES += src/screen_chat.c src/screen_chat.h
144 endif
145
146 if ENABLE_LIRC
147 src_ncmpc_SOURCES += src/lirc.c src/lirc.h
148 endif
149
150
151 # build the smallest possible ncmpc binary
152 src/ncmpc-tiny: $(filter-out %.h,$(src_ncmpc_SOURCES))
153         $(COMPILE) --combine -fwhole-program $(src_ncmpc_LDFLAGS) $(src_ncmpc_LDADD) $(LIBS) $^ -o $@
154         strip --strip-all $@
155
156 CLEANFILES = src/ncmpc-tiny
157
158 #
159 # test suite
160 #
161
162 check_PROGRAMS = \
163         test/run_hscroll
164
165 test_run_hscroll_SOURCES = test/run_hscroll.c src/hscroll.c src/charset.c
166 test_run_hscroll_CPPFLAGS = -I$(srcdir)/src $(AM_CPPFLAGS)
167 test_run_hscroll_LDADD = $(CURSES_LIBS) $(GLIB_LIBS)
168
169 #
170 # sparse
171 #
172
173 SPARSE = sparse
174 SPARSE_FLAGS = -Wdecl -Wdefault-bitfield-sign -Wdo-while -Wenum-mismatch \
175         -Wnon-pointer-null -Wptr-subtraction-blows -Wreturn-void \
176         -Wshadow -Wtypesign \
177         -D__transparent_union__=unused
178
179 sparse-check:
180         $(SPARSE) -I. -I/usr/lib/gcc/$(shell gcc -dumpmachine)/4.3/include -I/usr/lib/gcc/$(shell gcc -dumpmachine)/4.3/include-fixed $(AM_CPPFLAGS) $(SPARSE_FLAGS) $(src_ncmpc_SOURCES)
181
182 #
183 # lyrics plugins
184 #
185
186 lyrics_plugins = lyrics/10-hd.sh lyrics/20-lyricwiki.rb
187
188 if ENABLE_LYRICS_SCREEN
189
190 lyricsdir = $(lyrics_plugin_dir)
191 lyrics_SCRIPTS = $(lyrics_plugins)
192
193 endif
194
195 #
196 # Documentation
197 #
198
199 doc_DATA = \
200         doc/config.sample doc/keys.sample doc/ncmpc.lirc \
201         AUTHORS NEWS README.rst
202 man_MANS = doc/ncmpc.1
203
204 if ENABLE_DOCUMENTATION
205 doc/api/html/index.html: doc/doxygen.conf
206         @mkdir -p $(@D)
207         $(DOXYGEN) $<
208
209 all-local: doc/api/html/index.html
210
211 clean-local:
212         rm -rf doc/api
213
214 # copied from MPD, disabled  --jn
215 #---------------------------------------
216 #install-data-local: doc/api/html/index.html
217 #       $(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
218 #       $(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
219 #               $(DESTDIR)$(docdir)/api/html
220 #
221 #uninstall-local:
222 #       rm -f $(DESTDIR)$(docdir)/api/html/*.*
223 #---------------------------------------
224 endif
225
226 #
227 # Distribution
228 #
229
230 EXTRA_DIST = autogen.sh \
231         $(lyrics_plugins) \
232         $(man_MANS) $(doc_DATA) doc/doxygen.conf \
233         src/win/ncmpc_win32_rc.rc.in