Added 'keywords' and 'eol-style' properties.
[kugel-rb.git] / apps / plugins / midi / midi.make
blob9de8496d90dd254a94d9ee7f5dbbb76c6b9feec1
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
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 \
28 $(filter %.o, $^) \
29 $(filter %.a, $^) \
30 -lgcc $(PLUGINLDFLAGS)
31 ifdef SIMVER
32 $(SILENT)cp $*.elf $@
33 else
34 $(SILENT)$(OC) -O binary $*.elf $@
35 endif
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 $@