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