diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-07-10 13:49:49 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-07-10 13:49:49 +0000 |
commit | 57613ea5fafb8ba4555755074e7d6ad768fb8a68 (patch) | |
tree | 7e0d15688e3cf69718e2640eb6bf7b1a1e8c7661 /tools | |
parent | e87ff2bf91b65d51f41f7db4df3632a30748002d (diff) | |
download | rockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.tar.gz 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-x | tools/configure | 18 | ||||
-rw-r--r-- | tools/database/Makefile | 104 | ||||
-rw-r--r-- | tools/root.make | 8 |
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 () { | |||
103 | prefixtools "$CROSS_COMPILE" | 103 | prefixtools "$CROSS_COMPILE" |
104 | ARG_ARM_THUMB=0 # can't use thumb in native builds | 104 | ARG_ARM_THUMB=0 # can't use thumb in native builds |
105 | 105 | ||
106 | simver=sdl | 106 | app_type=$1 |
107 | winbuild="" | 107 | winbuild="" |
108 | GCCOPTS='-W -Wall -g -fno-builtin' | 108 | GCCOPTS='-W -Wall -g -fno-builtin' |
109 | GCCOPTIMIZE='' | 109 | GCCOPTIMIZE='' |
@@ -171,7 +171,7 @@ simcc () { | |||
171 | [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" | 171 | [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" |
172 | sdl=`findsdl $winbuild` | 172 | sdl=`findsdl $winbuild` |
173 | 173 | ||
174 | if [ $1 = "sdl" ]; then | 174 | if [ -n `echo $app_type | grep "sdl"` ]; then |
175 | if [ -z "$sdl" ]; then | 175 | if [ -z "$sdl" ]; then |
176 | echo "configure didn't find sdl-config, which indicates that you" | 176 | echo "configure didn't find sdl-config, which indicates that you" |
177 | echo "don't have SDL (properly) installed. Please correct and" | 177 | echo "don't have SDL (properly) installed. Please correct and" |
@@ -233,9 +233,11 @@ EOF | |||
233 | echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!" | 233 | echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!" |
234 | fi | 234 | fi |
235 | 235 | ||
236 | if [ $1 = "sdl" ]; then | 236 | if [ "$app_type" = "sdl-sim" ]; then |
237 | echo "Simulator environment deemed $endian endian" | 237 | echo "Simulator environment deemed $endian endian" |
238 | elif [ $1 = "checkwps" ]; then | 238 | elif [ "$app_type" = "sdl-app" ]; then |
239 | echo "Application environment deemed $endian endian" | ||
240 | elif [ "$app_type" = "checkwps" ]; then | ||
239 | echo "CheckWPS environment deemed $endian endian" | 241 | echo "CheckWPS environment deemed $endian endian" |
240 | fi | 242 | fi |
241 | 243 | ||
@@ -2604,7 +2606,7 @@ fi | |||
2604 | target="-DAPPLICATION" | 2606 | target="-DAPPLICATION" |
2605 | memory=32 | 2607 | memory=32 |
2606 | uname=`uname` | 2608 | uname=`uname` |
2607 | simcc "sdl" | 2609 | simcc "sdl-app" |
2608 | tool="cp " | 2610 | tool="cp " |
2609 | boottool="cp " | 2611 | boottool="cp " |
2610 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" | 2612 | bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" |
@@ -2855,7 +2857,7 @@ uname=`uname` | |||
2855 | 2857 | ||
2856 | if [ "yes" = "$simulator" ]; then | 2858 | if [ "yes" = "$simulator" ]; then |
2857 | # setup compiler and things for simulator | 2859 | # setup compiler and things for simulator |
2858 | simcc "sdl" | 2860 | simcc "sdl-sim" |
2859 | 2861 | ||
2860 | if [ -d "simdisk" ]; then | 2862 | if [ -d "simdisk" ]; then |
2861 | echo "Subdirectory 'simdisk' already present" | 2863 | echo "Subdirectory 'simdisk' already present" |
@@ -3136,7 +3138,7 @@ sed > Makefile \ | |||
3136 | -e "s<@FIRMDIR@<${firmdir}<g" \ | 3138 | -e "s<@FIRMDIR@<${firmdir}<g" \ |
3137 | -e "s<@TOOLSDIR@<${toolsdir}<g" \ | 3139 | -e "s<@TOOLSDIR@<${toolsdir}<g" \ |
3138 | -e "s<@APPS@<${apps}<g" \ | 3140 | -e "s<@APPS@<${apps}<g" \ |
3139 | -e "s<@SIMVER@<${simver}<g" \ | 3141 | -e "s<@APP_TYPE@<${app_type}<g" \ |
3140 | -e "s<@GCCVER@<${gccver}<g" \ | 3142 | -e "s<@GCCVER@<${gccver}<g" \ |
3141 | -e "s<@GCCNUM@<${gccnum}<g" \ | 3143 | -e "s<@GCCNUM@<${gccnum}<g" \ |
3142 | -e "s<@UNAME@<${uname}<g" \ | 3144 | -e "s<@UNAME@<${uname}<g" \ |
@@ -3202,7 +3204,7 @@ export DLLWRAP=@DLLWRAP@ | |||
3202 | export RANLIB=@RANLIB@ | 3204 | export RANLIB=@RANLIB@ |
3203 | export PREFIX=@PREFIX@ | 3205 | export PREFIX=@PREFIX@ |
3204 | export PROFILE_OPTS=@PROFILE_OPTS@ | 3206 | export PROFILE_OPTS=@PROFILE_OPTS@ |
3205 | export SIMVER=@SIMVER@ | 3207 | export APP_TYPE=@APP_TYPE@ |
3206 | export SIMDIR=\$(ROOTDIR)/uisimulator/sdl | 3208 | export SIMDIR=\$(ROOTDIR)/uisimulator/sdl |
3207 | export GCCOPTS=@GCCOPTS@ | 3209 | export GCCOPTS=@GCCOPTS@ |
3208 | export TARGET_INC=@TARGET_INC@ | 3210 | 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 @@ | |||
1 | ifndef V | 1 | ## Automatically generated. http://www.rockbox.org/ |
2 | SILENT = @ | ||
3 | endif | ||
4 | INCLUDE = -I../../firmware/export \ | ||
5 | -I../../apps -I../../apps/gui -I../../uisimulator/sdl -I/usr/include/SDL | ||
6 | FIRMINC = -I../../firmware/include -fno-builtin | ||
7 | DEFINES = -D__PCTOOL__ -DHAVE_TAGCACHE -DSIMULATOR -DCONFIG_CODEC=1 \ | ||
8 | -DROCKBOX_LITTLE_ENDIAN -DROCKBOX_DIR=\".rockbox\" -DROCKBOX_HAS_LOGF \ | ||
9 | -DCONFIG_CODEC=1 | ||
10 | CFLAGS = -g $(INCLUDE) $(DEFINES) -Wno-pointer-sign | ||
11 | 2 | ||
12 | SRC = database.c tagcache.c replaygain.c \ | 3 | export ROOTDIR=/home/kugel/rbdev/rockbox-git |
13 | metadata.c metadata_common.c mp3data.c \ | 4 | export FIRMDIR=$(ROOTDIR)/firmware |
14 | a52.c mp3.c adx.c mp4.c aiff.c mpc.c ape.c ogg.c \ | 5 | export APPSDIR=$(ROOTDIR)/tools/database |
15 | asap.c sid.c asf.c spc.c flac.c vorbis.c wave.c \ | 6 | export TOOLSDIR=$(ROOTDIR)/tools |
16 | mod.c wavpack.c monkeys.c rm.c nsf.c smaf.c \ | 7 | export DOCSDIR=$(ROOTDIR)/docs |
17 | logf.c unicode.c ctype.c structec.c crc32.c io.c \ | 8 | export MANUALDIR=${ROOTDIR}/manual |
18 | misc.c strlcpy.c fixedpoint.c | 9 | export DEBUG= |
10 | export MODELNAME=iriverh300 | ||
11 | export ARCHOSROM= | ||
12 | export FLASHFILE= | ||
13 | export TARGET_ID=10 | ||
14 | export TARGET=-DIRIVER_H300 | ||
15 | export CPU= | ||
16 | export MANUFACTURER=iriver | ||
17 | export OBJDIR=/home/kugel/rbdev/rockbox-git/tools/database | ||
18 | export BUILDDIR=/home/kugel/rbdev/rockbox-git/tools/database | ||
19 | export LANGUAGE=english | ||
20 | export VOICELANGUAGE= | ||
21 | export MEMORYSIZE=32 | ||
22 | export BUILDDATE:=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') | ||
23 | export MKFIRMWARE=/home/kugel/rbdev/rockbox-git/tools/scramble -add=h300 | ||
24 | export BMP2RB_MONO=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0 | ||
25 | export BMP2RB_NATIVE=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 4 | ||
26 | export BMP2RB_REMOTEMONO=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0 | ||
27 | export BMP2RB_REMOTENATIVE=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0 | ||
28 | export BINARY=database.iriverh300 | ||
29 | export APPEXTRA=recorder:gui:radio | ||
30 | export ENABLEDPLUGINS=yes | ||
31 | export SOFTWARECODECS=yes | ||
32 | export EXTRA_DEFINES= | ||
33 | export HOSTCC=/usr/bin/gcc | ||
34 | export HOSTAR=/usr/bin/ar | ||
35 | export CC=/usr/bin/ccache /usr/bin/gcc | ||
36 | export LD=/usr/bin/ar | ||
37 | export AR=/usr/bin/ar | ||
38 | export AS=/usr/bin/as | ||
39 | export OC=/usr/bin/objcopy | ||
40 | export WINDRES=windres | ||
41 | export DLLTOOL=dlltool | ||
42 | export DLLWRAP=dllwrap | ||
43 | export RANLIB=/usr/bin/ranlib | ||
44 | export PREFIX= | ||
45 | export PROFILE_OPTS= | ||
46 | export APP_TYPE=database | ||
47 | export SIMDIR=$(ROOTDIR)/uisimulator/sdl | ||
48 | export GCCOPTS= -Wno-pointer-sign -Wno-override-init | ||
49 | export TARGET_INC= | ||
50 | export LOADADDRESS= | ||
51 | export SHARED_FLAG=-shared | ||
52 | export LDOPTS=-lm -ldl -L/home/kugel/.sdl/lib -Wl,-rpath,/home/kugel/.sdl/lib -lSDL -lpthread | ||
53 | export GLOBAL_LDOPTS= -Wl,-z,defs | ||
54 | export GCCVER=4.4.3 | ||
55 | export GCCNUM=404 | ||
56 | export UNAME=Linux | ||
57 | export MANUALDEV=iriverh300 | ||
58 | export TTS_OPTS= | ||
59 | export TTS_ENGINE= | ||
60 | export ENC_OPTS= | ||
61 | export ENCODER= | ||
62 | export USE_ELF= | ||
63 | export RBDIR=.rockbox | ||
64 | export SDLCONFIG=/home/kugel/.sdl/bin/sdl-config | ||
19 | 65 | ||
20 | OBJ = $(SRC:.c=.o) | 66 | CONFIGURE_OPTIONS=--target=$(MODELNAME) --ram=$(MEMORYSIZE) --rbdir=$(RBDIR) --type=d --prefix=$(PREFIX) |
21 | 67 | ||
22 | # source code search path | 68 | include $(TOOLSDIR)/root.make |
23 | VPATH = ../../apps ../../apps/metadata ../../firmware/common ../../firmware/ \ | ||
24 | ../../uisimulator/common | ||
25 | 69 | ||
26 | TARGET= database | ||
27 | |||
28 | all: $(TARGET) | ||
29 | |||
30 | %.o : ../../uisimulator/common/%.c | ||
31 | @echo CC $(<F) | ||
32 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< | ||
33 | |||
34 | %.o : %.c $< | ||
35 | @echo CC $(<F) | ||
36 | $(SILENT)$(CC) $(FIRMINC) $(CFLAGS) -c -o $@ $< | ||
37 | |||
38 | database: $(OBJ) | ||
39 | @echo LD $@ | ||
40 | $(SILENT)$(CC) -g -ldl -o $@ $+ | ||
41 | |||
42 | clean: | ||
43 | 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 \ | |||
24 | 24 | ||
25 | 25 | ||
26 | ifeq (,$(PREFIX)) | 26 | ifeq (,$(PREFIX)) |
27 | ifdef SIMVER | 27 | ifeq ($(APP_TYPE),sdl-sim) |
28 | # for sims, set simdisk/ as default | 28 | # for sims, set simdisk/ as default |
29 | PREFIX = simdisk | 29 | PREFIX = simdisk |
30 | INSTALL = --install="$(PREFIX)" | 30 | INSTALL = --install="$(PREFIX)" |
@@ -85,7 +85,7 @@ else | |||
85 | include $(APPSDIR)/plugins/plugins.make | 85 | include $(APPSDIR)/plugins/plugins.make |
86 | endif | 86 | endif |
87 | 87 | ||
88 | ifdef SIMVER | 88 | ifdef APP_TYPE |
89 | include $(ROOTDIR)/uisimulator/uisimulator.make | 89 | include $(ROOTDIR)/uisimulator/uisimulator.make |
90 | endif | 90 | endif |
91 | endif # bootloader | 91 | endif # bootloader |
@@ -141,7 +141,7 @@ ifeq (,$(findstring bootloader,$(APPSDIR))) | |||
141 | 141 | ||
142 | OBJ += $(LANG_O) | 142 | OBJ += $(LANG_O) |
143 | 143 | ||
144 | ifndef SIMVER | 144 | ifndef APP_TYPE |
145 | 145 | ||
146 | ## target build | 146 | ## target build |
147 | CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h | 147 | CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h |
@@ -221,7 +221,7 @@ $(MAXOUTFILE): | |||
221 | $(BUILDDIR)/rombox.iriver: $(BUILDDIR)/rombox.bin | 221 | $(BUILDDIR)/rombox.iriver: $(BUILDDIR)/rombox.bin |
222 | $(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@ | 222 | $(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@ |
223 | 223 | ||
224 | endif # !SIMVER | 224 | endif # !APP_TYPE |
225 | endif # !bootloader | 225 | endif # !bootloader |
226 | 226 | ||
227 | 227 | ||