2009-04-01 18:59:32 +02:00
|
|
|
|
2021-04-09 19:43:43 +02:00
|
|
|
sbin_PROGRAMS = owntone
|
2003-10-30 22:42:53 +00:00
|
|
|
|
2014-03-11 23:20:29 +01:00
|
|
|
if COND_SPOTIFY
|
2016-12-29 00:39:23 +01:00
|
|
|
SPOTIFY_SRC=spotify.c spotify.h spotify_webapi.c spotify_webapi.h inputs/spotify.c
|
2014-08-15 23:36:54 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
if COND_LASTFM
|
|
|
|
LASTFM_SRC=lastfm.c lastfm.h
|
2014-03-11 23:20:29 +01:00
|
|
|
endif
|
|
|
|
|
2016-01-17 20:59:16 +01:00
|
|
|
if COND_CHROMECAST
|
2016-02-06 13:38:43 +01: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-24 01:14:07 +01:00
|
|
|
CHROMECAST_SRC=outputs/cast.c outputs/cast_channel.pb-c.h outputs/cast_channel.pb-c.c
|
2016-01-17 20:59:16 +01:00
|
|
|
endif
|
2016-02-06 13:38:43 +01:00
|
|
|
endif
|
2016-01-17 20:59:16 +01:00
|
|
|
|
2014-12-21 20:41:44 +01:00
|
|
|
if COND_MPD
|
|
|
|
MPD_SRC=mpd.c mpd.h
|
|
|
|
endif
|
|
|
|
|
2021-03-07 23:01:50 +01:00
|
|
|
PAIR_AP_SRC = \
|
|
|
|
pair_ap/pair_fruit.c pair_ap/pair_homekit.c pair_ap/pair-tlv.c \
|
|
|
|
pair_ap/pair.c pair_ap/pair-tlv.h pair_ap/pair-internal.h pair_ap/pair.h
|
2020-11-27 22:46:38 +01:00
|
|
|
AM_CPPFLAGS += -DCONFIG_GCRYPT
|
2017-06-19 21:52:01 +02:00
|
|
|
|
2010-04-04 12:46:24 +02:00
|
|
|
if COND_ALSA
|
2016-04-04 16:58:07 +02:00
|
|
|
ALSA_SRC=outputs/alsa.c
|
2010-04-04 12:46:24 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-21 22:13:32 +02: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-16 00:05:50 +02:00
|
|
|
if COND_LIBWEBSOCKETS
|
|
|
|
LIBWEBSOCKETS_SRC=websocket.c websocket.h
|
2017-08-12 20:01:57 +02:00
|
|
|
endif
|
|
|
|
|
2011-03-31 18:05:41 +02:00
|
|
|
GPERF_FILES = \
|
2011-03-31 18:30:18 +02:00
|
|
|
daap_query.gperf \
|
2011-03-31 18:52:33 +02:00
|
|
|
rsp_query.gperf \
|
2011-04-01 19:01:35 +02:00
|
|
|
dacp_prop.gperf \
|
|
|
|
dmap_fields.gperf
|
2011-03-31 17:33:12 +02:00
|
|
|
|
2016-12-27 15:32:08 -08:00
|
|
|
GPERF_SRC = $(GPERF_FILES:.gperf=_hash.h)
|
2011-03-31 17:33:12 +02:00
|
|
|
|
2009-06-02 15:51:38 +02:00
|
|
|
ANTLR_GRAMMARS = \
|
2009-06-04 15:45:22 +02:00
|
|
|
RSP.g RSP2SQL.g \
|
2015-04-12 06:49:38 +02:00
|
|
|
DAAP.g DAAP2SQL.g \
|
|
|
|
SMARTPL.g SMARTPL2SQL.g
|
2009-06-02 15:51:38 +02:00
|
|
|
|
2016-12-27 15:32:08 -08:00
|
|
|
ANTLR_TOKENS = $(ANTLR_GRAMMARS:.g=.tokens)
|
|
|
|
|
|
|
|
ANTLR_DEPS = $(ANTLR_GRAMMARS:%.g=$(srcdir)/%.u)
|
|
|
|
|
|
|
|
ANTLR_SRC = \
|
2009-06-04 15:45:22 +02:00
|
|
|
RSPLexer.c RSPLexer.h RSPParser.c RSPParser.h \
|
|
|
|
RSP2SQL.c RSP2SQL.h \
|
2009-06-02 15:51:38 +02:00
|
|
|
DAAPLexer.c DAAPLexer.h DAAPParser.c DAAPParser.h \
|
2015-04-12 06:49:38 +02:00
|
|
|
DAAP2SQL.c DAAP2SQL.h \
|
|
|
|
SMARTPLLexer.c SMARTPLLexer.h SMARTPLParser.c SMARTPLParser.h \
|
|
|
|
SMARTPL2SQL.c SMARTPL2SQL.h
|
2009-06-02 15:51:38 +02:00
|
|
|
|
2020-02-08 21:24:25 +01:00
|
|
|
ANTLR_OBJECTS = \
|
|
|
|
RSPLexer.$(OBJEXT) RSPParser.$(OBJEXT) RSP2SQL.$(OBJEXT) \
|
|
|
|
DAAPLexer.$(OBJEXT) DAAPParser.$(OBJEXT) DAAP2SQL.$(OBJEXT) \
|
|
|
|
SMARTPLLexer.$(OBJEXT) SMARTPLParser.$(OBJEXT) SMARTPL2SQL.$(OBJEXT)
|
|
|
|
|
2016-12-27 14:51:37 -08:00
|
|
|
AM_CPPFLAGS += \
|
2017-01-06 00:44:18 -08:00
|
|
|
$(FORKED_CPPFLAGS) \
|
2017-02-19 06:21:00 -08:00
|
|
|
$(FORKED_OPTS_CPPFLAGS) \
|
2017-01-06 00:44:18 -08:00
|
|
|
$(COMMON_CPPFLAGS) \
|
2016-12-27 14:51:37 -08:00
|
|
|
\
|
|
|
|
-D_GNU_SOURCE \
|
|
|
|
-DDATADIR=\"$(pkgdatadir)\" \
|
|
|
|
-DCONFDIR=\"$(sysconfdir)\" \
|
|
|
|
-DSTATEDIR=\"$(localstatedir)\" \
|
|
|
|
-DPKGLIBDIR=\"$(pkglibdir)\"
|
2009-06-12 11:09:58 +02:00
|
|
|
|
2021-04-09 19:43:43 +02:00
|
|
|
owntone_LDADD = \
|
2017-01-06 00:44:18 -08:00
|
|
|
$(FORKED_LIBS) \
|
2017-02-19 06:21:00 -08:00
|
|
|
$(FORKED_OPTS_LIBS) \
|
2017-01-06 00:44:18 -08:00
|
|
|
$(COMMON_LIBS)
|
2011-02-06 17:17:58 +01:00
|
|
|
|
2021-04-09 19:43:43 +02:00
|
|
|
owntone_SOURCES = main.c \
|
2009-06-07 18:58:02 +02:00
|
|
|
db.c db.h \
|
2016-11-04 07:10:36 +01:00
|
|
|
db_init.c db_init.h \
|
2015-12-19 07:51:10 +01:00
|
|
|
db_upgrade.c db_upgrade.h \
|
2009-05-08 17:04:25 +02:00
|
|
|
logger.c logger.h \
|
2009-04-18 14:14:26 +02:00
|
|
|
conffile.c conffile.h \
|
2015-02-14 20:58:01 +01:00
|
|
|
cache.c cache.h \
|
2017-01-11 18:25:49 +01:00
|
|
|
library/filescanner.c library/filescanner.h \
|
|
|
|
library/filescanner_ffmpeg.c library/filescanner_playlist.c \
|
2021-01-03 23:30:09 +01:00
|
|
|
library/filescanner_smartpl.c library/filescanner_itunes.c \
|
2020-03-08 20:07:44 +00:00
|
|
|
library/rssscanner.c \
|
2016-12-31 07:28:18 +01:00
|
|
|
library.c library.h \
|
2017-01-14 00:56:43 -05:00
|
|
|
$(MDNS_SRC) mdns.h \
|
2010-01-15 19:38:21 +01:00
|
|
|
remote_pairing.c remote_pairing.h \
|
2015-04-12 20:05:14 +02:00
|
|
|
avio_evbuffer.c avio_evbuffer.h \
|
2009-04-22 21:25:41 +02:00
|
|
|
httpd.c httpd.h \
|
2009-04-24 15:41:20 +02:00
|
|
|
httpd_rsp.c httpd_rsp.h \
|
2009-04-28 17:48:57 +02:00
|
|
|
httpd_daap.c httpd_daap.h \
|
2010-01-29 22:39:27 +01:00
|
|
|
httpd_dacp.c httpd_dacp.h \
|
2017-08-12 19:42:06 +02:00
|
|
|
httpd_jsonapi.c httpd_jsonapi.h \
|
2015-10-09 23:58:27 +02:00
|
|
|
httpd_streaming.c httpd_streaming.h \
|
2017-11-05 19:34:50 +01:00
|
|
|
httpd_oauth.c httpd_oauth.h \
|
2018-10-07 21:54:38 +02:00
|
|
|
httpd_artworkapi.c httpd_artworkapi.h \
|
2015-03-20 23:40:42 +01:00
|
|
|
http.c http.h \
|
2011-03-08 19:22:16 +01:00
|
|
|
dmap_common.c dmap_common.h \
|
2019-04-08 22:06:56 +02:00
|
|
|
transcode.c transcode.h \
|
|
|
|
artwork.c artwork.h \
|
2009-04-30 14:25:52 +02:00
|
|
|
misc.c misc.h \
|
2017-08-27 08:44:00 +02:00
|
|
|
misc_json.c misc_json.h \
|
2010-04-04 12:46:24 +02:00
|
|
|
rng.c rng.h \
|
2009-06-04 15:45:22 +02:00
|
|
|
rsp_query.c rsp_query.h \
|
2009-06-02 15:51:38 +02:00
|
|
|
daap_query.c daap_query.h \
|
2018-03-17 13:30:22 +01:00
|
|
|
smartpl_query.c smartpl_query.h \
|
2010-04-04 12:46:24 +02:00
|
|
|
player.c player.h \
|
2015-03-31 23:05:24 +02:00
|
|
|
worker.c worker.h \
|
2019-07-13 08:15:06 +02:00
|
|
|
settings.c settings.h \
|
2016-12-26 19:30:29 +01:00
|
|
|
input.h input.c \
|
2020-05-17 22:48:06 +02:00
|
|
|
inputs/file.c inputs/http.c inputs/pipe.c inputs/timer.c \
|
2016-01-24 01:14:07 +01:00
|
|
|
outputs.h outputs.c \
|
2019-02-08 20:07:45 +01:00
|
|
|
outputs/rtp_common.h outputs/rtp_common.c \
|
2021-01-03 23:30:09 +01:00
|
|
|
outputs/raop.c outputs/airplay.c $(PAIR_AP_SRC) \
|
2017-06-19 21:52:01 +02:00
|
|
|
outputs/streaming.c outputs/dummy.c outputs/fifo.c \
|
2016-07-21 22:13:32 +02:00
|
|
|
$(ALSA_SRC) $(PULSEAUDIO_SRC) $(CHROMECAST_SRC) \
|
2016-12-27 14:51:37 -08:00
|
|
|
evrtsp/rtsp.c evrtsp/evrtsp.h evrtsp/rtsp-internal.h evrtsp/log.h \
|
2015-07-21 22:16:50 +02:00
|
|
|
$(SPOTIFY_SRC) \
|
|
|
|
$(LASTFM_SRC) \
|
2014-12-21 20:41:44 +01:00
|
|
|
$(MPD_SRC) \
|
2016-05-06 11:49:52 +02:00
|
|
|
listener.c listener.h \
|
2016-12-27 15:32:08 -08:00
|
|
|
commands.c commands.h \
|
2017-03-04 11:10:43 +01:00
|
|
|
mxml-compat.h \
|
2020-12-16 08:17:48 +01:00
|
|
|
outputs/plist_wrap.h \
|
2017-09-16 00:05:50 +02:00
|
|
|
$(LIBWEBSOCKETS_SRC) \
|
2016-12-27 15:32:08 -08:00
|
|
|
$(GPERF_SRC) \
|
2017-08-12 20:01:57 +02:00
|
|
|
$(ANTLR_SRC)
|
2009-06-02 15:51:38 +02:00
|
|
|
|
2016-12-27 15:32:08 -08:00
|
|
|
# built by maintainers, and distributed. Clean with maintainer-clean
|
2011-03-31 17:33:12 +02:00
|
|
|
BUILT_SOURCES = \
|
2016-12-27 15:32:08 -08:00
|
|
|
$(GPERF_SRC) \
|
|
|
|
$(ANTLR_SRC) \
|
|
|
|
$(ANTLR_TOKENS) \
|
|
|
|
$(ANTLR_DEPS)
|
2011-03-31 17:33:12 +02:00
|
|
|
|
2009-06-02 15:51:38 +02:00
|
|
|
EXTRA_DIST = \
|
2016-12-27 15:32:08 -08:00
|
|
|
$(GPERF_FILES) \
|
|
|
|
$(ANTLR_GRAMMARS) \
|
|
|
|
$(ANTLR_TOKENS) \
|
|
|
|
$(ANTLR_DEPS)
|
2009-06-02 15:51:38 +02:00
|
|
|
|
2020-02-08 21:24:25 +01:00
|
|
|
# silence unused warnings from antlr generated files
|
|
|
|
$(ANTLR_OBJECTS): AM_CPPFLAGS += -Wno-unused
|
|
|
|
|
2011-03-31 17:33:12 +02:00
|
|
|
# gperf construction rules
|
2016-12-27 15:08:08 -08:00
|
|
|
%_hash.h: %.gperf
|
2016-12-27 15:32:08 -08:00
|
|
|
$(AM_V_GEN)$(GPERF) --output-file=$@ $<
|
2009-06-02 15:51:38 +02:00
|
|
|
|
2017-02-16 10:44:00 -08: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 15:32:08 -08:00
|
|
|
# ANTLR grammar products
|
2009-06-02 15:51:38 +02:00
|
|
|
%.tokens %.c %Lexer.c %Parser.c %Lexer.h %Parser.h %.h: %.g
|
2017-02-16 10:44:00 -08:00
|
|
|
$(antlr_verbose)$(ANTLR) -Xconversiontimeout 30000 $(ANTLR_OPTIONS) -fo . $<
|
2009-06-02 15:51:38 +02:00
|
|
|
|
2016-12-27 15:32:08 -08:00
|
|
|
# ANTLR dependency files (bypass circular dependency of .g on .tokens)
|
2009-06-02 15:51:38 +02:00
|
|
|
%.u: %.g
|
2016-12-27 15:32:08 -08:00
|
|
|
$(AM_V_GEN)$(ANTLR) -depend -fo . $< > $@
|
2017-01-06 00:44:18 -08: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 15:32:08 -08:00
|
|
|
$(AM_V_at)mv $@-t $@
|
2010-09-04 12:57:10 +02:00
|
|
|
|
2016-12-27 15:32:08 -08:00
|
|
|
-include $(ANTLR_DEPS)
|