From: Max Kellermann Date: Wed, 10 Jun 2009 22:05:00 +0000 (+0200) Subject: Makefile.am: no recursive Makefile X-Git-Tag: release-0.15~66 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=77ee5ee731e4cf52f0fd7f1af93730ea2a23684a;p=ncmpc.git Makefile.am: no recursive Makefile --- diff --git a/Makefile.am b/Makefile.am index cb3149f..b1b50dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,24 +1,151 @@ SUBDIRS = \ - src\ - doc\ po ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign 1.9 dist-bzip2 -doc_DATA = \ - AUTHORS\ - README\ - NEWS +AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + $(LIBLIRCCLIENT_CFLAGS) \ + -DLOCALE_DIR=\""$(datadir)/locale"\"\ + -DSYSCONFDIR=\""$(sysconfdir)"\" + +ncmpc_headers = \ + src/libmpdclient.h \ + src/resolver.h \ + src/song.h \ + src/mpdclient.h \ + src/playlist.h \ + src/filelist.h \ + src/options.h \ + src/conf.h \ + src/command.h \ + src/ncu.h \ + src/screen.h \ + src/screen_list.h \ + src/screen_play.h \ + src/screen_utils.h \ + src/list_window.h \ + src/colors.h \ + src/hscroll.h \ + src/charset.h \ + src/match.h \ + src/wreadln.h \ + src/strfsong.h \ + src/utils.h \ + src/ncmpc.h \ + src/defaults.h \ + src/i18n.h \ + src/screen_browser.h \ + src/screen_text.h \ + src/plugin.h \ + src/lyrics.h \ + src/str_pool.h \ + src/lirc.h + +bin_PROGRAMS = src/ncmpc + +src_ncmpc_LDADD = \ + $(GLIB_LIBS) \ + $(LIBLIRCCLIENT_LIBS) + +src_ncmpc_SOURCES = \ + $(ncmpc_headers) \ + src/libmpdclient.c \ + src/resolver.c \ + src/song.c \ + src/main.c \ + src/mpdclient.c \ + src/playlist.c \ + src/filelist.c \ + src/options.c \ + src/command.c \ + src/ncu.c \ + src/screen.c \ + src/screen_list.c \ + src/screen_utils.c \ + src/screen_play.c \ + src/screen_browser.c \ + src/screen_file.c \ + src/list_window.c \ + src/colors.c \ + src/charset.c \ + src/wreadln.c \ + src/strfsong.c \ + src/utils.c \ + src/str_pool.c + +if NCMPC_MINI +else +src_ncmpc_SOURCES += \ + src/hscroll.c \ + src/match.c \ + src/conf.c +endif + +if ENABLE_HELP_SCREEN +src_ncmpc_SOURCES += src/screen_help.c +endif + +if ENABLE_ARTIST_SCREEN +src_ncmpc_SOURCES += src/screen_artist.c +endif + +if ENABLE_SEARCH_SCREEN +src_ncmpc_SOURCES += src/screen_search.c +endif + +if ENABLE_SONG_SCREEN +src_ncmpc_SOURCES += src/screen_song.c +endif + +if ENABLE_KEYDEF_SCREEN +src_ncmpc_SOURCES += src/screen_keydef.c +endif + +if ENABLE_PLUGIN_LIBRARY +src_ncmpc_SOURCES += src/plugin.c +endif + +if ENABLE_SCREEN_TEXT +src_ncmpc_SOURCES += src/screen_text.c +endif + +if ENABLE_LYRICS_SCREEN +src_ncmpc_SOURCES += src/screen_lyrics.c src/lyrics.c +endif + +if ENABLE_OUTPUTS_SCREEN +src_ncmpc_SOURCES += src/screen_outputs.c +endif + +if ENABLE_LIRC +src_ncmpc_SOURCES += src/lirc.c +endif -EXTRA_DIST = autogen.sh $(addprefix lyrics/,$(lyrics_plugins)) # build the smalles possible ncmpc binary -ncmpc-tiny: - $(MAKE) -C src $@ +src/ncmpc-tiny: $(filter-out %.h,$(src_ncmpc_SOURCES)) + $(COMPILE) --combine -fwhole-program $(src_ncmpc_LDFLAGS) $(src_ncmpc_LDADD) $(LIBS) $^ -o $@ + strip --strip-all $@ + +CLEANFILES = src/ncmpc-tiny + +# +# sparse +# + +SPARSE = sparse +SPARSE_FLAGS = -Wdecl -Wdefault-bitfield-sign -Wdo-while -Wenum-mismatch \ + -Wnon-pointer-null -Wptr-subtraction-blows -Wreturn-void \ + -Wshadow -Wtypesign \ + -D__transparent_union__=unused sparse-check: - $(MAKE) -C src $@ + for i in $(src_ncmpc_SOURCES); \ + do \ + $(SPARSE) -I. -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) $(srcdir)/$$i || exit; \ + done # # lyrics plugins @@ -33,3 +160,20 @@ install-exec-local: cd lyrics && install -m 0755 $(lyrics_plugins) $(DESTDIR)$(lyrics_plugin_dir) endif + +# +# Documentation +# + +doc_DATA = \ + doc/config.sample doc/keys.sample doc/ncmpc.lirc \ + AUTHORS NEWS README +man_MANS = doc/ncmpc.1 + +# +# Distribution +# + +EXTRA_DIST = autogen.sh \ + $(addprefix lyrics/,$(lyrics_plugins)) \ + $(man_MANS) $(doc_DATA) diff --git a/configure.ac b/configure.ac index fa266da..c2241d7 100644 --- a/configure.ac +++ b/configure.ac @@ -442,5 +442,5 @@ dnl dnl Generate output files dnl -AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile po/Makefile.in po/Makefile]) +AC_CONFIG_FILES([Makefile po/Makefile.in po/Makefile]) AC_OUTPUT