summaryrefslogtreecommitdiff
path: root/apps/plugins/Makefile
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/plugins/Makefile
parent7da08a6729cbf00588e4bb7ce40786928f4f67c7 (diff)
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/Makefile')
-rw-r--r--apps/plugins/Makefile18
1 files changed, 12 insertions, 6 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
FIRMWARE = ../../firmware
-INCLUDES = -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I..
-CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEM}
+INCLUDES = -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I$(FIRMWARE)/common \
+-I$(FIRMWARE)/drivers -I.. -Ilib
+CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes \
+$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEM}
LDS := plugin.lds
LINKFILE := $(OBJDIR)/pluginlink.lds
@@ -30,8 +32,8 @@ no_configure:
@echo "http://rockbox.haxx.se/docs/how_to_compile.html"
endif
-$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE)
- $(CC) -O -nostdlib -o $@ $< -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map
+$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(OBJDIR)/libplugin.a
+ $(CC) -O -nostdlib -o $@ $< -L$(OBJDIR) -lplugin -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$*.map
$(OBJDIR)/%.rock : $(OBJDIR)/%.elf
$(OC) -O binary $< $@
@@ -39,8 +41,11 @@ $(OBJDIR)/%.rock : $(OBJDIR)/%.elf
$(OBJDIR)/%.o: %.c ../plugin.h Makefile
$(CC) $(CFLAGS) -c $< -o $@
-all: $(ROCKS)
- @echo done
+all: $(OBJDIR)/libplugin.a $(ROCKS)
+ echo "done"
+
+$(OBJDIR)/libplugin.a:
+ $(MAKE) -C lib TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEM}
# MEM should be passed on to this makefile with the chosen memory size given
# in number of MB
@@ -49,3 +54,4 @@ $(LINKFILE): $(LDS)
clean:
-rm -f $(ROCKS) $(LINKFILE)
+ $(MAKE) -C lib clean