summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 543a545)
raw | patch | inline | side by side (parent: 543a545)
author | Max Kellermann <max@duempel.org> | |
Wed, 10 Jun 2009 22:05:00 +0000 (00:05 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 10 Jun 2009 22:05:00 +0000 (00:05 +0200) |
Makefile.am | patch | blob | history | |
configure.ac | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index cb3149ff7bf15385a46fc9c4f1aab474b5d0ae9a..b1b50dc158b8b5dd63dcd615ba0969fa798025ba 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
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
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 fa266dad9df807704dead16760428b3782ec1fc7..c2241d77f953c10e7e60d4d33af01a674a116016 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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