summaryrefslogtreecommitdiff
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
parente87ff2bf91b65d51f41f7db4df3632a30748002d (diff)
downloadrockbox-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
-rw-r--r--apps/codecs/codecs.make6
-rw-r--r--apps/codecs/lib/tlsf/libtlsf.make2
-rw-r--r--apps/codecs/libwmapro/libwmapro.make2
-rw-r--r--apps/plugins/doom/doom.make2
-rw-r--r--apps/plugins/goban/goban.make2
-rw-r--r--apps/plugins/lua/Makefile6
-rw-r--r--apps/plugins/lua/lua.make2
-rw-r--r--apps/plugins/pdbox/pdbox.make4
-rw-r--r--apps/plugins/pictureflow/pictureflow.make2
-rw-r--r--apps/plugins/plugins.make6
-rw-r--r--apps/plugins/zxbox/zxbox.make2
-rw-r--r--firmware/firmware.make2
-rwxr-xr-xtools/configure18
-rw-r--r--tools/database/Makefile104
-rw-r--r--tools/root.make8
-rw-r--r--uisimulator/common/Makefile2
16 files changed, 99 insertions, 71 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make
index aab23b01a2..c137426591 100644
--- a/apps/codecs/codecs.make
+++ b/apps/codecs/codecs.make
@@ -47,7 +47,7 @@ include $(APPSDIR)/codecs/libtta/libtta.make
47CODECFLAGS = $(CFLAGS) -fstrict-aliasing -I$(APPSDIR)/codecs \ 47CODECFLAGS = $(CFLAGS) -fstrict-aliasing -I$(APPSDIR)/codecs \
48 -I$(APPSDIR)/codecs/lib -DCODEC 48 -I$(APPSDIR)/codecs/lib -DCODEC
49 49
50ifndef SIMVER 50ifndef APP_TYPE
51 CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h 51 CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h
52 CODEC_LDS := $(APPSDIR)/plugins/plugin.lds # codecs and plugins use same file 52 CODEC_LDS := $(APPSDIR)/plugins/plugin.lds # codecs and plugins use same file
53 CODECLINK_LDS := $(CODECDIR)/codec.link 53 CODECLINK_LDS := $(CODECDIR)/codec.link
@@ -115,7 +115,7 @@ $(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.S
115 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ 115 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
116 -I$(dir $<) $(CODECFLAGS) -c $< -o $@ 116 -I$(dir $<) $(CODECFLAGS) -c $< -o $@
117 117
118ifdef SIMVER 118ifdef APP_TYPE
119 CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile 119 CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile
120else 120else
121 CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map 121 CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map
@@ -135,7 +135,7 @@ $(CODECDIR)/%.codec: $(CODECDIR)/%.o
135 $(filter %.o, $^) \ 135 $(filter %.o, $^) \
136 $(filter %.a, $+) \ 136 $(filter %.a, $+) \
137 -lgcc $(CODECLDFLAGS) 137 -lgcc $(CODECLDFLAGS)
138ifdef SIMVER 138ifdef APP_TYPE
139 $(SILENT)cp $(CODECDIR)/$*.elf $@ 139 $(SILENT)cp $(CODECDIR)/$*.elf $@
140else 140else
141 $(SILENT)$(OC) -O binary $(CODECDIR)/$*.elf $@ 141 $(SILENT)$(OC) -O binary $(CODECDIR)/$*.elf $@
diff --git a/apps/codecs/lib/tlsf/libtlsf.make b/apps/codecs/lib/tlsf/libtlsf.make
index 464487f87f..7d37d29b21 100644
--- a/apps/codecs/lib/tlsf/libtlsf.make
+++ b/apps/codecs/lib/tlsf/libtlsf.make
@@ -18,7 +18,7 @@ $(TLSFLIB): $(TLSFLIB_OBJ)
18 18
19TLSFLIBFLAGS = $(CODECFLAGS) -ffunction-sections 19TLSFLIBFLAGS = $(CODECFLAGS) -ffunction-sections
20 20
21ifdef SIMVER 21ifdef APP_TYPE
22 TLSFLIBFLAGS += -DTLSF_STATISTIC=1 22 TLSFLIBFLAGS += -DTLSF_STATISTIC=1
23endif 23endif
24 24
diff --git a/apps/codecs/libwmapro/libwmapro.make b/apps/codecs/libwmapro/libwmapro.make
index 42086a637a..0e8df7e9cb 100644
--- a/apps/codecs/libwmapro/libwmapro.make
+++ b/apps/codecs/libwmapro/libwmapro.make
@@ -17,7 +17,7 @@ $(WMAPROLIB): $(WMAPROLIB_OBJ)
17 $(SILENT)$(shell rm -f $@) 17 $(SILENT)$(shell rm -f $@)
18 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null 18 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
19 19
20ifdef SIMVER 20ifdef APP_TYPE
21# wmapro needs libm in the simulator 21# wmapro needs libm in the simulator
22$(CODECDIR)/wmapro.codec: $(CODECDIR)/wmapro.o 22$(CODECDIR)/wmapro.codec: $(CODECDIR)/wmapro.o
23 $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/wmapro.elf \ 23 $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/wmapro.elf \
diff --git a/apps/plugins/doom/doom.make b/apps/plugins/doom/doom.make
index 2f52da4a4e..58a4708819 100644
--- a/apps/plugins/doom/doom.make
+++ b/apps/plugins/doom/doom.make
@@ -21,7 +21,7 @@ OTHER_SRC += $(DOOM_SRC)
21 21
22DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes -O2 -fno-strict-aliasing 22DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes -O2 -fno-strict-aliasing
23 23
24ifndef SIMVER 24ifndef APP_TYPE
25ifeq ($(TARGET), IRIVER_H100) 25ifeq ($(TARGET), IRIVER_H100)
26 DOOMCCFLAGS += -mstructure-size-boundary=8 26 DOOMCCFLAGS += -mstructure-size-boundary=8
27endif 27endif
diff --git a/apps/plugins/goban/goban.make b/apps/plugins/goban/goban.make
index 03f2276659..2bc85ad8e1 100644
--- a/apps/plugins/goban/goban.make
+++ b/apps/plugins/goban/goban.make
@@ -15,7 +15,7 @@ GOBAN_OBJ := $(call c2obj, $(GOBAN_SRC))
15 15
16OTHER_SRC += $(GOBAN_SRC) 16OTHER_SRC += $(GOBAN_SRC)
17 17
18ifndef SIMVER 18ifndef APP_TYPE
19ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 19ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
20 ### lowmem targets 20 ### lowmem targets
21 ROCKS += $(GOBAN_BUILDDIR)/goban.ovl 21 ROCKS += $(GOBAN_BUILDDIR)/goban.ovl
diff --git a/apps/plugins/lua/Makefile b/apps/plugins/lua/Makefile
index 6a4e497801..09535ac530 100644
--- a/apps/plugins/lua/Makefile
+++ b/apps/plugins/lua/Makefile
@@ -27,7 +27,7 @@ OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
27OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) 27OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
28DIRS = . 28DIRS = .
29 29
30ifndef SIMVER 30ifndef APP_TYPE
31ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 31ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
32 LDS := archos.lds 32 LDS := archos.lds
33 OUTPUT = $(OUTDIR)/lua.ovl 33 OUTPUT = $(OUTDIR)/lua.ovl
@@ -41,7 +41,7 @@ endif
41 41
42all: $(OUTPUT) 42all: $(OUTPUT)
43 43
44ifndef SIMVER 44ifndef APP_TYPE
45$(OBJDIR)/lua.elf: $(OBJS) $(LINKFILE) 45$(OBJDIR)/lua.elf: $(OBJS) $(LINKFILE)
46 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ 46 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
47 -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/lua.map 47 -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/lua.map
@@ -50,7 +50,7 @@ $(OUTPUT): $(OBJDIR)/lua.elf
50 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ 50 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
51else 51else
52 52
53ifeq ($(SIMVER), sdl) 53ifdef APP_TYPE
54################################################### 54###################################################
55# This is the SDL simulator version 55# This is the SDL simulator version
56 56
diff --git a/apps/plugins/lua/lua.make b/apps/plugins/lua/lua.make
index 93139dc8d4..f4dd7710c9 100644
--- a/apps/plugins/lua/lua.make
+++ b/apps/plugins/lua/lua.make
@@ -15,7 +15,7 @@ LUA_OBJ := $(call c2obj, $(LUA_SRC))
15 15
16OTHER_SRC += $(LUA_SRC) 16OTHER_SRC += $(LUA_SRC)
17 17
18ifndef SIMVER 18ifndef APP_TYPE
19ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 19ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
20 ### lowmem targets 20 ### lowmem targets
21 ROCKS += $(LUA_BUILDDIR)/lua.ovl 21 ROCKS += $(LUA_BUILDDIR)/lua.ovl
diff --git a/apps/plugins/pdbox/pdbox.make b/apps/plugins/pdbox/pdbox.make
index d39d9fde1e..d2c836f513 100644
--- a/apps/plugins/pdbox/pdbox.make
+++ b/apps/plugins/pdbox/pdbox.make
@@ -22,7 +22,7 @@ $(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) $(CODECDIR)/libtlsf.a
22 22
23PDBOXFLAGS = $(PLUGINFLAGS) 23PDBOXFLAGS = $(PLUGINFLAGS)
24PDBOXLDFLAGS = $(PLUGINLDFLAGS) 24PDBOXLDFLAGS = $(PLUGINLDFLAGS)
25ifdef SIMVER 25ifdef APP_TYPE
26PDBOXLDFLAGS += -lm 26PDBOXLDFLAGS += -lm
27endif 27endif
28 28
@@ -36,7 +36,7 @@ $(PDBOXBUILDDIR)/pdbox.rock:
36 $(filter %.o, $^) \ 36 $(filter %.o, $^) \
37 $(filter %.a, $+) \ 37 $(filter %.a, $+) \
38 -lgcc $(PDBOXLDFLAGS) 38 -lgcc $(PDBOXLDFLAGS)
39ifdef SIMVER 39ifdef APP_TYPE
40 $(SILENT)cp $*.elf $@ 40 $(SILENT)cp $*.elf $@
41else 41else
42 $(SILENT)$(OC) -O binary $*.elf $@ 42 $(SILENT)$(OC) -O binary $*.elf $@
diff --git a/apps/plugins/pictureflow/pictureflow.make b/apps/plugins/pictureflow/pictureflow.make
index 28ad2aa39e..e3d4544e07 100644
--- a/apps/plugins/pictureflow/pictureflow.make
+++ b/apps/plugins/pictureflow/pictureflow.make
@@ -15,7 +15,7 @@ PICTUREFLOW_OBJ := $(call c2obj, $(PICTUREFLOW_SRC))
15 15
16OTHER_SRC += $(PICTUREFLOW_SRC) 16OTHER_SRC += $(PICTUREFLOW_SRC)
17 17
18ifndef SIMVER 18ifndef APP_TYPE
19ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) 19ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
20 ### lowmem targets 20 ### lowmem targets
21 ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.ovl 21 ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.ovl
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make
index 4bd0cc952e..d3c66c34ca 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -27,7 +27,7 @@ PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o)
27PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ)) 27PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ))
28 28
29### build data / rules 29### build data / rules
30ifndef SIMVER 30ifndef APP_TYPE
31CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h 31CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h
32PLUGIN_LDS := $(APPSDIR)/plugins/plugin.lds 32PLUGIN_LDS := $(APPSDIR)/plugins/plugin.lds
33PLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/plugin.link 33PLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/plugin.link
@@ -81,7 +81,7 @@ $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c
81 $(SILENT)mkdir -p $(dir $@) 81 $(SILENT)mkdir -p $(dir $@)
82 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ 82 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@
83 83
84ifdef SIMVER 84ifdef APP_TYPE
85 PLUGINLDFLAGS = $(SHARED_FLAG) # <-- from Makefile 85 PLUGINLDFLAGS = $(SHARED_FLAG) # <-- from Makefile
86else 86else
87 PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map 87 PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map
@@ -94,7 +94,7 @@ $(BUILDDIR)/%.rock:
94 $(filter %.o, $^) \ 94 $(filter %.o, $^) \
95 $(filter %.a, $+) \ 95 $(filter %.a, $+) \
96 -lgcc $(PLUGINLDFLAGS) 96 -lgcc $(PLUGINLDFLAGS)
97ifdef SIMVER 97ifdef APP_TYPE
98 $(SILENT)cp $(BUILDDIR)/$*.elf $@ 98 $(SILENT)cp $(BUILDDIR)/$*.elf $@
99else 99else
100 $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@ 100 $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@
diff --git a/apps/plugins/zxbox/zxbox.make b/apps/plugins/zxbox/zxbox.make
index de7312e009..a04801aa31 100644
--- a/apps/plugins/zxbox/zxbox.make
+++ b/apps/plugins/zxbox/zxbox.make
@@ -15,7 +15,7 @@ ZXBOX_OBJ := $(call c2obj, $(ZXBOX_SRC))
15 15
16OTHER_SRC += $(ZXBOX_SRC) 16OTHER_SRC += $(ZXBOX_SRC)
17 17
18ifndef SIMVER 18ifndef APP_TYPE
19ifeq ($(findstring YES, $(call preprocess, $(APPSDIR)/plugins/BUILD_OVERLAY)), YES) 19ifeq ($(findstring YES, $(call preprocess, $(APPSDIR)/plugins/BUILD_OVERLAY)), YES)
20 ## lowmem targets 20 ## lowmem targets
21 ROCKS += $(ZXBOX_OBJDIR)/zxbox.ovl 21 ROCKS += $(ZXBOX_OBJDIR)/zxbox.ovl
diff --git a/firmware/firmware.make b/firmware/firmware.make
index 9d023ab27f..aab735aa91 100644
--- a/firmware/firmware.make
+++ b/firmware/firmware.make
@@ -8,7 +8,7 @@
8# 8#
9 9
10INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers -I$(FIRMDIR)/include 10INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers -I$(FIRMDIR)/include
11ifndef SIMVER 11ifndef APP_TYPE
12INCLUDES += -I$(FIRMDIR)/libc/include 12INCLUDES += -I$(FIRMDIR)/libc/include
13endif 13endif
14 14
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
2856if [ "yes" = "$simulator" ]; then 2858if [ "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@
3202export RANLIB=@RANLIB@ 3204export RANLIB=@RANLIB@
3203export PREFIX=@PREFIX@ 3205export PREFIX=@PREFIX@
3204export PROFILE_OPTS=@PROFILE_OPTS@ 3206export PROFILE_OPTS=@PROFILE_OPTS@
3205export SIMVER=@SIMVER@ 3207export APP_TYPE=@APP_TYPE@
3206export SIMDIR=\$(ROOTDIR)/uisimulator/sdl 3208export SIMDIR=\$(ROOTDIR)/uisimulator/sdl
3207export GCCOPTS=@GCCOPTS@ 3209export GCCOPTS=@GCCOPTS@
3208export TARGET_INC=@TARGET_INC@ 3210export 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 @@
1ifndef V 1## Automatically generated. http://www.rockbox.org/
2SILENT = @
3endif
4INCLUDE = -I../../firmware/export \
5 -I../../apps -I../../apps/gui -I../../uisimulator/sdl -I/usr/include/SDL
6FIRMINC = -I../../firmware/include -fno-builtin
7DEFINES = -D__PCTOOL__ -DHAVE_TAGCACHE -DSIMULATOR -DCONFIG_CODEC=1 \
8 -DROCKBOX_LITTLE_ENDIAN -DROCKBOX_DIR=\".rockbox\" -DROCKBOX_HAS_LOGF \
9 -DCONFIG_CODEC=1
10CFLAGS = -g $(INCLUDE) $(DEFINES) -Wno-pointer-sign
11 2
12SRC = database.c tagcache.c replaygain.c \ 3export ROOTDIR=/home/kugel/rbdev/rockbox-git
13 metadata.c metadata_common.c mp3data.c \ 4export FIRMDIR=$(ROOTDIR)/firmware
14 a52.c mp3.c adx.c mp4.c aiff.c mpc.c ape.c ogg.c \ 5export APPSDIR=$(ROOTDIR)/tools/database
15 asap.c sid.c asf.c spc.c flac.c vorbis.c wave.c \ 6export TOOLSDIR=$(ROOTDIR)/tools
16 mod.c wavpack.c monkeys.c rm.c nsf.c smaf.c \ 7export DOCSDIR=$(ROOTDIR)/docs
17 logf.c unicode.c ctype.c structec.c crc32.c io.c \ 8export MANUALDIR=${ROOTDIR}/manual
18 misc.c strlcpy.c fixedpoint.c 9export DEBUG=
10export MODELNAME=iriverh300
11export ARCHOSROM=
12export FLASHFILE=
13export TARGET_ID=10
14export TARGET=-DIRIVER_H300
15export CPU=
16export MANUFACTURER=iriver
17export OBJDIR=/home/kugel/rbdev/rockbox-git/tools/database
18export BUILDDIR=/home/kugel/rbdev/rockbox-git/tools/database
19export LANGUAGE=english
20export VOICELANGUAGE=
21export MEMORYSIZE=32
22export BUILDDATE:=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
23export MKFIRMWARE=/home/kugel/rbdev/rockbox-git/tools/scramble -add=h300
24export BMP2RB_MONO=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0
25export BMP2RB_NATIVE=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 4
26export BMP2RB_REMOTEMONO=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0
27export BMP2RB_REMOTENATIVE=/home/kugel/rbdev/rockbox-git/tools/bmp2rb -f 0
28export BINARY=database.iriverh300
29export APPEXTRA=recorder:gui:radio
30export ENABLEDPLUGINS=yes
31export SOFTWARECODECS=yes
32export EXTRA_DEFINES=
33export HOSTCC=/usr/bin/gcc
34export HOSTAR=/usr/bin/ar
35export CC=/usr/bin/ccache /usr/bin/gcc
36export LD=/usr/bin/ar
37export AR=/usr/bin/ar
38export AS=/usr/bin/as
39export OC=/usr/bin/objcopy
40export WINDRES=windres
41export DLLTOOL=dlltool
42export DLLWRAP=dllwrap
43export RANLIB=/usr/bin/ranlib
44export PREFIX=
45export PROFILE_OPTS=
46export APP_TYPE=database
47export SIMDIR=$(ROOTDIR)/uisimulator/sdl
48export GCCOPTS= -Wno-pointer-sign -Wno-override-init
49export TARGET_INC=
50export LOADADDRESS=
51export SHARED_FLAG=-shared
52export LDOPTS=-lm -ldl -L/home/kugel/.sdl/lib -Wl,-rpath,/home/kugel/.sdl/lib -lSDL -lpthread
53export GLOBAL_LDOPTS= -Wl,-z,defs
54export GCCVER=4.4.3
55export GCCNUM=404
56export UNAME=Linux
57export MANUALDEV=iriverh300
58export TTS_OPTS=
59export TTS_ENGINE=
60export ENC_OPTS=
61export ENCODER=
62export USE_ELF=
63export RBDIR=.rockbox
64export SDLCONFIG=/home/kugel/.sdl/bin/sdl-config
19 65
20OBJ = $(SRC:.c=.o) 66CONFIGURE_OPTIONS=--target=$(MODELNAME) --ram=$(MEMORYSIZE) --rbdir=$(RBDIR) --type=d --prefix=$(PREFIX)
21 67
22# source code search path 68include $(TOOLSDIR)/root.make
23VPATH = ../../apps ../../apps/metadata ../../firmware/common ../../firmware/ \
24 ../../uisimulator/common
25 69
26TARGET= database
27
28all: $(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
38database: $(OBJ)
39 @echo LD $@
40 $(SILENT)$(CC) -g -ldl -o $@ $+
41
42clean:
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
26ifeq (,$(PREFIX)) 26ifeq (,$(PREFIX))
27ifdef SIMVER 27ifeq ($(APP_TYPE),sdl-sim)
28# for sims, set simdisk/ as default 28# for sims, set simdisk/ as default
29PREFIX = simdisk 29PREFIX = simdisk
30INSTALL = --install="$(PREFIX)" 30INSTALL = --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
91endif # bootloader 91endif # bootloader
@@ -141,7 +141,7 @@ ifeq (,$(findstring bootloader,$(APPSDIR)))
141 141
142OBJ += $(LANG_O) 142OBJ += $(LANG_O)
143 143
144ifndef SIMVER 144ifndef APP_TYPE
145 145
146## target build 146## target build
147CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h 147CONFIGFILE := $(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
224endif # !SIMVER 224endif # !APP_TYPE
225endif # !bootloader 225endif # !bootloader
226 226
227 227
diff --git a/uisimulator/common/Makefile b/uisimulator/common/Makefile
index f54df57b27..c892f1c615 100644
--- a/uisimulator/common/Makefile
+++ b/uisimulator/common/Makefile
@@ -24,7 +24,7 @@ DEBUG = -g
24 24
25# Use this for simulator-only files 25# Use this for simulator-only files
26INCLUDES = -I. -I$(OBJDIR) $(TARGET_INC) -I$(FIRMDIR)/export -I$(APPSDIR) \ 26INCLUDES = -I. -I$(OBJDIR) $(TARGET_INC) -I$(FIRMDIR)/export -I$(APPSDIR) \
27-I$(ROOTDIR)/uisimulator/$(SIMVER) -I$(BUILDDIR) 27-I$(ROOTDIR)/uisimulator/sdl -I$(BUILDDIR)
28 28
29# This sets up 'SRC' based on the files mentioned in SOURCES 29# This sets up 'SRC' based on the files mentioned in SOURCES
30include $(TOOLSDIR)/makesrc.inc 30include $(TOOLSDIR)/makesrc.inc