diff options
Diffstat (limited to 'apps/plugins/goban/goban.make')
-rw-r--r-- | apps/plugins/goban/goban.make | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/apps/plugins/goban/goban.make b/apps/plugins/goban/goban.make index f3f96ff5c6..b8866fbc4f 100644 --- a/apps/plugins/goban/goban.make +++ b/apps/plugins/goban/goban.make | |||
@@ -8,15 +8,41 @@ | |||
8 | # | 8 | # |
9 | 9 | ||
10 | 10 | ||
11 | GOBANSRCDIR := $(APPSDIR)/plugins/goban | 11 | GOBAN_SRCDIR := $(APPSDIR)/plugins/goban |
12 | GOBANBUILDDIR := $(BUILDDIR)/apps/plugins/goban | 12 | GOBAN_BUILDDIR := $(BUILDDIR)/apps/plugins/goban |
13 | 13 | ||
14 | ROCKS += $(GOBANBUILDDIR)/goban.rock | 14 | GOBAN_SRC := $(call preprocess, $(GOBAN_SRCDIR)/SOURCES) |
15 | |||
16 | |||
17 | GOBAN_SRC := $(call preprocess, $(GOBANSRCDIR)/SOURCES) | ||
18 | GOBAN_OBJ := $(call c2obj, $(GOBAN_SRC)) | 15 | GOBAN_OBJ := $(call c2obj, $(GOBAN_SRC)) |
19 | 16 | ||
20 | OTHER_SRC += $(GOBAN_SRC) | 17 | OTHER_SRC += $(GOBAN_SRC) |
21 | 18 | ||
22 | $(GOBANBUILDDIR)/goban.rock: $(GOBAN_OBJ) | 19 | ifndef SIMVER |
20 | ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) | ||
21 | ### archos recorder targets | ||
22 | GOBAN_INLDS := $(GOBAN_SRCDIR)/archos.lds | ||
23 | ROCKS += $(GOBAN_BUILDDIR)/goban.ovl | ||
24 | else | ||
25 | ### all other targets | ||
26 | GOBAN_INLDS := $(APPSDIR)/plugins/plugin.lds | ||
27 | ROCKS += $(GOBAN_BUILDDIR)/goban.rock | ||
28 | endif | ||
29 | GOBAN_OVLFLAGS = -T$(GOBAN_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map | ||
30 | GOBAN_OUTLDS = $(GOBAN_BUILDDIR)/goban.lds | ||
31 | else | ||
32 | ### simulator | ||
33 | ROCKS += $(GOBAN_BUILDDIR)/goban.rock | ||
34 | GOBAN_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile | ||
35 | endif | ||
36 | |||
37 | $(GOBAN_OUTLDS): $(GOBAN_INLDS) $(GOBAN_OBJ) | ||
38 | $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@) | ||
39 | |||
40 | $(GOBAN_BUILDDIR)/goban.rock: $(GOBAN_OBJ) $(GOBAN_OUTLDS) | ||
41 | |||
42 | $(GOBAN_BUILDDIR)/goban.ovl: $(GOBAN_OBJ) $(GOBAN_OUTLDS) | ||
43 | $(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \ | ||
44 | $(filter %.o, $^) \ | ||
45 | $(filter %.a, $^) \ | ||
46 | -lgcc $(GOBAN_OVLFLAGS) | ||
47 | $(call PRINTS,LD $(@F))$(OC) -O binary $(basename $@).elf $@ | ||
48 | |||