summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-07-10 13:49:49 +0000
committerThomas Martitz <kugel@rockbox.org>2010-07-10 13:49:49 +0000
commit57613ea5fafb8ba4555755074e7d6ad768fb8a68 (patch)
tree7e0d15688e3cf69718e2640eb6bf7b1a1e8c7661 /tools
parente87ff2bf91b65d51f41f7db4df3632a30748002d (diff)
downloadrockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.tar.gz
rockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.tar.bz2
rockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.zip
Rename/change SIMVER to APP_TYPE in the Makefiles.
SIMVER was really only used to detect a simulator build. With APP_TYPE you can now differentiate between simulator, application, checkwps and database builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27372 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure18
-rw-r--r--tools/database/Makefile104
-rw-r--r--tools/root.make8
3 files changed, 79 insertions, 51 deletions
diff --git a/tools/configure b/tools/configure
index 504540505d..9f7c63f569 100755
--- a/tools/configure
+++ b/tools/configure
@@ -103,7 +103,7 @@ simcc () {
prefixtools "$CROSS_COMPILE"
ARG_ARM_THUMB=0 # can't use thumb in native builds
- simver=sdl
+ app_type=$1
winbuild=""
GCCOPTS='-W -Wall -g -fno-builtin'
GCCOPTIMIZE=''
@@ -171,7 +171,7 @@ simcc () {
[ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
sdl=`findsdl $winbuild`
- if [ $1 = "sdl" ]; then
+ if [ -n `echo $app_type | grep "sdl"` ]; then
if [ -z "$sdl" ]; then
echo "configure didn't find sdl-config, which indicates that you"
echo "don't have SDL (properly) installed. Please correct and"
@@ -233,9 +233,11 @@ EOF
echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
fi
- if [ $1 = "sdl" ]; then
+ if [ "$app_type" = "sdl-sim" ]; then
echo "Simulator environment deemed $endian endian"
- elif [ $1 = "checkwps" ]; then
+ elif [ "$app_type" = "sdl-app" ]; then
+ echo "Application environment deemed $endian endian"
+ elif [ "$app_type" = "checkwps" ]; then
echo "CheckWPS environment deemed $endian endian"
fi
@@ -2604,7 +2606,7 @@ fi
target="-DAPPLICATION"
memory=32
uname=`uname`
- simcc "sdl"
+ simcc "sdl-app"
tool="cp "
boottool="cp "
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
@@ -2855,7 +2857,7 @@ uname=`uname`
if [ "yes" = "$simulator" ]; then
# setup compiler and things for simulator
- simcc "sdl"
+ simcc "sdl-sim"
if [ -d "simdisk" ]; then
echo "Subdirectory 'simdisk' already present"
@@ -3136,7 +3138,7 @@ sed > Makefile \
-e "s<@FIRMDIR@<${firmdir}<g" \
-e "s<@TOOLSDIR@<${toolsdir}<g" \
-e "s<@APPS@<${apps}<g" \
- -e "s<@SIMVER@<${simver}<g" \
+ -e "s<@APP_TYPE@<${app_type}<g" \
-e "s<@GCCVER@<${gccver}<g" \
-e "s<@GCCNUM@<${gccnum}<g" \
-e "s<@UNAME@<${uname}<g" \
@@ -3202,7 +3204,7 @@ export DLLWRAP=@DLLWRAP@
export RANLIB=@RANLIB@
export PREFIX=@PREFIX@
export PROFILE_OPTS=@PROFILE_OPTS@
-export SIMVER=@SIMVER@
+export APP_TYPE=@APP_TYPE@
export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
export GCCOPTS=@GCCOPTS@
export TARGET_INC=@TARGET_INC@
diff --git a/tools/database/Makefile b/tools/database/Makefile
index 5828b20c09..09b58b5954 100644
--- a/tools/database/Makefile
+++ b/tools/database/Makefile
@@ -1,43 +1,69 @@
-ifndef V
-SILENT = @
-endif
-INCLUDE = -I../../firmware/export \
- -I../../apps -I../../apps/gui -I../../uisimulator/sdl -I/usr/include/SDL
-FIRMINC = -I../../firmware/include -fno-builtin
-DEFINES = -D__PCTOOL__ -DHAVE_TAGCACHE -DSIMULATOR -DCONFIG_CODEC=1 \
- -DROCKBOX_LITTLE_ENDIAN -DROCKBOX_DIR=\".rockbox\" -DROCKBOX_HAS_LOGF \
- -DCONFIG_CODEC=1
-CFLAGS = -g $(INCLUDE) $(DEFINES) -Wno-pointer-sign
+## Automatically generated. http://www.rockbox.org/
-SRC = database.c tagcache.c replaygain.c \
- metadata.c metadata_common.c mp3data.c \
- a52.c mp3.c adx.c mp4.c aiff.c mpc.c ape.c ogg.c \
- asap.c sid.c asf.c spc.c flac.c vorbis.c wave.c \
- mod.c wavpack.c monkeys.c rm.c nsf.c smaf.c \
- logf.c unicode.c ctype.c structec.c crc32.c io.c \
- misc.c strlcpy.c fixedpoint.c
+export ROOTDIR=/home/kugel/rbdev/rockbox-git
+export FIRMDIR=$(ROOTDIR)/firmware
+export APPSDIR=$(ROOTDIR)/tools/database
+export TOOLSDIR=$(ROOTDIR)/tools
+export DOCSDIR=$(ROOTDIR)/docs
+export MANUALDIR=${ROOTDIR}/manual
+export DEBUG=
+export MODELNAME=iriverh300
+export ARCHOSROM=
+export FLASHFILE=
+export TARGET_ID=10
+export TARGET=-DIRIVER_H300
+export CPU=
+export MANUFACTURER=iriver
+export OBJDIR=/home/kugel/rbdev/rockbox-git/tools/database
+export BUILDDIR=/home/kugel/rbdev/rockbox-git/tools/database
+export LANGUAGE=english
+export VOICELANGUAGE=
+export MEMORYSIZE=32
+export BUILDDATE:=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
+export MKFIRMWARE=/home/kugel/rbdev/rockbox-git/tools/scramble -add=h300
+export BMP2RB_MONO=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0
+export BMP2RB_NATIVE=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 4
+export BMP2RB_REMOTEMONO=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0
+export BMP2RB_REMOTENATIVE=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0
+export BINARY=database.iriverh300
+export APPEXTRA=recorder:gui:radio
+export ENABLEDPLUGINS=yes
+export SOFTWARECODECS=yes
+export EXTRA_DEFINES=
+export HOSTCC=/usr/bin/gcc
+export HOSTAR=/usr/bin/ar
+export CC=/usr/bin/ccache /usr/bin/gcc
+export LD=/usr/bin/ar
+export AR=/usr/bin/ar
+export AS=/usr/bin/as
+export OC=/usr/bin/objcopy
+export WINDRES=windres
+export DLLTOOL=dlltool
+export DLLWRAP=dllwrap
+export RANLIB=/usr/bin/ranlib
+export PREFIX=
+export PROFILE_OPTS=
+export APP_TYPE=database
+export SIMDIR=$(ROOTDIR)/uisimulator/sdl
+export GCCOPTS= -Wno-pointer-sign -Wno-override-init
+export TARGET_INC=
+export LOADADDRESS=
+export SHARED_FLAG=-shared
+export LDOPTS=-lm -ldl -L/home/kugel/.sdl/lib -Wl,-rpath,/home/kugel/.sdl/lib -lSDL -lpthread
+export GLOBAL_LDOPTS= -Wl,-z,defs
+export GCCVER=4.4.3
+export GCCNUM=404
+export UNAME=Linux
+export MANUALDEV=iriverh300
+export TTS_OPTS=
+export TTS_ENGINE=
+export ENC_OPTS=
+export ENCODER=
+export USE_ELF=
+export RBDIR=.rockbox
+export SDLCONFIG=/home/kugel/.sdl/bin/sdl-config
-OBJ = $(SRC:.c=.o)
+CONFIGURE_OPTIONS=--target=$(MODELNAME) --ram=$(MEMORYSIZE) --rbdir=$(RBDIR) --type=d --prefix=$(PREFIX)
-# source code search path
-VPATH = ../../apps ../../apps/metadata ../../firmware/common ../../firmware/ \
- ../../uisimulator/common
+include $(TOOLSDIR)/root.make
-TARGET= database
-
-all: $(TARGET)
-
-%.o : ../../uisimulator/common/%.c
- @echo CC $(<F)
- $(SILENT)$(CC) $(CFLAGS) -c -o $@ $<
-
-%.o : %.c $<
- @echo CC $(<F)
- $(SILENT)$(CC) $(FIRMINC) $(CFLAGS) -c -o $@ $<
-
-database: $(OBJ)
- @echo LD $@
- $(SILENT)$(CC) -g -ldl -o $@ $+
-
-clean:
- rm -f $(OBJ) $(TARGET)
diff --git a/tools/root.make b/tools/root.make
index 2b4dfb6bb2..e53c452022 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -24,7 +24,7 @@ TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
ifeq (,$(PREFIX))
-ifdef SIMVER
+ifeq ($(APP_TYPE),sdl-sim)
# for sims, set simdisk/ as default
PREFIX = simdisk
INSTALL = --install="$(PREFIX)"
@@ -85,7 +85,7 @@ else
include $(APPSDIR)/plugins/plugins.make
endif
- ifdef SIMVER
+ ifdef APP_TYPE
include $(ROOTDIR)/uisimulator/uisimulator.make
endif
endif # bootloader
@@ -141,7 +141,7 @@ ifeq (,$(findstring bootloader,$(APPSDIR)))
OBJ += $(LANG_O)
-ifndef SIMVER
+ifndef APP_TYPE
## target build
CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h
@@ -221,7 +221,7 @@ $(MAXOUTFILE):
$(BUILDDIR)/rombox.iriver: $(BUILDDIR)/rombox.bin
$(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@
-endif # !SIMVER
+endif # !APP_TYPE
endif # !bootloader