4585768de1f099365f13af8321aeb7e872e63f01
1 CLEANFILES = ncmpc-tiny
3 AM_CPPFLAGS = \
4 $(GLIB_CFLAGS)\
5 $(GTHREAD_CFLAGS)\
6 $(LIBLIRCCLIENT_CFLAGS) \
7 -DLOCALE_DIR=\""$(datadir)/locale"\"\
8 -DSYSCONFDIR=\""$(sysconfdir)"\"
10 ncmpc_LDADD = \
11 $(GLIB_LIBS)\
12 $(GTHREAD_LIBS) \
13 $(LIBLIRCCLIENT_LIBS)
15 ncmpc_headers = \
16 libmpdclient.h\
17 resolver.h \
18 song.h \
19 mpdclient.h\
20 playlist.h \
21 filelist.h \
22 options.h\
23 conf.h\
24 command.h\
25 ncu.h \
26 screen.h\
27 screen_list.h \
28 screen_play.h \
29 screen_utils.h\
30 list_window.h\
31 colors.h\
32 support.h\
33 charset.h \
34 wreadln.h\
35 strfsong.h\
36 utils.h\
37 ncmpc.h\
38 defaults.h \
39 i18n.h \
40 screen_browser.h \
41 lyrics.h \
42 str_pool.h \
43 lirc.h
45 bin_PROGRAMS = ncmpc
47 lyr_src=${lyr_src_fixed}
49 ncmpc_SOURCES = \
50 libmpdclient.c\
51 resolver.c \
52 song.c \
53 main.c\
54 mpdclient.c\
55 playlist.c \
56 filelist.c \
57 options.c\
58 command.c\
59 ncu.c \
60 screen.c\
61 screen_list.c \
62 screen_utils.c\
63 screen_play.c\
64 screen_browser.c\
65 screen_file.c\
66 list_window.c\
67 colors.c\
68 support.c\
69 charset.c \
70 wreadln.c\
71 strfsong.c\
72 utils.c\
73 str_pool.c
75 if NCMPC_MINI
76 else
77 ncmpc_SOURCES += conf.c
78 endif
80 if ENABLE_HELP_SCREEN
81 ncmpc_SOURCES += screen_help.c
82 endif
84 if ENABLE_ARTIST_SCREEN
85 ncmpc_SOURCES += screen_artist.c
86 endif
88 if ENABLE_SEARCH_SCREEN
89 ncmpc_SOURCES += screen_search.c
90 endif
92 if ENABLE_SONG_SCREEN
93 ncmpc_SOURCES += screen_song.c
94 endif
96 if ENABLE_KEYDEF_SCREEN
97 ncmpc_SOURCES += screen_keydef.c
98 endif
100 if ENABLE_LYRICS_SCREEN
101 ncmpc_SOURCES += screen_lyrics.c lyrics.c
102 endif
104 if ENABLE_LIRC
105 ncmpc_SOURCES += lirc.c
106 endif
108 ncmpc_SOURCES+=${ncmpc_headers}
110 # build the smalles possible ncmpc binary
111 ncmpc-tiny: $(filter-out %.h,$(ncmpc_SOURCES))
112 $(COMPILE) --combine -fwhole-program $(ncmpc_LDFLAGS) $(ncmpc_LDADD) $(LIBS) $^ -o $@
113 strip --strip-all $@
115 #
116 # sparse
117 #
119 SPARSE = sparse
120 SPARSE_FLAGS = -Wdecl -Wdefault-bitfield-sign -Wdo-while -Wenum-mismatch \
121 -Wnon-pointer-null -Wptr-subtraction-blows -Wreturn-void \
122 -Wshadow -Wtypesign \
123 -D__transparent_union__=unused
125 sparse-check:
126 for i in $(ncmpc_SOURCES); \
127 do \
128 $(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; \
129 done