diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2012-03-03 19:37:40 +0100 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2012-03-03 20:19:08 +0100 |
commit | 466a7c6a405f80cd8e01ebf0a70eb406863a38f1 (patch) | |
tree | acd8dcec239d7407a69df7f20b9ad7f3b10f4200 | |
parent | 13a7c9ac70bfeed574d38705ab568c2085ca77e7 (diff) | |
download | rockbox-466a7c6a405f80cd8e01ebf0a70eb406863a38f1.tar.gz rockbox-466a7c6a405f80cd8e01ebf0a70eb406863a38f1.zip |
Integrate the warble tool in the regular build system.
Only sdl app builds work properly for now.
Change-Id: I7807d42f69b8577b401e48cdc63de71e54f49217
-rw-r--r-- | firmware/core_alloc.c | 2 | ||||
-rw-r--r-- | firmware/export/system.h | 1 | ||||
-rw-r--r-- | lib/rbcodec/test/SOURCES | 49 | ||||
-rw-r--r-- | lib/rbcodec/test/warble.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/test/warble.make | 37 | ||||
-rw-r--r-- | tools/checkwps/checkwps.make | 2 | ||||
-rwxr-xr-x | tools/configure | 13 | ||||
-rw-r--r-- | tools/root.make | 6 |
8 files changed, 110 insertions, 4 deletions
diff --git a/firmware/core_alloc.c b/firmware/core_alloc.c index 34ed48b39f..47faed6e95 100644 --- a/firmware/core_alloc.c +++ b/firmware/core_alloc.c | |||
@@ -9,7 +9,7 @@ | |||
9 | struct buflib_context core_ctx; | 9 | struct buflib_context core_ctx; |
10 | 10 | ||
11 | /* defined in linker script */ | 11 | /* defined in linker script */ |
12 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 12 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(__PCTOOL__) |
13 | #if defined(IPOD_VIDEO) && !defined(BOOTLOADER) | 13 | #if defined(IPOD_VIDEO) && !defined(BOOTLOADER) |
14 | extern unsigned char *audiobufend_lds[]; | 14 | extern unsigned char *audiobufend_lds[]; |
15 | unsigned char *audiobufend; | 15 | unsigned char *audiobufend; |
diff --git a/firmware/export/system.h b/firmware/export/system.h index b33edc6d3e..d93d10c9e2 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -192,6 +192,7 @@ enum { | |||
192 | #include "system-sdl.h" | 192 | #include "system-sdl.h" |
193 | #define NEED_GENERIC_BYTESWAPS | 193 | #define NEED_GENERIC_BYTESWAPS |
194 | #elif defined(__PCTOOL__) | 194 | #elif defined(__PCTOOL__) |
195 | #include "system-sdl.h" | ||
195 | #define NEED_GENERIC_BYTESWAPS | 196 | #define NEED_GENERIC_BYTESWAPS |
196 | #endif | 197 | #endif |
197 | #include "bitswap.h" | 198 | #include "bitswap.h" |
diff --git a/lib/rbcodec/test/SOURCES b/lib/rbcodec/test/SOURCES new file mode 100644 index 0000000000..467115e0d6 --- /dev/null +++ b/lib/rbcodec/test/SOURCES | |||
@@ -0,0 +1,49 @@ | |||
1 | warble.c | ||
2 | ../../../apps/metadata.c | ||
3 | ../../../apps/replaygain.c | ||
4 | ../../../firmware/buflib.c | ||
5 | ../../../firmware/core_alloc.c | ||
6 | ../../../firmware/common/strlcpy.c | ||
7 | ../../../firmware/common/unicode.c | ||
8 | ../../../firmware/common/structec.c | ||
9 | ../../../apps/mp3data.c | ||
10 | ../../../apps/fixedpoint.c | ||
11 | ../../../uisimulator/common/io.c | ||
12 | ../../../apps/compressor.c | ||
13 | ../../../apps/dsp.c | ||
14 | ../../../apps/eq.c | ||
15 | ../../../apps/tdspeed.c | ||
16 | ../../../apps/metadata/a52.c | ||
17 | ../../../apps/metadata/adx.c | ||
18 | ../../../apps/metadata/aiff.c | ||
19 | ../../../apps/metadata/ape.c | ||
20 | ../../../apps/metadata/asap.c | ||
21 | ../../../apps/metadata/asf.c | ||
22 | ../../../apps/metadata/au.c | ||
23 | ../../../apps/metadata/ay.c | ||
24 | ../../../apps/metadata/flac.c | ||
25 | ../../../apps/metadata/gbs.c | ||
26 | ../../../apps/metadata/hes.c | ||
27 | ../../../apps/metadata/id3tags.c | ||
28 | ../../../apps/metadata/kss.c | ||
29 | ../../../apps/metadata/metadata_common.c | ||
30 | ../../../apps/metadata/mod.c | ||
31 | ../../../apps/metadata/monkeys.c | ||
32 | ../../../apps/metadata/mp3.c | ||
33 | ../../../apps/metadata/mp4.c | ||
34 | ../../../apps/metadata/mpc.c | ||
35 | ../../../apps/metadata/nsf.c | ||
36 | ../../../apps/metadata/ogg.c | ||
37 | ../../../apps/metadata/oma.c | ||
38 | ../../../apps/metadata/rm.c | ||
39 | ../../../apps/metadata/sgc.c | ||
40 | ../../../apps/metadata/sid.c | ||
41 | ../../../apps/metadata/smaf.c | ||
42 | ../../../apps/metadata/spc.c | ||
43 | ../../../apps/metadata/tta.c | ||
44 | ../../../apps/metadata/vgm.c | ||
45 | ../../../apps/metadata/vorbis.c | ||
46 | ../../../apps/metadata/vox.c | ||
47 | ../../../apps/metadata/wave.c | ||
48 | ../../../apps/metadata/wavpack.c | ||
49 | |||
diff --git a/lib/rbcodec/test/warble.c b/lib/rbcodec/test/warble.c index 2cba6c0d59..e3d9456f4d 100644 --- a/lib/rbcodec/test/warble.c +++ b/lib/rbcodec/test/warble.c | |||
@@ -358,9 +358,11 @@ static void perform_config(void) | |||
358 | codec_action_param = atoi(val); | 358 | codec_action_param = atoi(val); |
359 | } else if (!strncmp(name, "tempo=", 6)) { | 359 | } else if (!strncmp(name, "tempo=", 6)) { |
360 | dsp_set_timestretch(atof(val) * PITCH_SPEED_100); | 360 | dsp_set_timestretch(atof(val) * PITCH_SPEED_100); |
361 | #ifdef HAVE_SW_VOLUME_CONTROL | ||
361 | } else if (!strncmp(name, "vol=", 4)) { | 362 | } else if (!strncmp(name, "vol=", 4)) { |
362 | global_settings.volume = atoi(val); | 363 | global_settings.volume = atoi(val); |
363 | dsp_callback(DSP_CALLBACK_SET_SW_VOLUME, 0); | 364 | dsp_callback(DSP_CALLBACK_SET_SW_VOLUME, 0); |
365 | #endif | ||
364 | } else { | 366 | } else { |
365 | fprintf(stderr, "error: unrecognized config \"%.*s\"\n", | 367 | fprintf(stderr, "error: unrecognized config \"%.*s\"\n", |
366 | (int)(eq - name), name); | 368 | (int)(eq - name), name); |
@@ -775,7 +777,9 @@ static void print_help(const char *progname) | |||
775 | " rate=<n> Multiply rate by <n> [1.0]\n" | 777 | " rate=<n> Multiply rate by <n> [1.0]\n" |
776 | " seek=<n> Seek <n> ms into the file\n" | 778 | " seek=<n> Seek <n> ms into the file\n" |
777 | " tempo=<n> Timestretch by <n> [1.0]\n" | 779 | " tempo=<n> Timestretch by <n> [1.0]\n" |
780 | #ifdef HAVE_SW_VOLUME_CONTROL | ||
778 | " vol=<n> Set volume to <n> dB [0]\n" | 781 | " vol=<n> Set volume to <n> dB [0]\n" |
782 | #endif | ||
779 | " wait=<n> Don't apply remaining configuration until\n" | 783 | " wait=<n> Don't apply remaining configuration until\n" |
780 | " <n> total samples have output\n" | 784 | " <n> total samples have output\n" |
781 | "\n" | 785 | "\n" |
diff --git a/lib/rbcodec/test/warble.make b/lib/rbcodec/test/warble.make new file mode 100644 index 0000000000..0687e05620 --- /dev/null +++ b/lib/rbcodec/test/warble.make | |||
@@ -0,0 +1,37 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | |||
11 | include $(ROOTDIR)/tools/functions.make | ||
12 | include $(ROOTDIR)/apps/codecs/codecs.make | ||
13 | |||
14 | FLAGS=-g -D__PCTOOL__ $(TARGET) -Wall | ||
15 | |||
16 | SRC= $(call preprocess, $(ROOTDIR)/lib/rbcodec/test/SOURCES) | ||
17 | |||
18 | INCLUDES += -I$(ROOTDIR)/apps -I$(ROOTDIR)/apps/codecs -I$(ROOTDIR)/apps/codecs/lib \ | ||
19 | -I$(ROOTDIR)/apps/gui -I$(ROOTDIR)/apps/metadata | ||
20 | INCLUDES += -I$(ROOTDIR)/firmware/export -I$(ROOTDIR)/firmware/include \ | ||
21 | -I$(ROOTDIR)/firmware/target/hosted \ | ||
22 | -I$(ROOTDIR)/firmware/target/hosted/sdl | ||
23 | |||
24 | GCCOPTS+=-D__PCTOOL__ -g -std=gnu99 `$(SDLCONFIG) --cflags` -DCODECDIR="\"$(CODECDIR)\"" | ||
25 | |||
26 | LIBS=`$(SDLCONFIG) --libs` -lc | ||
27 | ifneq ($(findstring MINGW,$(shell uname)),MINGW) | ||
28 | LIBS += -ldl | ||
29 | endif | ||
30 | |||
31 | .SECONDEXPANSION: # $$(OBJ) is not populated until after this | ||
32 | |||
33 | $(BUILDDIR)/$(BINARY): $(CODECS) | ||
34 | |||
35 | $(BUILDDIR)/$(BINARY): $$(OBJ) | ||
36 | @echo LD $(BINARY) | ||
37 | $(SILENT)$(HOSTCC) $(SIMFLAGS) $(LIBS) -o $@ $+ | ||
diff --git a/tools/checkwps/checkwps.make b/tools/checkwps/checkwps.make index e021024901..1e92e3d63e 100644 --- a/tools/checkwps/checkwps.make +++ b/tools/checkwps/checkwps.make | |||
@@ -15,6 +15,8 @@ INCLUDES = -I$(ROOTDIR)/apps/gui \ | |||
15 | -I$(ROOTDIR)/apps/gui/skin_engine \ | 15 | -I$(ROOTDIR)/apps/gui/skin_engine \ |
16 | -I$(ROOTDIR)/firmware/export \ | 16 | -I$(ROOTDIR)/firmware/export \ |
17 | -I$(ROOTDIR)/firmware/include \ | 17 | -I$(ROOTDIR)/firmware/include \ |
18 | -I$(ROOTDIR)/firmware/target/hosted \ | ||
19 | -I$(ROOTDIR)/firmware/target/hosted/sdl \ | ||
18 | -I$(ROOTDIR)/apps \ | 20 | -I$(ROOTDIR)/apps \ |
19 | -I$(ROOTDIR)/apps/recorder \ | 21 | -I$(ROOTDIR)/apps/recorder \ |
20 | -I$(ROOTDIR)/apps/radio \ | 22 | -I$(ROOTDIR)/apps/radio \ |
diff --git a/tools/configure b/tools/configure index 87dc78f27d..84e87c9fdf 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -3383,7 +3383,7 @@ esac | |||
3383 | if [ "$ARG_TYPE" ]; then | 3383 | if [ "$ARG_TYPE" ]; then |
3384 | btype=$ARG_TYPE | 3384 | btype=$ARG_TYPE |
3385 | else | 3385 | else |
3386 | echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool$gdbstub: (Defaults to N)" | 3386 | echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool$gdbstub: (Defaults to N)" |
3387 | btype=`input`; | 3387 | btype=`input`; |
3388 | fi | 3388 | fi |
3389 | 3389 | ||
@@ -3484,6 +3484,17 @@ fi | |||
3484 | 3484 | ||
3485 | echo "Database tool build selected" | 3485 | echo "Database tool build selected" |
3486 | ;; | 3486 | ;; |
3487 | [Ww]) | ||
3488 | uname=`uname` | ||
3489 | simcc "warble" | ||
3490 | toolset=''; | ||
3491 | t_cpu=''; | ||
3492 | GCCOPTS=''; | ||
3493 | extradefines="$extradefines -DDEBUG" | ||
3494 | output='warble.'${modelname}; | ||
3495 | archosrom=''; | ||
3496 | echo "Warble build selected" | ||
3497 | ;; | ||
3487 | *) | 3498 | *) |
3488 | if [ "$modelname" = "sansae200r" ]; then | 3499 | if [ "$modelname" = "sansae200r" ]; then |
3489 | echo "Do not use the e200R target for regular builds. Use e200 instead." | 3500 | echo "Do not use the e200R target for regular builds. Use e200 instead." |
diff --git a/tools/root.make b/tools/root.make index 74279064bf..3231b73053 100644 --- a/tools/root.make +++ b/tools/root.make | |||
@@ -87,11 +87,13 @@ ifneq (,$(findstring bootloader,$(APPSDIR))) | |||
87 | else ifneq (,$(findstring bootbox,$(APPSDIR))) | 87 | else ifneq (,$(findstring bootbox,$(APPSDIR))) |
88 | BOOTBOXLDOPTS = -Wl,--gc-sections | 88 | BOOTBOXLDOPTS = -Wl,--gc-sections |
89 | include $(APPSDIR)/bootbox.make | 89 | include $(APPSDIR)/bootbox.make |
90 | else ifneq (,$(findstring checkwps,$(APPSDIR))) | 90 | else ifneq (,$(findstring checkwps,$(APP_TYPE))) |
91 | include $(APPSDIR)/checkwps.make | 91 | include $(APPSDIR)/checkwps.make |
92 | include $(ROOTDIR)/lib/skin_parser/skin_parser.make | 92 | include $(ROOTDIR)/lib/skin_parser/skin_parser.make |
93 | else ifneq (,$(findstring database,$(APPSDIR))) | 93 | else ifneq (,$(findstring database,$(APP_TYPE))) |
94 | include $(APPSDIR)/database.make | 94 | include $(APPSDIR)/database.make |
95 | else ifneq (,$(findstring warble,$(APP_TYPE))) | ||
96 | include $(ROOTDIR)/lib/rbcodec/test/warble.make | ||
95 | else | 97 | else |
96 | include $(APPSDIR)/apps.make | 98 | include $(APPSDIR)/apps.make |
97 | include $(APPSDIR)/lang/lang.make | 99 | include $(APPSDIR)/lang/lang.make |