Something went wrong. Try again.
A modern, network-enabled music player platform built on Rockbox technology. rockboxd.tsiry-sandratraina.com
rust deno navidrome airplay libadwaita zig mpris snapcast mpd rockbox audio subsonic
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189# __________ __ ___.# Open \______ \ ____ ____ | | _\_ |__ _______ ___# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \# \/ \/ \/ \/ \/## single-file plugins:is_app_build =ifdef APP_TYPEifneq ($(APP_TYPE),sdl-sim) is_app_build = yesendifendif# Let's enable all plugins for the 3ds targetifeq ($(APP_TYPE),3ds-homebrew) is_app_build =endififneq ($(SELECTED_PLUGINS_SRC),DEFAULT)PLUGINS_SRC = $(SELECTED_PLUGINS_SRC)elseifdef is_app_buildPLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES.app_build)elsePLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES)endifendif # if SELECTED_PLUGINS_SRCOTHER_SRC += $(PLUGINS_SRC)ROCKS1 := $(PLUGINS_SRC:.c=.rock)ROCKS1 := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(ROCKS1))ROCKS := $(ROCKS1)ROCKS1 := $(ROCKS1:%.lua=)# libplugin.aPLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.aPLUGINLIB_SRC = $(call preprocess, $(APPSDIR)/plugins/lib/SOURCES)OTHER_SRC += $(PLUGINLIB_SRC)PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o)PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o)PLUGINLIB_OBJ := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(PLUGINLIB_OBJ))ifdef USE_LTO# We do NOT want LTO on the GCC support file.$(BUILDDIR)/apps/plugins/lib/gcc-support.o: PLUGINFLAGS += -fno-lto$(BUILDDIR)/apps/plugins/plugin_crt0.o: PLUGINFLAGS += -fno-ltoendif### build data / rulesifndef APP_TYPECONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).hPLUGIN_LDS := $(APPSDIR)/plugins/plugin.ldsPLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/plugin.linkOVERLAYREF_LDS := $(BUILDDIR)/apps/plugins/overlay_ref.linkendifOTHER_SRC += $(ROOTDIR)/apps/plugins/plugin_crt0.cPLUGIN_CRT0 := $(BUILDDIR)/apps/plugins/plugin_crt0.o# multifile plugins (subdirs):ifneq ($(SELECTED_PLUGINS_SUBDIRS),DEFAULT)PLUGINSUBDIRS := $(SELECTED_PLUGINS_SUBDIRS)elseifdef is_app_buildPLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS.app_build)elsePLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS)endifendif # if SELECTED_PLUGINS_SUBDIRSPLUGIN_LIBS := $(PLUGINLIB) $(PLUGINBITMAPLIB) $(SETJMPLIB) $(FIXEDPOINTLIB)# include <dir>.make from each subdir (yay!)$(foreach dir,$(PLUGINSUBDIRS),$(eval include $(dir)/$(notdir $(dir)).make))OTHER_INC += -I$(APPSDIR)/plugins -I$(APPSDIR)/plugins/lib# special compile flags for plugins:PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS)# single-file plugins depend on their respective .o$(ROCKS1): $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o# dependency for all plugins$(ROCKS): $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGIN_LIBS) $(PLUGIN_CRT0)$(PLUGINLIB): $(PLUGINLIB_OBJ) $(SILENT)$(shell rm -f $@) $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null$(PLUGINLINK_LDS): $(PLUGIN_LDS) $(CONFIGFILE) $(call PRINTS,PP $(@F)) $(shell mkdir -p $(dir $@)) $(call preprocess2file,$<,$@,-DPLUGIN)$(OVERLAYREF_LDS): $(PLUGIN_LDS) $(call PRINTS,PP $(@F)) $(shell mkdir -p $(dir $@)) $(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=0)$(BUILDDIR)/credits.raw credits.raw: $(DOCSDIR)/CREDITS $(call PRINTS,Create credits.raw)perl $(APPSDIR)/plugins/credits.pl < $< > $(BUILDDIR)/$(@F)$(BUILDDIR)/apps/plugins/open_plugins.opx: $(call PRINTS,MK open_plugins.opx) touch $< $(BUILDDIR)/apps/plugins/open_plugins.opx$(BUILDDIR)/apps/plugins/open_plugins.rock: $(BUILDDIR)/apps/plugins/open_plugins.opx# special dependencies$(BUILDDIR)/apps/plugins/wav2wv.rock: $(RBCODEC_BLD)/codecs/libwavpack.a $(PLUGIN_LIBS)# Do not use '-ffunction-sections' and '-fdata-sections' when compiling sdl-simifeq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim) PLUGINLIBFLAGS = $(PLUGINFLAGS)else PLUGINLIBFLAGS = $(PLUGINFLAGS) -ffunction-sections -fdata-sectionsendifROOT_PLUGINSLIB_DIR := $(ROOTDIR)/apps/plugins/libBUILD_PLUGINSLIB_DIR := $(BUILDDIR)/apps/plugins/lib# action_helper #ACTION_REQ := $(addprefix $(ROOT_PLUGINSLIB_DIR)/,action_helper.pl action_helper.h) \ $(BUILD_PLUGINSLIB_DIR)/pluginlib_actions.o# special rule for generating and compiling action_helper$(BUILD_PLUGINSLIB_DIR)/action_helper.o: $(ACTION_REQ) $(SILENT)mkdir -p $(dir $@) $(call PRINTS,GEN $(@F))$(CC) $(PLUGINFLAGS) $(INCLUDES) -E -P \ $(ROOT_PLUGINSLIB_DIR)/pluginlib_actions.h - < /dev/null | $< > $(basename $@).c $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(ROOT_PLUGINSLIB_DIR) \ $(PLUGINLIBFLAGS) -c $(basename $@).c -o $@# button_helper #BUTTON_REQ := $(addprefix $(ROOT_PLUGINSLIB_DIR)/,button_helper.pl button_helper.h) \ $(BUILD_PLUGINSLIB_DIR)/action_helper.o# special rule for generating and compiling button_helper$(BUILD_PLUGINSLIB_DIR)/button_helper.o: $(BUTTON_REQ) $(ROOTDIR)/firmware/export/button.h $(SILENT)mkdir -p $(dir $@) $(call PRINTS,GEN $(@F))$(CC) $(PLUGINFLAGS) $(INCLUDES) -dM -E -P \ $(addprefix -include ,button-target.h button.h) - < /dev/null | $< > $(basename $@).c $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(ROOT_PLUGINSLIB_DIR) \ $(PLUGINLIBFLAGS) -c $(basename $@).c -o $@# special pattern rule for compiling plugin lib (with function and data sections)$(BUILD_PLUGINSLIB_DIR)/%.o: $(ROOT_PLUGINSLIB_DIR)/%.c $(SILENT)mkdir -p $(dir $@) $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINLIBFLAGS) -c $< -o $@# special pattern rule for compiling plugins with extra flags$(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c $(SILENT)mkdir -p $(dir $@) $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ifdef APP_TYPE PLUGINLDFLAGS = $(SHARED_LDFLAGS) -Wl,$(LDMAP_OPT),$*.map PLUGINFLAGS += $(SHARED_CFLAGS) # <-- from Makefileelse PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap $(GLOBAL_LDOPTS)endifPLUGINLDFLAGS += $(GLOBAL_LDOPTS)ifdef USE_LTO PLUGINFLAGS += -fno-builtin -ffreestanding PLUGINLDFLAGS += -fno-builtin -ffreestanding PLUGINLDFLAGS += -e plugin_startendif$(BUILDDIR)/%.rock: $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ $(filter %.o, $^) \ $(filter %.a, $+) \ -lgcc $(PLUGINLDFLAGS) $(SILENT)$(call objcopy_plugin,$(BUILDDIR)/$*.elf,$@)$(BUILDDIR)/apps/plugins/%.lua: $(ROOTDIR)/apps/plugins/%.lua $(call PRINTS,CP $(subst $(ROOTDIR)/,,$<))cp $< $(BUILDDIR)/apps/plugins/$(BUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(OVERLAYREF_LDS) $(PLUGIN_LIBS) $(PLUGIN_CRT0) $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(basename $@).refelf \ $(filter %.o, $^) \ $(filter %.a, $+) \ -lgcc $(OVERLAYLDFLAGS)