Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: building/distributing plugins separately (Re: make file help please)

building/distributing plugins separately (Re: make file help please)

From: Frederic Devernay <frederic.devernay_at_m4x.org>
Date: 2006-03-03

>> I am working on a plugin in a cygwin h120 sim and I am tired of
>> waiting for make to find out that nothing else has changed apart from
>> the plugin itself.

I think the clean way to develop a plugin would be to be able to build
it from another directory than the rockbox build dir. Linux developpers
may think about how kernel modules can be built from any directory,
making it easier to distribute them separately.

Here's how I had to fiddle with rockbox's make variables to do so. As
you see, there are many hacks in there, especially concerning the
pluginlink.lds file. It would be nice if we could just define the SRC
variable, the BUILDDIR (this makefile works with simulators too), and
then include a standard Makefile...

BUILDDIR=/home/devernay/rockbox/iriver
include $(BUILDDIR)/Makefile

GCCOPTS += $(DELUXE) -O2

export OBJDIR=$(PWD)

SRC=asteroids.c
SUBDIRS=

all: $(SRC:.c=.rock)

clean:
         $(RM) pluginlink.lds $(SRC:.c=.elf) $(SRC:.c=.map) \
          $(SRC:.c=.o) $(SRC:.c=.rock) *~ \#*\

install: all
         @if [ -d $(BUILDDIR)/archos ]; then \
           echo "Installing $(SRC:.c=.rock) in \
$(BUILDDIR)/archos/.rockbox/rocks" \
           install -d $(BUILDDIR)/archos/.rockbox/rocks; \
           for f in $(SRC:.c=.rock); do \
             install -m 755 $$f $(BUILDDIR)/archos/.rockbox/rocks/$$f; \
           done \
         else \
           echo "*** You must install $(SRC:.c=.rock) manually in the \
.rockbox/rocks directory on your player"; \
         fi

$(SRC:.c=.rock): vsm.c game.c rom.h
         $(SILENT)ln -sf $(BUILDDIR)/apps/plugins/pluginlink.lds .
         @$(MAKE) -C $(APPSDIR)/plugins VPATH="$(PWD)" \
          SRC="$(SRC)" SUBDIRS="$(SUBDIRS)" BITMAPLIBS="" V=1
Received on Fri Mar 3 10:07:58 2006


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa