2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 GOBAN_SRCDIR
:= $(APPSDIR
)/plugins
/goban
11 GOBAN_BUILDDIR
:= $(BUILDDIR
)/apps
/plugins
/goban
13 GOBAN_SRC
:= $(call preprocess
, $(GOBAN_SRCDIR
)/SOURCES
)
14 GOBAN_OBJ
:= $(call c2obj
, $(GOBAN_SRC
))
16 OTHER_SRC
+= $(GOBAN_SRC
)
19 ifneq (,$(strip $(foreach tgt
,RECORDER ONDIO
,$(findstring $(tgt
),$(TARGET
)))))
21 ROCKS
+= $(GOBAN_BUILDDIR
)/goban.ovl
22 GOBAN_OUTLDS
= $(GOBAN_BUILDDIR
)/goban.link
23 GOBAN_OVLFLAGS
= -T
$(GOBAN_OUTLDS
) -Wl
,--gc-sections
-Wl
,-Map
,$(basename $@
).map
26 ROCKS
+= $(GOBAN_BUILDDIR
)/goban.rock
30 ROCKS
+= $(GOBAN_BUILDDIR
)/goban.rock
33 $(GOBAN_BUILDDIR
)/goban.rock
: $(GOBAN_OBJ
)
35 $(GOBAN_BUILDDIR
)/goban.refmap
: $(GOBAN_OBJ
)
37 $(GOBAN_OUTLDS
): $(PLUGIN_LDS
) $(GOBAN_BUILDDIR
)/goban.refmap
38 $(call PRINTS
,PP
$(@F
))$(call preprocess2file
,$<,$@
,-DOVERLAY_OFFSET
=$(shell \
39 $(TOOLSDIR
)/ovl_offset.pl
$(GOBAN_BUILDDIR
)/goban.refmap
))
41 $(GOBAN_BUILDDIR
)/goban.ovl
: $(GOBAN_OBJ
) $(GOBAN_OUTLDS
)
42 $(SILENT
)$(CC
) $(PLUGINFLAGS
) -o
$(basename $@
).elf \
45 -lgcc
$(GOBAN_OVLFLAGS
)
46 $(call PRINTS
,LD
$(@F
))$(OC
) -O binary
$(basename $@
).elf
$@