A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 71 lines 3.0 kB view raw
1# __________ __ ___. 2# Open \______ \ ____ ____ | | _\_ |__ _______ ___ 3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6# \/ \/ \/ \/ \/ 7# $Id$ 8# 9 10PUZZLES_SRCDIR = $(APPSDIR)/plugins/puzzles 11PUZZLES_OBJDIR = $(BUILDDIR)/apps/plugins/puzzles 12 13PUZZLES_SHARED_SRC = $(call preprocess, $(PUZZLES_SRCDIR)/SOURCES) 14PUZZLES_SHARED_OBJ = $(call c2obj, $(PUZZLES_SHARED_SRC)) 15 16PUZZLES_GAMES_SRC = $(call preprocess, $(PUZZLES_SRCDIR)/SOURCES.games) 17PUZZLES_GAMES_OBJ = $(call c2obj, $(PUZZLES_GAMES_SRC)) 18 19PUZZLES_HELP_SRC = $(wildcard $(PUZZLES_SRCDIR)/help/*) 20PUZZLES_HELP_OBJ = $(call c2obj, $(PUZZLES_HELP_OBJ)) 21 22PUZZLES_SRC = $(PUZZLES_GAMES_SRC) $(PUZZLES_SHARED_SRC) $(PUZZLES_HELP_SRC) 23PUZZLES_OBJ = $(call c2obj, $(PUZZLES_SRC)) 24 25PUZZLES_ROCKS = $(addprefix $(PUZZLES_OBJDIR)/sgt-, $(notdir $(PUZZLES_GAMES_SRC:.c=.rock))) 26 27OTHER_SRC += $(PUZZLES_SRC) 28OTHER_INC += -I$(PUZZLES_SRCDIR)/src -I $(PUZZLES_SRCDIR) 29 30ROCKS += $(PUZZLES_ROCKS) 31 32PUZZLES_OPTIMIZE = -O2 33 34ifeq ($(MODELNAME), sansac200v2) 35PUZZLES_OPTIMIZE = -Os # tiny plugin buffer 36endif 37 38# we suppress all warnings with -w 39PUZZLESFLAGS = -I$(PUZZLES_SRCDIR)/dummy $(filter-out \ 40 -O%,$(PLUGINFLAGS)) $(PUZZLES_OPTIMIZE) \ 41 -Wno-unused-parameter -Wno-sign-compare \ 42 -Wno-strict-aliasing -DFOR_REAL \ 43 -I$(PUZZLES_SRCDIR)/src -I$(PUZZLES_SRCDIR) -include \ 44 $(PUZZLES_SRCDIR)/rbcompat.h -ffunction-sections \ 45 -fdata-sections -w -Wl,--gc-sections 46 47$(PUZZLES_OBJDIR)/sgt-%.rock: $(PUZZLES_OBJDIR)/src/%.o $(PUZZLES_OBJDIR)/help/%.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) 48 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(PUZZLES_OBJDIR)/$*.elf \ 49 $(filter %.o, $^) \ 50 $(filter %.a, $+) \ 51 -lgcc $(filter-out -Wl%.map, $(PLUGINLDFLAGS)) -Wl,$(LDMAP_OPT),$(PUZZLES_OBJDIR)/src/$*.map 52 $(SILENT)$(call objcopy,$(PUZZLES_OBJDIR)/$*.elf,$@) 53 54$(PUZZLES_OBJDIR)/sgt-%.rock: $(PUZZLES_OBJDIR)/src/unfinished/%.o $(PUZZLES_OBJDIR)/help/%.o $(PUZZLES_SHARED_OBJ) $(TLSFLIB) 55 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(PUZZLES_OBJDIR)/$*.elf \ 56 $(filter %.o, $^) \ 57 $(filter %.a, $+) \ 58 -lgcc $(filter-out -Wl%.map, $(PLUGINLDFLAGS)) -Wl,$(LDMAP_OPT),$(PUZZLES_OBJDIR)/src/$*.map 59 $(SILENT)$(call objcopy,$(PUZZLES_OBJDIR)/$*.elf,$@) 60 61$(PUZZLES_SRCDIR)/rbcompat.h: $(APPSDIR)/plugin.h \ 62 $(APPSDIR)/plugins/lib/pluginlib_exit.h \ 63 $(BUILDDIR)/sysfont.h \ 64 $(PUZZLES_SRCDIR)/rbassert.h \ 65 $(TLSFLIB_DIR)/src/tlsf.h \ 66 $(BUILDDIR)/lang_enum.h 67 68# special pattern rule for compiling puzzles with extra flags 69$(PUZZLES_OBJDIR)/%.o: $(PUZZLES_SRCDIR)/%.c $(PUZZLES_SRCDIR)/puzzles.make $(PUZZLES_SRCDIR)/rbcompat.h 70 $(SILENT)mkdir -p $(dir $@) 71 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PUZZLESFLAGS) -c $< -o $@