diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-05-18 23:17:53 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-05-18 23:17:53 +0000 |
commit | defca5b0613b16036fb4cd70095d2a4ef8c46c83 (patch) | |
tree | 2ec87662b9beccdb002945964f4c485b456ca3b1 /apps/plugins | |
parent | 7da08a6729cbf00588e4bb7ce40786928f4f67c7 (diff) | |
download | rockbox-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/plugins')
-rw-r--r-- | apps/plugins/Makefile | 18 | ||||
-rw-r--r-- | apps/plugins/lib/Makefile | 2 |
2 files changed, 13 insertions, 7 deletions
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 | ||
13 | FIRMWARE = ../../firmware | 13 | FIRMWARE = ../../firmware |
14 | 14 | ||
15 | INCLUDES = -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I.. | 15 | INCLUDES = -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I$(FIRMWARE)/common \ |
16 | CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEM} | 16 | -I$(FIRMWARE)/drivers -I.. -Ilib |
17 | CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes \ | ||
18 | $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEM} | ||
17 | 19 | ||
18 | LDS := plugin.lds | 20 | LDS := plugin.lds |
19 | LINKFILE := $(OBJDIR)/pluginlink.lds | 21 | LINKFILE := $(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" |
31 | endif | 33 | endif |
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 | ||
42 | all: $(ROCKS) | 44 | all: $(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 | ||
50 | clean: | 55 | clean: |
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 | ||