summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/rockboy.make
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
commitc6b3d38a156dd624760a8eb1bb374affd43b4f2a (patch)
tree493eba929e2396d86cf4f077709aa09fe172cd35 /apps/plugins/rockboy/rockboy.make
parentf66c30346783a400a029bedcd60ab67c81c34a07 (diff)
downloadrockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.tar.gz
rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.zip
New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/rockboy.make')
-rw-r--r--apps/plugins/rockboy/rockboy.make53
1 files changed, 53 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/rockboy.make b/apps/plugins/rockboy/rockboy.make
new file mode 100644
index 0000000000..62196cf0b7
--- /dev/null
+++ b/apps/plugins/rockboy/rockboy.make
@@ -0,0 +1,53 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
8#
9
10ROCKBOY_SRCDIR = $(APPSDIR)/plugins/rockboy
11ROCKBOY_OBJDIR = $(BUILDDIR)/apps/plugins/rockboy
12
13ROCKBOY_SRC := $(call preprocess, $(ROCKBOY_SRCDIR)/SOURCES)
14ROCKBOY_OBJ := $(call c2obj, $(ROCKBOY_SRC))
15ROCKBOY_OBJ += $(ROCKBOY_OBJDIR)/sscanf.o
16
17OTHER_SRC += $(ROCKBOY_SRC)
18
19ifndef SIMVER
20ifneq (,$(findstring RECORDER,$(TARGET)))
21 ## archos recorder targets
22 ROCKBOY_INLDS := $(ROCKBOY_SRCDIR)/archos.lds
23 ROCKS += $(ROCKBOY_OBJDIR)/rockboy.ovl
24else
25 ### all other targets
26 ROCKBOY_INLDS := $(APPSDIR)/plugins/plugin.lds
27 ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
28endif
29 ROCKBOY_OVLFLAGS = -T$(ROCKBOY_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(ROCKBOY_OBJDIR)/$*.map
30 ROCKBOY_OUTLDS = $(ROCKBOY_OBJDIR)/rockboy.lds
31else
32 ### simulator
33 ROCKS += $(ROCKBOY_OBJDIR)/rockboy.rock
34 ROCKBOY_OVLFLAGS = $(SHARED_FLAG) # <-- from Makefile
35endif
36
37$(ROCKBOY_OBJDIR)/sscanf.c: $(FIRMDIR)/common/sscanf.c
38 $(SILENT)mkdir -p $(dir $@)
39 $(call PRINTS,CP $<)cp $< $@
40
41$(ROCKBOY_OBJDIR)/sscanf.o: $(ROCKBOY_OBJDIR)/sscanf.c
42
43$(ROCKBOY_OUTLDS): $(ROCKBOY_INLDS) $(ROCKBOY_OBJ)
44 $(call PRINTS,PP $(<F))$(call preprocess2file,$<,$@)
45
46$(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB)
47
48$(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) $(PLUGINBITMAPLIB)
49 $(SILENT)$(CC) $(PLUGINFLAGS) -o $(ROCKBOY_OBJDIR)/$*.elf \
50 $(filter %.o, $^) \
51 $(filter %.a, $^) \
52 -lgcc $(ROCKBOY_OVLFLAGS)
53 $(call PRINTS,LD $(@F))$(OC) -O binary $(ROCKBOY_OBJDIR)/$*.elf $@