summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-05-18 23:17:53 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-05-18 23:17:53 +0000
commitdefca5b0613b16036fb4cd70095d2a4ef8c46c83 (patch)
tree2ec87662b9beccdb002945964f4c485b456ca3b1 /apps
parent7da08a6729cbf00588e4bb7ce40786928f4f67c7 (diff)
downloadrockbox-defca5b0613b16036fb4cd70095d2a4ef8c46c83.tar.gz
rockbox-defca5b0613b16036fb4cd70095d2a4ef8c46c83.zip
Further adjustments for the plugin library
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4634 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/Makefile1
-rw-r--r--apps/plugins/Makefile18
-rw-r--r--apps/plugins/lib/Makefile2
3 files changed, 14 insertions, 7 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 319ed316bb..bd00a0a204 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -97,6 +97,7 @@ all : $(OBJDIR)/$(OUTNAME) $(OBJDIR)/rockbox.ucl rocks
97endif 97endif
98 98
99rocks: 99rocks:
100 $(MAKE) -C plugins/lib TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEM}
100 $(MAKE) -C plugins TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEM} 101 $(MAKE) -C plugins TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEM}
101 102
102$(OBJDIR)/librockbox.a: 103$(OBJDIR)/librockbox.a:
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile
index fb54d8d4ac..940f74f506 100644
--- a/apps/plugins/Makefile
+++ b/apps/plugins/Makefile
@@ -12,8 +12,10 @@ OC = sh-elf-objcopy
12 12
13FIRMWARE = ../../firmware 13FIRMWARE = ../../firmware
14 14
15INCLUDES = -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I.. 15INCLUDES = -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I$(FIRMWARE)/common \
16CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEM} 16-I$(FIRMWARE)/drivers -I.. -Ilib
17CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes \
18$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEM}
17 19
18LDS := plugin.lds 20LDS := plugin.lds
19LINKFILE := $(OBJDIR)/pluginlink.lds 21LINKFILE := $(OBJDIR)/pluginlink.lds
@@ -30,8 +32,8 @@ no_configure:
30 @echo "http://rockbox.haxx.se/docs/how_to_compile.html" 32 @echo "http://rockbox.haxx.se/docs/how_to_compile.html"
31endif 33endif
32 34
33$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) 35$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(OBJDIR)/libplugin.a
34 $(CC) -O -nostdlib -o $@ $< -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map 36 $(CC) -O -nostdlib -o $@ $< -L$(OBJDIR) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map
35 37
36$(OBJDIR)/%.rock : $(OBJDIR)/%.elf 38$(OBJDIR)/%.rock : $(OBJDIR)/%.elf
37 $(OC) -O binary $< $@ 39 $(OC) -O binary $< $@
@@ -39,8 +41,11 @@ $(OBJDIR)/%.rock : $(OBJDIR)/%.elf
39$(OBJDIR)/%.o: %.c ../plugin.h Makefile 41$(OBJDIR)/%.o: %.c ../plugin.h Makefile
40 $(CC) $(CFLAGS) -c $< -o $@ 42 $(CC) $(CFLAGS) -c $< -o $@
41 43
42all: $(ROCKS) 44all: $(OBJDIR)/libplugin.a $(ROCKS)
43 @echo done 45 echo "done"
46
47$(OBJDIR)/libplugin.a:
48 $(MAKE) -C lib TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEM}
44 49
45# MEM should be passed on to this makefile with the chosen memory size given 50# MEM should be passed on to this makefile with the chosen memory size given
46# in number of MB 51# in number of MB
@@ -49,3 +54,4 @@ $(LINKFILE): $(LDS)
49 54
50clean: 55clean:
51 -rm -f $(ROCKS) $(LINKFILE) 56 -rm -f $(ROCKS) $(LINKFILE)
57 $(MAKE) -C lib clean
diff --git a/apps/plugins/lib/Makefile b/apps/plugins/lib/Makefile
index 3fbd812c23..f4d3cff990 100644
--- a/apps/plugins/lib/Makefile
+++ b/apps/plugins/lib/Makefile
@@ -73,7 +73,7 @@ clean:
73$(OBJDIR)/$(DEPS)/%.d: %.c 73$(OBJDIR)/$(DEPS)/%.d: %.c
74 @$(SHELL) -c 'for d in $(DEPDIRS); do { if [ ! -d $(OBJDIR)/$$d ]; then mkdir $(OBJDIR)/$$d; fi; }; done' 74 @$(SHELL) -c 'for d in $(DEPDIRS); do { if [ ! -d $(OBJDIR)/$$d ]; then mkdir $(OBJDIR)/$$d; fi; }; done'
75 @echo "Updating dependencies for $<" 75 @echo "Updating dependencies for $<"
76 $(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \ 76 @$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \
77 |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \ 77 |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \
78 [ -s $@ ] || rm -f $@' 78 [ -s $@ ] || rm -f $@'
79 79