2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 MIDISRCDIR
:= $(APPSDIR
)/plugins
/midi
11 MIDIBUILDDIR
:= $(BUILDDIR
)/apps
/plugins
/midi
13 ROCKS
+= $(MIDIBUILDDIR
)/midi.rock
15 MIDI_SRC
:= $(call preprocess
, $(MIDISRCDIR
)/SOURCES
)
16 MIDI_OBJ
:= $(call c2obj
, $(MIDI_SRC
))
18 # add source files to OTHER_SRC to get automatic dependencies
19 OTHER_SRC
+= $(MIDI_SRC
)
21 MIDICFLAGS
= $(PLUGINFLAGS
) -O2
23 $(MIDIBUILDDIR
)/midi.rock
: $(MIDI_OBJ
)
24 # for some reason, this doesn't match the implicit rule in plugins.make,
25 # so we have to duplicate the link command here
26 $(call PRINTS
,LD
$(@F
))
27 $(SILENT
)$(CC
) $(PLUGINFLAGS
) -o
$*.elf \
30 -lgcc
$(PLUGINLDFLAGS
)
34 $(SILENT
)$(OC
) -O binary
$*.elf
$@
37 # new rule needed to use extra compile flags
38 $(MIDIBUILDDIR
)/%.o
: $(MIDISRCDIR
)/%.c
39 $(SILENT
)mkdir
-p
$(dir $@
)
40 $(call PRINTS
,CC
$(subst $(ROOTDIR
)/,,$<))$(CC
) $(MIDICFLAGS
) -c
$< -o
$@