From ba371fb595affd68c823926b85718d1d613dc7d3 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Sun, 29 Jun 2003 16:33:04 +0000 Subject: Added plugin loader. Moved games, demos and the text viewer to loadable plugins. Copy your *.rock files to /.rockbox/rocks/ git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3769 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 apps/plugins/Makefile (limited to 'apps/plugins/Makefile') diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile new file mode 100644 index 0000000000..4c02207016 --- /dev/null +++ b/apps/plugins/Makefile @@ -0,0 +1,45 @@ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id$ +# + +CC = sh-elf-gcc +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) + +LINKFILE = plugin.lds + +SRC := $(wildcard *.c) +ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock) + +ifndef OBJDIR +no_configure: + @echo "Don't run make here. Run the tools/configure script from your own build" + @echo "directory, then run make there." + @echo + @echo "More help on how to build rockbox can be found here:" + @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,$*.map + +$(OBJDIR)/%.rock : $(OBJDIR)/%.elf + $(OC) -O binary $< $@ + +$(OBJDIR)/%.o: %.c ../plugin.h Makefile + $(CC) $(CFLAGS) -c $< -o $@ + +all: $(ROCKS) + @echo done + +clean: + -rm -f $(ROCKS) -- cgit v1.2.3