summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/doom/doom.make12
-rw-r--r--apps/plugins/midi/midi.make12
-rw-r--r--apps/plugins/plugins.make14
-rw-r--r--apps/plugins/reversi/reversi.make12
4 files changed, 10 insertions, 40 deletions
diff --git a/apps/plugins/doom/doom.make b/apps/plugins/doom/doom.make
index fc73729c22..adec5432e7 100644
--- a/apps/plugins/doom/doom.make
+++ b/apps/plugins/doom/doom.make
@@ -34,18 +34,6 @@ else
34endif 34endif
35 35
36$(DOOMBUILDDIR)/doom.rock: $(DOOM_OBJ) 36$(DOOMBUILDDIR)/doom.rock: $(DOOM_OBJ)
37# for some reason, this doesn't match the implicit rule in plugins.make,
38# so we have to duplicate the link command here
39 $(call PRINTS,LD $(@F))
40 $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \
41 $(filter %.o, $^) \
42 $(filter %.a, $^) \
43 -lgcc $(PLUGINLDFLAGS)
44ifdef SIMVER
45 $(SILENT)cp $*.elf $@
46else
47 $(SILENT)$(OC) -O binary $*.elf $@
48endif
49 37
50# new rule needed to use extra compile flags 38# new rule needed to use extra compile flags
51$(DOOMBUILDDIR)/%.o: $(DOOMSRCDIR)/%.c 39$(DOOMBUILDDIR)/%.o: $(DOOMSRCDIR)/%.c
diff --git a/apps/plugins/midi/midi.make b/apps/plugins/midi/midi.make
index 9de8496d90..549d8e7c0a 100644
--- a/apps/plugins/midi/midi.make
+++ b/apps/plugins/midi/midi.make
@@ -21,18 +21,6 @@ OTHER_SRC += $(MIDI_SRC)
21MIDICFLAGS = $(PLUGINFLAGS) -O2 21MIDICFLAGS = $(PLUGINFLAGS) -O2
22 22
23$(MIDIBUILDDIR)/midi.rock: $(MIDI_OBJ) 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)
31ifdef SIMVER
32 $(SILENT)cp $*.elf $@
33else
34 $(SILENT)$(OC) -O binary $*.elf $@
35endif
36 24
37# new rule needed to use extra compile flags 25# new rule needed to use extra compile flags
38$(MIDIBUILDDIR)/%.o: $(MIDISRCDIR)/%.c 26$(MIDIBUILDDIR)/%.o: $(MIDISRCDIR)/%.c
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make
index f6b1b003a0..0d486c6fe3 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -10,8 +10,10 @@
10# single-file plugins: 10# single-file plugins:
11PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES) 11PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES)
12OTHER_SRC += $(PLUGINS_SRC) 12OTHER_SRC += $(PLUGINS_SRC)
13ROCKS := $(PLUGINS_SRC:.c=.rock) 13ROCKS1 := $(PLUGINS_SRC:.c=.rock)
14ROCKS := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS)) 14ROCKS1 := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS1))
15
16ROCKS := $(ROCKS1)
15 17
16# libplugin.a 18# libplugin.a
17PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a 19PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a
@@ -44,6 +46,10 @@ OTHER_INC += -I$(APPSDIR)/plugins -I$(APPSDIR)/plugins/lib
44# special compile flags for plugins: 46# special compile flags for plugins:
45PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS) 47PLUGINFLAGS = -I$(APPSDIR)/plugins -DPLUGIN $(CFLAGS)
46 48
49# single-file plugins depend on their respective .o
50$(ROCKS1): $(BUILDDIR)/%.rock: $(BUILDDIR)/%.o
51
52# dependency for all plugins
47$(ROCKS): $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) 53$(ROCKS): $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB)
48 54
49$(PLUGINLIB): $(PLUGINLIB_OBJ) 55$(PLUGINLIB): $(PLUGINLIB_OBJ)
@@ -83,7 +89,7 @@ else
83 OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap 89 OVERLAYLDFLAGS = -T$(OVERLAYREF_LDS) -Wl,--gc-sections -Wl,-Map,$*.refmap
84endif 90endif
85 91
86$(BUILDDIR)/%.rock: $(BUILDDIR)/%.o 92$(BUILDDIR)/%.rock:
87 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ 93 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \
88 $(filter %.o, $^) \ 94 $(filter %.o, $^) \
89 $(filter %.a, $+) \ 95 $(filter %.a, $+) \
@@ -94,7 +100,7 @@ else
94 $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@ 100 $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@
95endif 101endif
96 102
97$(BUILDDIR)/%.refmap: $(BUILDDIR)/%.o $(APPSDIR)/plugin.h $(OVERLAYREF_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB) 103$(BUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(OVERLAYREF_LDS) $(PLUGINLIB) $(PLUGINBITMAPLIB)
98 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o /dev/null \ 104 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o /dev/null \
99 $(filter %.o, $^) \ 105 $(filter %.o, $^) \
100 $(filter %.a, $+) \ 106 $(filter %.a, $+) \
diff --git a/apps/plugins/reversi/reversi.make b/apps/plugins/reversi/reversi.make
index 0e7b38842b..52a97fa1ba 100644
--- a/apps/plugins/reversi/reversi.make
+++ b/apps/plugins/reversi/reversi.make
@@ -19,15 +19,3 @@ REVERSI_OBJ := $(call c2obj, $(REVERSI_SRC))
19OTHER_SRC += $(REVERSI_SRC) 19OTHER_SRC += $(REVERSI_SRC)
20 20
21$(REVERSIBUILDDIR)/reversi.rock: $(REVERSI_OBJ) 21$(REVERSIBUILDDIR)/reversi.rock: $(REVERSI_OBJ)
22# for some reason, this doesn't match the implicit rule in plugins.make,
23# so we have to duplicate the link command here
24 $(call PRINTS,LD $(@F))
25 $(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \
26 $(filter %.o, $^) \
27 $(filter %.a, $^) \
28 -lgcc $(PLUGINLDFLAGS)
29ifdef SIMVER
30 $(SILENT)cp $*.elf $@
31else
32 $(SILENT)$(OC) -O binary $*.elf $@
33endif