summaryrefslogtreecommitdiff
path: root/apps/plugins/Makefile
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-06-29 16:33:04 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-06-29 16:33:04 +0000
commitba371fb595affd68c823926b85718d1d613dc7d3 (patch)
treecfda303d0603d623cdb12f3928905d3ae02f1d87 /apps/plugins/Makefile
parent9bcbe3fd723d23a709873a0855f27b86bc5c96f1 (diff)
downloadrockbox-ba371fb595affd68c823926b85718d1d613dc7d3.zip
rockbox-ba371fb595affd68c823926b85718d1d613dc7d3.tar.gz
rockbox-ba371fb595affd68c823926b85718d1d613dc7d3.tar.bz2
rockbox-ba371fb595affd68c823926b85718d1d613dc7d3.tar.xz
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
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r--apps/plugins/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile
new file mode 100644
index 0000000..4c02207
--- /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)
and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SPEEX_PREPROCESS_H #define SPEEX_PREPROCESS_H /** @defgroup SpeexPreprocessState SpeexPreprocessState: The Speex preprocessor * This is the Speex preprocessor. The preprocess can do noise suppression, * residual echo suppression (after using the echo canceller), automatic * gain control (AGC) and voice activity detection (VAD). * @{ */ #include "speex_types.h" #ifdef __cplusplus extern "C" { #endif /** State of the preprocessor (one per channel). Should never be accessed directly. */ struct SpeexPreprocessState_; /** State of the preprocessor (one per channel). Should never be accessed directly. */ typedef struct SpeexPreprocessState_ SpeexPreprocessState; /** Creates a new preprocessing state. You MUST create one state per channel processed. * @param frame_size Number of samples to process at one time (should correspond to 10-20 ms). Must be * the same value as that used for the echo canceller for residual echo cancellation to work. * @param sampling_rate Sampling rate used for the input. * @return Newly created preprocessor state */ SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate); /** Destroys a preprocessor state * @param st Preprocessor state to destroy */ void speex_preprocess_state_destroy(SpeexPreprocessState *st); /** Preprocess a frame