configure.ac: remove redundant libmpdclient version test
[ncmpc.git] / Makefile.am
blobf808ec63d396febd5d2dda357022171ece06476d
1 SUBDIRS = \
2   po
4 ACLOCAL_AMFLAGS = -I m4
5 AUTOMAKE_OPTIONS = foreign 1.11 dist-xz subdir-objects
7 AM_CPPFLAGS = \
8         $(LIBMPDCLIENT_CFLAGS) \
9         $(GLIB_CFLAGS) \
10         $(LIBLIRCCLIENT_CFLAGS) \
11         -DLOCALE_DIR=\""$(datadir)/locale"\"\
12         -DSYSCONFDIR=\""$(sysconfdir)"\"
14 bin_PROGRAMS = src/ncmpc
16 src_ncmpc_LDADD = \
17         $(CURSES_LIB) \
18         $(LIBMPDCLIENT_LIBS) \
19         $(GLIB_LIBS) \
20         $(LIBLIRCCLIENT_LIBS)
22 src_ncmpc_SOURCES = \
23         src/Compiler.h \
24         src/ncmpc.h \
25         src/defaults.h \
26         src/ncmpc_curses.h \
27         src/i18n.h \
28         src/main.c \
29         src/gidle.c src/gidle.h \
30         src/mpdclient.c src/mpdclient.h \
31         src/playlist.c src/playlist.h \
32         src/filelist.c src/filelist.h \
33         src/options.c src/options.h \
34         src/command.c src/command.h \
35         src/ncfix.h \
36         src/ncu.c src/ncu.h \
37         src/player_command.c src/player_command.h \
38         src/title_bar.c src/title_bar.h \
39         src/progress_bar.c src/progress_bar.h \
40         src/status_bar.c src/status_bar.h \
41         src/screen.c src/screen.h \
42         src/screen_interface.h \
43         src/screen_utils.c src/screen_utils.h \
44         src/screen_status.c src/screen_status.h \
45         src/screen_list.c src/screen_list.h \
46         src/screen_find.c src/screen_find.h \
47         src/screen_client.c src/screen_client.h \
48         src/screen_queue.c src/screen_queue.h \
49         src/screen_browser.c src/screen_browser.h \
50         src/screen_file.c src/screen_file.h \
51         src/list_window.c src/list_window.h \
52         src/paint.h \
53         src/song_paint.c src/song_paint.h \
54         src/colors.c src/colors.h \
55         src/charset.c src/charset.h \
56         src/window.h \
57         src/wreadln.c src/wreadln.h \
58         src/strfsong.c src/strfsong.h \
59         src/utils.c src/utils.h
62 # Windows resource file
65 src/win/ncmpc_win32_rc.$(OBJEXT): src/win/ncmpc_win32_rc.rc
66         $(WINDRES) -i $< -o $@
68 if HAVE_WINDOWS
69 noinst_DATA = src/win/ncmpc_win32_rc.rc
71 src_ncmpc_DEPENDENCIES = src/win/ncmpc_win32_rc.$(OBJEXT)
72 src_ncmpc_LDFLAGS = -Wl,src/win/ncmpc_win32_rc.$(OBJEXT)
73 endif
75 if NCMPC_MINI
76 else
77 src_ncmpc_SOURCES += \
78         src/hscroll.c src/hscroll.h \
79         src/match.c src/match.h \
80         src/conf.c src/conf.h
81 endif
83 if ENABLE_HELP_SCREEN
84 src_ncmpc_SOURCES += src/screen_help.c src/screen_help.h
85 endif
87 if ENABLE_ARTIST_SCREEN
88 src_ncmpc_SOURCES += src/screen_artist.c src/screen_artist.h
89 endif
91 if ENABLE_SEARCH_SCREEN
92 src_ncmpc_SOURCES += src/screen_search.c src/screen_search.h
93 endif
95 if ENABLE_SONG_SCREEN
96 src_ncmpc_SOURCES += src/screen_song.c src/screen_song.h
97 endif
99 if ENABLE_KEYDEF_SCREEN
100 src_ncmpc_SOURCES += src/screen_keydef.c src/screen_keydef.h
101 endif
103 if ENABLE_PLUGIN_LIBRARY
104 src_ncmpc_SOURCES += src/plugin.c src/plugin.h
105 endif
107 if ENABLE_SCREEN_TEXT
108 src_ncmpc_SOURCES += src/screen_text.c src/screen_text.h
109 endif
111 if ENABLE_LYRICS_SCREEN
112 src_ncmpc_SOURCES += \
113         src/screen_lyrics.c src/screen_lyrics.h \
114         src/lyrics.c src/lyrics.h
115 endif
117 if ENABLE_OUTPUTS_SCREEN
118 src_ncmpc_SOURCES += src/screen_outputs.c src/screen_outputs.h
119 endif
121 if ENABLE_CHAT_SCREEN
122 src_ncmpc_SOURCES += src/screen_chat.c src/screen_chat.h
123 endif
125 if ENABLE_LIRC
126 src_ncmpc_SOURCES += src/lirc.c src/lirc.h
127 endif
130 # build the smallest possible ncmpc binary
131 src/ncmpc-tiny: $(filter-out %.h,$(src_ncmpc_SOURCES))
132         $(COMPILE) --combine -fwhole-program $(src_ncmpc_LDFLAGS) $(src_ncmpc_LDADD) $(LIBS) $^ -o $@
133         strip --strip-all $@
135 CLEANFILES = src/ncmpc-tiny
138 # test suite
141 check_PROGRAMS = \
142         test/run_hscroll
144 test_run_hscroll_SOURCES = test/run_hscroll.c src/hscroll.c src/charset.c
145 test_run_hscroll_CPPFLAGS = -I$(srcdir)/src $(AM_CPPFLAGS)
146 test_run_hscroll_LDADD = @CURSES_LIB@ $(GLIB_LIBS)
149 # sparse
152 SPARSE = sparse
153 SPARSE_FLAGS = -Wdecl -Wdefault-bitfield-sign -Wdo-while -Wenum-mismatch \
154         -Wnon-pointer-null -Wptr-subtraction-blows -Wreturn-void \
155         -Wshadow -Wtypesign \
156         -D__transparent_union__=unused
158 sparse-check:
159         $(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)
162 # lyrics plugins
165 lyrics_plugins = lyrics/10-hd.sh lyrics/20-lyricwiki.rb
167 if ENABLE_LYRICS_SCREEN
169 lyricsdir = $(lyrics_plugin_dir)
170 lyrics_SCRIPTS = $(lyrics_plugins)
172 endif
175 # Documentation
178 doc_DATA = \
179         doc/config.sample doc/keys.sample doc/ncmpc.lirc \
180         AUTHORS NEWS README
181 man_MANS = doc/ncmpc.1
183 if ENABLE_DOCUMENTATION
184 doc/api/html/index.html: doc/doxygen.conf
185         @mkdir -p $(@D)
186         $(DOXYGEN) $<
188 all-local: doc/api/html/index.html
190 clean-local:
191         rm -rf doc/api
193 # copied from MPD, disabled  --jn
194 #---------------------------------------
195 #install-data-local: doc/api/html/index.html
196 #       $(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
197 #       $(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
198 #               $(DESTDIR)$(docdir)/api/html
200 #uninstall-local:
201 #       rm -f $(DESTDIR)$(docdir)/api/html/*.*
202 #---------------------------------------
203 endif
206 # Distribution
209 EXTRA_DIST = autogen.sh \
210         $(lyrics_plugins) \
211         $(man_MANS) $(doc_DATA) doc/doxygen.conf \
212         src/win/ncmpc_win32_rc.rc.in