10 browser.o buffer.o cmdline.o cmus.o command_mode.o comment.o \
11 db.o debug.o editable.o expr.o filters.o \
12 format_print.o glob.o history.o http.o input.o \
13 keys.o lib.o load_dir.o locking.o mergesort.o misc.o options.o \
14 output.o pcm.o pl.o play_queue.o player.o \
15 read_wrapper.o server.o search.o \
16 search_mode.o spawn.o tabexp.o tabexp_file.o \
17 track.o track_db.o track_info.o tree.o uchar.o ui_curses.o window.o \
20 $(cmus-y
): CFLAGS
+= $(PTHREAD_CFLAGS
) $(NCURSES_CFLAGS
) $(ICONV_CFLAGS
)
22 cmus
: $(cmus-y
) file.o path.o prog.o xmalloc.o
23 $(call cmd
,ld,$(PTHREAD_LIBS
) $(NCURSES_LIBS
) $(ICONV_LIBS
) $(DL_LIBS
) -lm
)
25 cmus-remote
: main.o file.o path.o prog.o xmalloc.o
31 mad-objs
:= id3.lo mad.lo nomad.lo utf8_encode.lo
32 modplug-objs
:= modplug.lo
34 vorbis-objs
:= vorbis.lo
37 ip-
$(CONFIG_FLAC
) += flac.so
38 ip-
$(CONFIG_MAD
) += mad.so
39 ip-
$(CONFIG_MODPLUG
) += modplug.so
40 ip-
$(CONFIG_MPC
) += mpc.so
41 ip-
$(CONFIG_VORBIS
) += vorbis.so
42 ip-
$(CONFIG_WAV
) += wav.so
44 $(flac-objs
): CFLAGS
+= $(FLAC_CFLAGS
)
45 $(mad-objs
): CFLAGS
+= $(MAD_CFLAGS
)
46 $(modplug-objs
): CFLAGS
+= $(MODPLUG_CFLAGS
)
47 $(mpc-objs
): CFLAGS
+= $(MPC_CFLAGS
)
48 $(vorbis-objs
): CFLAGS
+= $(VORBIS_CFLAGS
)
51 $(call cmd
,ld_so
,$(FLAC_LIBS
))
54 $(call cmd
,ld_so
,$(MAD_LIBS
))
56 modplug.so
: $(modplug-objs
)
57 $(call cmd
,ld_so
,$(MODPLUG_LIBS
))
60 $(call cmd
,ld_so
,$(MPC_LIBS
))
62 vorbis.so
: $(vorbis-objs
)
63 $(call cmd
,ld_so
,$(VORBIS_LIBS
))
70 alsa-objs
:= alsa.lo mixer_alsa.lo
72 oss-objs
:= oss.lo mixer_oss.lo
73 sun-objs
:= sun.lo mixer_sun.lo
76 op-
$(CONFIG_ALSA
) += alsa.so
77 op-
$(CONFIG_ARTS
) += arts.so
78 op-
$(CONFIG_OSS
) += oss.so
79 op-
$(CONFIG_SUN
) += sun.so
80 op-
$(CONFIG_AO
) += ao.so
82 $(alsa-objs
): CFLAGS
+= $(ALSA_CFLAGS
)
83 $(arts-objs
): CFLAGS
+= $(ARTS_CFLAGS
)
84 $(oss-objs
): CFLAGS
+= $(OSS_CFLAGS
)
85 $(sun-objs
): CFLAGS
+= $(SUN_CFLAGS
)
86 $(ao-objs
): CFLAGS
+= $(AO_CFLAGS
)
89 $(call cmd
,ld_so
,$(ALSA_LIBS
))
92 $(call cmd
,ld_so
,$(ARTS_LIBS
))
95 $(call cmd
,ld_so
,$(OSS_LIBS
))
98 $(call cmd
,ld_so
,$(SUN_LIBS
))
101 $(call cmd
,ld_so
,$(AO_LIBS
))
104 data
= $(wildcard data
/*)
106 clean += *.o
*.lo
*.so cmus cmus-remote
*.html
107 distclean += config.mk config
/*.h
tags
109 main
: cmus cmus-remote
110 plugins
: $(ip-y
) $(op-y
)
113 $(INSTALL
) -m755
$(bindir) cmus cmus-remote
114 $(INSTALL
) -m644
$(datadir)/cmus
$(data
)
115 $(INSTALL
) -m755
$(datadir)/doc
/cmus
/examples cmus-status-display
117 install-plugins
: plugins
118 $(INSTALL
) -m755
$(libdir)/cmus
/ip
$(ip-y
)
119 $(INSTALL
) -m755
$(libdir)/cmus
/op
$(op-y
)
121 install: main plugins install-main install-plugins install-man
124 exuberant-ctags
*.
[ch
]
129 install-doc
: install-man install-html
130 install-man
: Doc
/install-man
131 install-html
: Doc
/install-html
137 quiet_cmd_submake
= Making
$(word 2,$(subst /, ,$@
)) in
$(word 1,$(subst /, ,$@
))
138 cmd_submake
= $(MAKE
) -C
$(subst /, ,$@
)
140 MAKEFLAGS
+= --no-print-directory
142 # generating tarball using GIT {{{
145 # version from an annotated tag
146 _ver0
= $(shell git-describe
$(REV
) 2>/dev
/null
)
147 # version from a plain tag
148 _ver1
= $(shell git-describe
--tags $(REV
) 2>/dev
/null
)
150 _ver2
= $(shell git-rev-parse
--verify
$(REV
) 2>/dev
/null
)
152 TARNAME
= cmus-
$(if
$(_ver0
),$(_ver0
),$(if
$(_ver1
),$(_ver1
),$(_ver2
)))
154 dist: $(if
$(filter HEAD
,$(REV
)),doc
,)
155 @tarname
=$(TARNAME
); \
157 test "$$sha1" ||
{ echo
"No such revision $(REV)"; exit
1; }; \
158 echo
" DIST $$tarname.tar.bz2"; \
159 git-tar-tree
$$sha1 $$tarname > $$tarname.
tar; \
160 if
test "$(REV)" = HEAD
; then \
162 tar rf
$$tarname.
tar $$tarname/Doc
/{cmus
,cmus-remote
}.
{1,html
}; \
165 bzip2
-9 $$tarname.
tar
169 .PHONY
: all main plugins doc man html
dist tags
170 .PHONY
: install install-main install-plugins install-doc install-man install-html