2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 ROCKBOY_SRCDIR
= $(APPSDIR
)/plugins
/rockboy
11 ROCKBOY_OBJDIR
= $(BUILDDIR
)/apps
/plugins
/rockboy
13 ROCKBOY_SRC
:= $(call preprocess
, $(ROCKBOY_SRCDIR
)/SOURCES
)
14 ROCKBOY_SRC
+= $(ROOTDIR
)/firmware
/libc
/sscanf.c
15 ROCKBOY_OBJ
:= $(call c2obj
, $(ROCKBOY_SRC
))
17 OTHER_SRC
+= $(ROCKBOY_SRC
)
19 ifeq ($(findstring YES
, $(call preprocess
, $(APPSDIR
)/plugins
/BUILD_OVERLAY
)), YES
)
21 ROCKS
+= $(ROCKBOY_OBJDIR
)/rockboy.ovl
22 ROCKBOY_OUTLDS
= $(ROCKBOY_OBJDIR
)/rockboy.link
23 ROCKBOY_OVLFLAGS
= -T
$(ROCKBOY_OUTLDS
) -Wl
,--gc-sections
-Wl
,-Map
,$(basename $@
).map
25 ROCKS
+= $(ROCKBOY_OBJDIR
)/rockboy.rock
28 $(ROCKBOY_OBJDIR
)/rockboy.rock
: $(ROCKBOY_OBJ
)
30 $(ROCKBOY_OBJDIR
)/rockboy.refmap
: $(ROCKBOY_OBJ
)
32 $(ROCKBOY_OUTLDS
): $(PLUGIN_LDS
) $(ROCKBOY_OBJDIR
)/rockboy.refmap
33 $(call PRINTS
,PP
$(@F
))$(call preprocess2file
,$<,$@
,-DOVERLAY_OFFSET
=$(shell \
34 $(TOOLSDIR
)/ovl_offset.pl
$(ROCKBOY_OBJDIR
)/rockboy.refmap
))
36 $(ROCKBOY_OBJDIR
)/rockboy.ovl
: $(ROCKBOY_OBJ
) $(ROCKBOY_OUTLDS
)
37 $(SILENT
)$(CC
) $(PLUGINFLAGS
) -o
$(basename $@
).elf \
40 -lgcc
$(ROCKBOY_OVLFLAGS
)
41 $(call PRINTS
,LD
$(@F
))$(OC
) -O binary
$(basename $@
).elf
$@