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 | |
| parent | e87ff2bf91b65d51f41f7db4df3632a30748002d (diff) | |
| download | rockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.zip rockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.tar.gz rockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.tar.bz2 rockbox-57613ea5fafb8ba4555755074e7d6ad768fb8a68.tar.xz | |
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.make | 6 | ||||
| -rw-r--r-- | apps/codecs/lib/tlsf/libtlsf.make | 2 | ||||
| -rw-r--r-- | apps/codecs/libwmapro/libwmapro.make | 2 | ||||
| -rw-r--r-- | apps/plugins/doom/doom.make | 2 | ||||
| -rw-r--r-- | apps/plugins/goban/goban.make | 2 | ||||
| -rw-r--r-- | apps/plugins/lua/Makefile | 6 | ||||
| -rw-r--r-- | apps/plugins/lua/lua.make | 2 | ||||
| -rw-r--r-- | apps/plugins/pdbox/pdbox.make | 4 | ||||
| -rw-r--r-- | apps/plugins/pictureflow/pictureflow.make | 2 | ||||
| -rw-r--r-- | apps/plugins/plugins.make | 6 | ||||
| -rw-r--r-- | apps/plugins/zxbox/zxbox.make | 2 | ||||
| -rw-r--r-- | firmware/firmware.make | 2 | ||||
| -rwxr-xr-x | tools/configure | 18 | ||||
| -rw-r--r-- | tools/database/Makefile | 104 | ||||
| -rw-r--r-- | tools/root.make | 8 | ||||
| -rw-r--r-- | uisimulator/common/Makefile | 2 |
16 files changed, 99 insertions, 71 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make index aab23b0..c137426 100644 --- a/apps/codecs/codecs.make +++ b/apps/codecs/codecs.make @@ -47,7 +47,7 @@ include $(APPSDIR)/codecs/libtta/libtta.make CODECFLAGS = $(CFLAGS) -fstrict-aliasing -I$(APPSDIR)/codecs \ -I$(APPSDIR)/codecs/lib -DCODEC -ifndef SIMVER +ifndef APP_TYPE CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h CODEC_LDS := $(APPSDIR)/plugins/plugin.lds # codecs and plugins use same file CODECLINK_LDS := $(CODECDIR)/codec.link @@ -115,7 +115,7 @@ $(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.S $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ -I$(dir $<) $(CODECFLAGS) -c $< -o $@ -ifdef SIMVER +ifdef APP_TYPE CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile else CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map @@ -135,7 +135,7 @@ $(CODECDIR)/%.codec: $(CODECDIR)/%.o $(filter %.o, $^) \ $(filter %.a, $+) \ -lgcc $(CODECLDFLAGS) -ifdef SIMVER +ifdef APP_TYPE $(SILENT)cp $(CODECDIR)/$*.elf $@ else $(SILENT)$(OC) -O binary $(CODECDIR)/$*.elf $@ diff --git a/apps/codecs/lib/tlsf/libtlsf.make b/apps/codecs/lib/tlsf/libtlsf.make index 464487f..7d37d29 100644 --- a/apps/codecs/lib/tlsf/libtlsf.make +++ b/apps/codecs/lib/tlsf/libtlsf.make @@ -18,7 +18,7 @@ $(TLSFLIB): $(TLSFLIB_OBJ) TLSFLIBFLAGS = $(CODECFLAGS) -ffunction-sections -ifdef SIMVER +ifdef APP_TYPE TLSFLIBFLAGS += -DTLSF_STATISTIC=1 endif diff --git a/apps/codecs/libwmapro/libwmapro.make b/apps/codecs/libwmapro/libwmapro.make index 42086a6..0e8df7e 100644 --- a/apps/codecs/libwmapro/libwmapro.make +++ b/apps/codecs/libwmapro/libwmapro.make @@ -17,7 +17,7 @@ $(WMAPROLIB): $(WMAPROLIB_OBJ) $(SILENT)$(shell rm -f $@) $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null -ifdef SIMVER +ifdef APP_TYPE # wmapro needs libm in the simulator $(CODECDIR)/wmapro.codec: $(CODECDIR)/wmapro.o $(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 2f52da4..58a4708 100644 --- a/apps/plugins/doom/doom.make +++ b/apps/plugins/doom/doom.make @@ -21,7 +21,7 @@ OTHER_SRC += $(DOOM_SRC) DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes -O2 -fno-strict-aliasing -ifndef SIMVER +ifndef APP_TYPE ifeq ($(TARGET), IRIVER_H100) DOOMCCFLAGS += -mstructure-size-boundary=8 endif diff --git a/apps/plugins/goban/goban.make b/apps/plugins/goban/goban.make index 03f2276..2bc85ad 100644 --- a/apps/plugins/goban/goban.make +++ b/apps/plugins/goban/goban.make @@ -15,7 +15,7 @@ GOBAN_OBJ := $(call c2obj, $(GOBAN_SRC)) OTHER_SRC += $(GOBAN_SRC) -ifndef SIMVER +ifndef APP_TYPE ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) ### lowmem targets ROCKS += $(GOBAN_BUILDDIR)/goban.ovl diff --git a/apps/plugins/lua/Makefile b/apps/plugins/lua/Makefile index 6a4e497..09535ac 100644 --- a/apps/plugins/lua/Makefile +++ b/apps/plugins/lua/Makefile @@ -27,7 +27,7 @@ OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) DIRS = . -ifndef SIMVER +ifndef APP_TYPE ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) LDS := archos.lds OUTPUT = $(OUTDIR)/lua.ovl @@ -41,7 +41,7 @@ endif all: $(OUTPUT) -ifndef SIMVER +ifndef APP_TYPE $(OBJDIR)/lua.elf: $(OBJS) $(LINKFILE) $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/lua.map @@ -50,7 +50,7 @@ $(OUTPUT): $(OBJDIR)/lua.elf $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else -ifeq ($(SIMVER), sdl) +ifdef APP_TYPE ################################################### # This is the SDL simulator version diff --git a/apps/plugins/lua/lua.make b/apps/plugins/lua/lua.make index 93139dc..f4dd771 100644 --- a/apps/plugins/lua/lua.make +++ b/apps/plugins/lua/lua.make @@ -15,7 +15,7 @@ LUA_OBJ := $(call c2obj, $(LUA_SRC)) OTHER_SRC += $(LUA_SRC) -ifndef SIMVER +ifndef APP_TYPE ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) ### lowmem targets ROCKS += $(LUA_BUILDDIR)/lua.ovl diff --git a/apps/plugins/pdbox/pdbox.make b/apps/plugins/pdbox/pdbox.make index d39d9fd..d2c836f 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 PDBOXFLAGS = $(PLUGINFLAGS) PDBOXLDFLAGS = $(PLUGINLDFLAGS) -ifdef SIMVER +ifdef APP_TYPE PDBOXLDFLAGS += -lm endif @@ -36,7 +36,7 @@ $(PDBOXBUILDDIR)/pdbox.rock: $(filter %.o, $^) \ $(filter %.a, $+) \ -lgcc $(PDBOXLDFLAGS) -ifdef SIMVER +ifdef APP_TYPE $(SILENT)cp $*.elf $@ else $(SILENT)$(OC) -O binary $*.elf $@ diff --git a/apps/plugins/pictureflow/pictureflow.make b/apps/plugins/pictureflow/pictureflow.make index 28ad2aa..e3d4544 100644 --- a/apps/plugins/pictureflow/pictureflow.make +++ b/apps/plugins/pictureflow/pictureflow.make @@ -15,7 +15,7 @@ PICTUREFLOW_OBJ := $(call c2obj, $(PICTUREFLOW_SRC)) OTHER_SRC += $(PICTUREFLOW_SRC) -ifndef SIMVER +ifndef APP_TYPE ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET))))) ### lowmem targets ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.ovl diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index 4bd0cc9..d3c66c3 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make @@ -27,7 +27,7 @@ PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o) PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ)) ### build data / rules -ifndef SIMVER +ifndef APP_TYPE CONFIGFILE := $(FIRMDIR)/export/config/$(MODELNAME).h PLUGIN_LDS := $(APPSDIR)/plugins/plugin.lds PLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/plugin.link @@ -81,7 +81,7 @@ $(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c $(SILENT)mkdir -p $(dir $@) $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PLUGINFLAGS) -c $< -o $@ -ifdef SIMVER +ifdef APP_TYPE PLUGINLDFLAGS = $(SHARED_FLAG) # <-- from Makefile else PLUGINLDFLAGS = -T$(PLUGINLINK_LDS) -Wl,--gc-sections -Wl,-Map,$*.map @@ -94,7 +94,7 @@ $(BUILDDIR)/%.rock: $(filter %.o, $^) \ $(filter %.a, $+) \ -lgcc $(PLUGINLDFLAGS) -ifdef SIMVER +ifdef APP_TYPE $(SILENT)cp $(BUILDDIR)/$*.elf $@ else $(SILENT)$(OC) -O binary $(BUILDDIR)/$*.elf $@ diff --git a/apps/plugins/zxbox/zxbox.make b/apps/plugins/zxbox/zxbox.make index de7312e..a04801a 100644 --- a/apps/plugins/zxbox/zxbox.make +++ b/apps/plugins/zxbox/zxbox.make @@ -15,7 +15,7 @@ ZXBOX_OBJ := $(call c2obj, $(ZXBOX_SRC)) OTHER_SRC += $(ZXBOX_SRC) -ifndef SIMVER +ifndef APP_TYPE ifeq ($(findstring YES, $(call preprocess, $(APPSDIR)/plugins/BUILD_OVERLAY)), YES) ## lowmem targets ROCKS += $(ZXBOX_OBJDIR)/zxbox.ovl diff --git a/firmware/firmware.make b/firmware/firmware.make index 9d023ab..aab735a 100644 --- a/firmware/firmware.make +++ b/firmware/firmware.make @@ -8,7 +8,7 @@ # INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers -I$(FIRMDIR)/include -ifndef SIMVER +ifndef APP_TYPE INCLUDES += -I$(FIRMDIR)/libc/include endif diff --git a/tools/configure b/tools/configure index 5045405..9f7c63f 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 5828b20..09b58b5 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 2b4dfb6..e53c452 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 diff --git a/uisimulator/common/Makefile b/uisimulator/common/Makefile index f54df57..c892f1c 100644 --- a/uisimulator/common/Makefile +++ b/uisimulator/common/Makefile @@ -24,7 +24,7 @@ DEBUG = -g # Use this for simulator-only files INCLUDES = -I. -I$(OBJDIR) $(TARGET_INC) -I$(FIRMDIR)/export -I$(APPSDIR) \ --I$(ROOTDIR)/uisimulator/$(SIMVER) -I$(BUILDDIR) +-I$(ROOTDIR)/uisimulator/sdl -I$(BUILDDIR) # This sets up 'SRC' based on the files mentioned in SOURCES include $(TOOLSDIR)/makesrc.inc |