02c7dc8e898d8b72917d570bff254575e8ce2ff1
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 hscroll.h \
33 charset.h \
34 match.h \
35 wreadln.h\
36 strfsong.h\
37 utils.h\
38 ncmpc.h\
39 defaults.h \
40 i18n.h \
41 screen_browser.h \
42 lyrics.h \
43 str_pool.h \
44 lirc.h
46 bin_PROGRAMS = ncmpc
48 lyr_src=${lyr_src_fixed}
50 ncmpc_SOURCES = \
51 libmpdclient.c\
52 resolver.c \
53 song.c \
54 main.c\
55 mpdclient.c\
56 playlist.c \
57 filelist.c \
58 options.c\
59 command.c\
60 ncu.c \
61 screen.c\
62 screen_list.c \
63 screen_utils.c\
64 screen_play.c\
65 screen_browser.c\
66 screen_file.c\
67 list_window.c\
68 colors.c\
69 hscroll.c \
70 charset.c \
71 match.c \
72 wreadln.c\
73 strfsong.c\
74 utils.c\
75 str_pool.c
77 if NCMPC_MINI
78 else
79 ncmpc_SOURCES += conf.c
80 endif
82 if ENABLE_HELP_SCREEN
83 ncmpc_SOURCES += screen_help.c
84 endif
86 if ENABLE_ARTIST_SCREEN
87 ncmpc_SOURCES += screen_artist.c
88 endif
90 if ENABLE_SEARCH_SCREEN
91 ncmpc_SOURCES += screen_search.c
92 endif
94 if ENABLE_SONG_SCREEN
95 ncmpc_SOURCES += screen_song.c
96 endif
98 if ENABLE_KEYDEF_SCREEN
99 ncmpc_SOURCES += screen_keydef.c
100 endif
102 if ENABLE_LYRICS_SCREEN
103 ncmpc_SOURCES += screen_lyrics.c lyrics.c
104 endif
106 if ENABLE_OUTPUTS_SCREEN
107 ncmpc_SOURCES += screen_outputs.c
108 endif
110 if ENABLE_LIRC
111 ncmpc_SOURCES += lirc.c
112 endif
114 ncmpc_SOURCES+=${ncmpc_headers}
116 # build the smalles possible ncmpc binary
117 ncmpc-tiny: $(filter-out %.h,$(ncmpc_SOURCES))
118 $(COMPILE) --combine -fwhole-program $(ncmpc_LDFLAGS) $(ncmpc_LDADD) $(LIBS) $^ -o $@
119 strip --strip-all $@
121 #
122 # sparse
123 #
125 SPARSE = sparse
126 SPARSE_FLAGS = -Wdecl -Wdefault-bitfield-sign -Wdo-while -Wenum-mismatch \
127 -Wnon-pointer-null -Wptr-subtraction-blows -Wreturn-void \
128 -Wshadow -Wtypesign \
129 -D__transparent_union__=unused
131 sparse-check:
132 for i in $(ncmpc_SOURCES); \
133 do \
134 $(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; \
135 done