2009-04-01 12:59:32 -04:00
|
|
|
|
2009-06-12 05:09:58 -04:00
|
|
|
sbin_PROGRAMS = forked-daapd
|
2003-10-30 17:42:53 -05:00
|
|
|
|
2009-11-22 05:09:59 -05:00
|
|
|
if COND_ITUNES
|
2017-01-11 12:25:49 -05:00
|
|
|
ITUNES_SRC=library/filescanner_itunes.c
|
2009-11-22 05:09:59 -05:00
|
|
|
endif
|
|
|
|
|
2014-03-11 18:20:29 -04:00
|
|
|
if COND_SPOTIFY
|
2016-12-28 18:39:23 -05:00
|
|
|
SPOTIFY_SRC=spotify.c spotify.h spotify_webapi.c spotify_webapi.h inputs/spotify.c
|
2014-08-15 17:36:54 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
if COND_LASTFM
|
|
|
|
LASTFM_SRC=lastfm.c lastfm.h
|
2014-03-11 18:20:29 -04:00
|
|
|
endif
|
|
|
|
|
2016-01-17 14:59:16 -05:00
|
|
|
if COND_CHROMECAST
|
2016-02-06 07:38:43 -05:00
|
|
|
if COND_PROTOBUF_OLD
|
|
|
|
CHROMECAST_SRC=outputs/cast.c outputs/cast_channel.v0.pb-c.h outputs/cast_channel.v0.pb-c.c
|
|
|
|
else
|
2016-01-23 19:14:07 -05:00
|
|
|
CHROMECAST_SRC=outputs/cast.c outputs/cast_channel.pb-c.h outputs/cast_channel.pb-c.c
|
2016-01-17 14:59:16 -05:00
|
|
|
endif
|
2016-02-06 07:38:43 -05:00
|
|
|
endif
|
2016-01-17 14:59:16 -05:00
|
|
|
|
2014-12-21 14:41:44 -05:00
|
|
|
if COND_MPD
|
|
|
|
MPD_SRC=mpd.c mpd.h
|
|
|
|
endif
|
|
|
|
|
2017-06-19 15:52:01 -04:00
|
|
|
if COND_RAOP_VERIFICATION
|
|
|
|
RAOP_VERIFICATION_SRC=outputs/raop_verification.c outputs/raop_verification.h
|
|
|
|
endif
|
|
|
|
|
2010-04-04 06:46:24 -04:00
|
|
|
if COND_ALSA
|
2016-04-04 10:58:07 -04:00
|
|
|
ALSA_SRC=outputs/alsa.c
|
2010-04-04 06:46:24 -04:00
|
|
|
endif
|
|
|
|
|
2016-07-21 16:13:32 -04:00
|
|
|
if COND_PULSEAUDIO
|
|
|
|
PULSEAUDIO_SRC=outputs/pulse.c
|
|
|
|
endif
|
|
|
|
|
2017-01-14 00:56:43 -05:00
|
|
|
if COND_AVAHI
|
|
|
|
MDNS_SRC=mdns_avahi.c
|
|
|
|
else
|
|
|
|
MDNS_SRC=mdns_dnssd.c
|
|
|
|
endif
|
|
|
|
|
2017-09-15 18:05:50 -04:00
|
|
|
if COND_LIBWEBSOCKETS
|
|
|
|
LIBWEBSOCKETS_SRC=websocket.c websocket.h
|
2017-08-12 14:01:57 -04:00
|
|
|
endif
|
|
|
|
|
2017-03-04 05:10:43 -05:00
|
|
|
if COND_FFMPEG_LEGACY
|
|
|
|
FFMPEG_SRC=transcode_legacy.c artwork_legacy.c ffmpeg-compat.h
|
|
|
|
else
|
|
|
|
FFMPEG_SRC=transcode.c artwork.c
|
|
|
|
endif
|
|
|
|
|
2011-03-31 12:05:41 -04:00
|
|
|
GPERF_FILES = \
|
2011-03-31 12:30:18 -04:00
|
|
|
daap_query.gperf \
|
2011-03-31 12:52:33 -04:00
|
|
|
rsp_query.gperf \
|
2011-04-01 13:01:35 -04:00
|
|
|
dacp_prop.gperf \
|
|
|
|
dmap_fields.gperf
|
2011-03-31 11:33:12 -04:00
|
|
|
|
2016-12-27 18:32:08 -05:00
|
|
|
GPERF_SRC = $(GPERF_FILES:.gperf=_hash.h)
|
2011-03-31 11:33:12 -04:00
|
|
|
|
2009-06-02 09:51:38 -04:00
|
|
|
ANTLR_GRAMMARS = \
|
2009-06-04 09:45:22 -04:00
|
|
|
RSP.g RSP2SQL.g \
|
2015-04-12 00:49:38 -04:00
|
|
|
DAAP.g DAAP2SQL.g \
|
|
|
|
SMARTPL.g SMARTPL2SQL.g
|
2009-06-02 09:51:38 -04:00
|
|
|
|
2016-12-27 18:32:08 -05:00
|
|
|
ANTLR_TOKENS = $(ANTLR_GRAMMARS:.g=.tokens)
|
|
|
|
|
|
|
|
ANTLR_DEPS = $(ANTLR_GRAMMARS:%.g=$(srcdir)/%.u)
|
|
|
|
|
|
|
|
ANTLR_SRC = \
|
2009-06-04 09:45:22 -04:00
|
|
|
RSPLexer.c RSPLexer.h RSPParser.c RSPParser.h \
|
|
|
|
RSP2SQL.c RSP2SQL.h \
|
2009-06-02 09:51:38 -04:00
|
|
|
DAAPLexer.c DAAPLexer.h DAAPParser.c DAAPParser.h \
|
2015-04-12 00:49:38 -04:00
|
|
|
DAAP2SQL.c DAAP2SQL.h \
|
|
|
|
SMARTPLLexer.c SMARTPLLexer.h SMARTPLParser.c SMARTPLParser.h \
|
|
|
|
SMARTPL2SQL.c SMARTPL2SQL.h
|
2009-06-02 09:51:38 -04:00
|
|
|
|
2016-12-27 17:51:37 -05:00
|
|
|
AM_CPPFLAGS += \
|
2017-01-06 03:44:18 -05:00
|
|
|
$(FORKED_CPPFLAGS) \
|
2017-02-19 09:21:00 -05:00
|
|
|
$(FORKED_OPTS_CPPFLAGS) \
|
2017-01-06 03:44:18 -05:00
|
|
|
$(COMMON_CPPFLAGS) \
|
2016-12-27 17:51:37 -05:00
|
|
|
\
|
|
|
|
-D_GNU_SOURCE \
|
|
|
|
-DDATADIR=\"$(pkgdatadir)\" \
|
|
|
|
-DCONFDIR=\"$(sysconfdir)\" \
|
|
|
|
-DSTATEDIR=\"$(localstatedir)\" \
|
|
|
|
-DPKGLIBDIR=\"$(pkglibdir)\"
|
2009-06-12 05:09:58 -04:00
|
|
|
|
2017-01-06 03:44:18 -05:00
|
|
|
forked_daapd_LDADD = \
|
|
|
|
$(FORKED_LIBS) \
|
2017-02-19 09:21:00 -05:00
|
|
|
$(FORKED_OPTS_LIBS) \
|
2017-01-06 03:44:18 -05:00
|
|
|
$(COMMON_LIBS)
|
2011-02-06 11:17:58 -05:00
|
|
|
|
2009-06-12 05:09:58 -04:00
|
|
|
forked_daapd_SOURCES = main.c \
|
2009-06-07 12:58:02 -04:00
|
|
|
db.c db.h \
|
2016-11-04 02:10:36 -04:00
|
|
|
db_init.c db_init.h \
|
2015-12-19 01:51:10 -05:00
|
|
|
db_upgrade.c db_upgrade.h \
|
2009-05-08 11:04:25 -04:00
|
|
|
logger.c logger.h \
|
2009-04-18 08:14:26 -04:00
|
|
|
conffile.c conffile.h \
|
2015-02-14 14:58:01 -05:00
|
|
|
cache.c cache.h \
|
2017-01-11 12:25:49 -05:00
|
|
|
library/filescanner.c library/filescanner.h \
|
|
|
|
library/filescanner_ffmpeg.c library/filescanner_playlist.c \
|
|
|
|
library/filescanner_smartpl.c $(ITUNES_SRC) \
|
2016-12-31 01:28:18 -05:00
|
|
|
library.c library.h \
|
2017-01-14 00:56:43 -05:00
|
|
|
$(MDNS_SRC) mdns.h \
|
2010-01-15 13:38:21 -05:00
|
|
|
remote_pairing.c remote_pairing.h \
|
2015-04-12 14:05:14 -04:00
|
|
|
avio_evbuffer.c avio_evbuffer.h \
|
2009-04-22 15:25:41 -04:00
|
|
|
httpd.c httpd.h \
|
2009-04-24 09:41:20 -04:00
|
|
|
httpd_rsp.c httpd_rsp.h \
|
2009-04-28 11:48:57 -04:00
|
|
|
httpd_daap.c httpd_daap.h \
|
2010-01-29 16:39:27 -05:00
|
|
|
httpd_dacp.c httpd_dacp.h \
|
2017-08-12 13:42:06 -04:00
|
|
|
httpd_jsonapi.c httpd_jsonapi.h \
|
2015-10-09 17:58:27 -04:00
|
|
|
httpd_streaming.c httpd_streaming.h \
|
2015-03-20 18:40:42 -04:00
|
|
|
http.c http.h \
|
2011-03-08 13:22:16 -05:00
|
|
|
dmap_common.c dmap_common.h \
|
2017-03-04 05:10:43 -05:00
|
|
|
$(FFMPEG_SRC) \
|
2009-04-30 08:25:52 -04:00
|
|
|
misc.c misc.h \
|
2017-08-27 02:44:00 -04:00
|
|
|
misc_json.c misc_json.h \
|
2010-04-04 06:46:24 -04:00
|
|
|
rng.c rng.h \
|
2009-06-04 09:45:22 -04:00
|
|
|
rsp_query.c rsp_query.h \
|
2009-06-02 09:51:38 -04:00
|
|
|
daap_query.c daap_query.h \
|
2010-04-04 06:46:24 -04:00
|
|
|
player.c player.h \
|
2015-03-31 17:05:24 -04:00
|
|
|
worker.c worker.h \
|
2016-12-26 13:30:29 -05:00
|
|
|
input.h input.c \
|
2017-01-14 17:35:19 -05:00
|
|
|
inputs/file_http.c inputs/pipe.c \
|
2016-01-23 19:14:07 -05:00
|
|
|
outputs.h outputs.c \
|
2017-06-19 15:52:01 -04:00
|
|
|
outputs/raop.c $(RAOP_VERIFICATION_SRC) \
|
|
|
|
outputs/streaming.c outputs/dummy.c outputs/fifo.c \
|
2016-07-21 16:13:32 -04:00
|
|
|
$(ALSA_SRC) $(PULSEAUDIO_SRC) $(CHROMECAST_SRC) \
|
2016-12-27 17:51:37 -05:00
|
|
|
evrtsp/rtsp.c evrtsp/evrtsp.h evrtsp/rtsp-internal.h evrtsp/log.h \
|
2015-07-21 16:16:50 -04:00
|
|
|
$(SPOTIFY_SRC) \
|
|
|
|
$(LASTFM_SRC) \
|
2014-12-21 14:41:44 -05:00
|
|
|
$(MPD_SRC) \
|
2016-05-06 05:49:52 -04:00
|
|
|
listener.c listener.h \
|
2016-12-27 18:32:08 -05:00
|
|
|
commands.c commands.h \
|
2017-03-04 05:10:43 -05:00
|
|
|
mxml-compat.h \
|
2017-09-15 18:05:50 -04:00
|
|
|
$(LIBWEBSOCKETS_SRC) \
|
2016-12-27 18:32:08 -05:00
|
|
|
$(GPERF_SRC) \
|
2017-08-12 14:01:57 -04:00
|
|
|
$(ANTLR_SRC)
|
2009-06-02 09:51:38 -04:00
|
|
|
|
2016-12-27 18:32:08 -05:00
|
|
|
# built by maintainers, and distributed. Clean with maintainer-clean
|
2011-03-31 11:33:12 -04:00
|
|
|
BUILT_SOURCES = \
|
2016-12-27 18:32:08 -05:00
|
|
|
$(GPERF_SRC) \
|
|
|
|
$(ANTLR_SRC) \
|
|
|
|
$(ANTLR_TOKENS) \
|
|
|
|
$(ANTLR_DEPS)
|
2011-03-31 11:33:12 -04:00
|
|
|
|
2009-06-02 09:51:38 -04:00
|
|
|
EXTRA_DIST = \
|
2016-12-27 18:32:08 -05:00
|
|
|
$(GPERF_FILES) \
|
|
|
|
$(ANTLR_GRAMMARS) \
|
|
|
|
$(ANTLR_TOKENS) \
|
|
|
|
$(ANTLR_DEPS)
|
2009-06-02 09:51:38 -04:00
|
|
|
|
2011-03-31 11:33:12 -04:00
|
|
|
# gperf construction rules
|
2016-12-27 18:08:08 -05:00
|
|
|
%_hash.h: %.gperf
|
2016-12-27 18:32:08 -05:00
|
|
|
$(AM_V_GEN)$(GPERF) --output-file=$@ $<
|
2009-06-02 09:51:38 -04:00
|
|
|
|
2017-02-16 13:44:00 -05:00
|
|
|
# silent rules for antlr
|
|
|
|
antlr_verbose = $(antlr_verbose_@AM_V@)
|
|
|
|
antlr_verbose_ = $(antlr_verbose_@AM_DEFAULT_V@)
|
|
|
|
antlr_verbose_0 = @echo " GEN " $< "products";
|
|
|
|
|
2016-12-27 18:32:08 -05:00
|
|
|
# ANTLR grammar products
|
2009-06-02 09:51:38 -04:00
|
|
|
%.tokens %.c %Lexer.c %Parser.c %Lexer.h %Parser.h %.h: %.g
|
2017-02-16 13:44:00 -05:00
|
|
|
$(antlr_verbose)$(ANTLR) -Xconversiontimeout 30000 $(ANTLR_OPTIONS) -fo . $<
|
2009-06-02 09:51:38 -04:00
|
|
|
|
2016-12-27 18:32:08 -05:00
|
|
|
# ANTLR dependency files (bypass circular dependency of .g on .tokens)
|
2009-06-02 09:51:38 -04:00
|
|
|
%.u: %.g
|
2016-12-27 18:32:08 -05:00
|
|
|
$(AM_V_GEN)$(ANTLR) -depend -fo . $< > $@
|
2017-01-06 03:44:18 -05:00
|
|
|
$(AM_V_at)$(SED) -n -e '/^.*\.g[ ]*:\(.*\)/ { s//\1/;h;d; }' -e '/\.tokens.*:/ { p;d; }' -e '/:/ { G;s/\n/ /;p; }' $@ > $@-t
|
2016-12-27 18:32:08 -05:00
|
|
|
$(AM_V_at)mv $@-t $@
|
2010-09-04 06:57:10 -04:00
|
|
|
|
2016-12-27 18:32:08 -05:00
|
|
|
-include $(ANTLR_DEPS)
|