Index: tools/configure =================================================================== --- tools/configure (revision 19084) +++ tools/configure (working copy) @@ -796,6 +796,7 @@ target="-DARCHOS_RECORDER" shcc tool="$rootdir/tools/scramble" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="ajbrec.ajz" @@ -818,6 +819,7 @@ target="-DARCHOS_FMRECORDER" shcc tool="$rootdir/tools/scramble -fm" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="ajbrec.ajz" @@ -840,6 +842,7 @@ target="-DARCHOS_RECORDERV2" shcc tool="$rootdir/tools/scramble -v2" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="ajbrec.ajz" @@ -862,6 +865,7 @@ target="-DARCHOS_ONDIOSP" shcc tool="$rootdir/tools/scramble -osp" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="ajbrec.ajz" @@ -884,6 +888,7 @@ target="-DARCHOS_ONDIOFM" shcc tool="$rootdir/tools/scramble -ofm" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="ajbrec.ajz" @@ -905,6 +910,7 @@ memory=16 # always arm7tdmicc tool="$rootdir/tools/scramble -mm=C" + bmp2rb_format=6 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 6" output="cjbm.ajz" @@ -927,6 +933,7 @@ memory=32 # always coldfirecc tool="$rootdir/tools/scramble -add=h120" + bmp2rb_format=2 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 2" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -951,6 +958,7 @@ memory=32 # always coldfirecc tool="$rootdir/tools/scramble -add=h300" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -974,6 +982,7 @@ memory=16 # always coldfirecc tool="$rootdir/tools/scramble -add=h100" + bmp2rb_format=2 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 2" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -998,6 +1007,7 @@ memory=1 arm7tdmicc short tool="cp" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="rockbox.wma" @@ -1019,6 +1029,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -mi4v3 -model=h10 -type=RBOS" + bmp2rb_format=5 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 5" output="rockbox.mi4" @@ -1043,6 +1054,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -mi4v2 -model=h105 -type=RBOS" + bmp2rb_format=5 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 5" output="rockbox.mi4" @@ -1067,6 +1079,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add=ipco" + bmp2rb_format=5 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 5" output="rockbox.ipod" @@ -1090,6 +1103,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add=nano" + bmp2rb_format=5 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 5" output="rockbox.ipod" @@ -1112,6 +1126,7 @@ target="-DIPOD_VIDEO" arm7tdmicc tool="$rootdir/tools/scramble -add=ipvd" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.ipod" @@ -1135,6 +1150,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add=ip3g" + bmp2rb_format=6 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 6" output="rockbox.ipod" @@ -1158,6 +1174,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add=ip4g" + bmp2rb_format=6 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 6" output="rockbox.ipod" @@ -1181,6 +1198,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add=mini" + bmp2rb_format=6 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 6" output="rockbox.ipod" @@ -1204,6 +1222,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add=mn2g" + bmp2rb_format=6 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 6" output="rockbox.ipod" @@ -1227,6 +1246,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add=1g2g" + bmp2rb_format=6 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 6" output="rockbox.ipod" @@ -1250,6 +1270,7 @@ memory=16 # always coldfirecc tool="$rootdir/tools/scramble -add=iax5" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1274,6 +1295,7 @@ memory=16 # always coldfirecc tool="$rootdir/tools/scramble -add=iam5" + bmp2rb_format=2 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 2" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1299,6 +1321,7 @@ arm946cc tool="$rootdir/tools/scramble -add=i7" boottool="$rootdir/tools/scramble -tcc=crc" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.iaudio" @@ -1323,6 +1346,7 @@ arm926ejscc tool="$rootdir/tools/scramble -add=d2" boottool="$rootdir/tools/scramble -tcc=crc" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1345,6 +1369,7 @@ memory=16 # always coldfirecc tool="$rootdir/tools/scramble -add=iam3" + bmp2rb_format=7 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 7" output="rockbox.iaudio" @@ -1367,6 +1392,7 @@ memory=32 # always arm9tdmicc tool="$rootdir/tools/scramble -add=giga" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.gigabeat" @@ -1389,6 +1415,7 @@ memory=64 arm1136jfscc tool="$rootdir/tools/scramble -add=gigs" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.gigabeat" @@ -1412,6 +1439,7 @@ arm926ejscc # tool="$rootdir/tools/scramble -add=m500" tool="cp " + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1436,6 +1464,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -mi4v2 -model=m100 -type=RBOS" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1464,6 +1493,7 @@ tool="$rootdir/tools/scramble -add=ldax" boottool="$rootdir/tools/scramble -tcc=crc" bootoutput="player.rom" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="rockbox.logik" @@ -1485,6 +1515,7 @@ target="-DCREATIVE_ZVM" memory=64 arm926ejscc + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1510,6 +1541,7 @@ target="-DCREATIVE_ZVM60GB" memory=64 arm926ejscc + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1535,6 +1567,7 @@ target="-DCREATIVE_ZV" memory=64 arm926ejscc + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0" @@ -1561,6 +1594,7 @@ memory=32 # supposedly arm7tdmicc tool="$rootdir/tools/scramble -mi4v3 -model=e200 -type=RBOS" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.mi4" @@ -1588,6 +1622,7 @@ memory=32 # supposedly arm7tdmicc tool="$rootdir/tools/scramble -mi4v3 -model=e20r -type=RBOS" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.mi4" @@ -1612,6 +1647,7 @@ memory=32 # supposedly arm7tdmicc tool="$rootdir/tools/scramble -mi4v3 -model=c200 -type=RBOS" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.mi4" @@ -1638,6 +1674,7 @@ tool="$rootdir/tools/scramble -add=m200" boottool="$rootdir/tools/scramble -tcc=crc" bootoutput="player.rom" + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 0" output="rockbox.m200" @@ -1662,6 +1699,7 @@ tool="$rootdir/tools/scramble -add=c100" boottool="$rootdir/tools/scramble -tcc=crc" bootoutput="player.rom" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.c100" @@ -1682,6 +1720,7 @@ target="-DSANSA_CLIP" memory=2 arm9tdmicc + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$bmp2rb_mono" tool="$rootdir/tools/scramble -add=clip" @@ -1703,6 +1742,7 @@ target="-DSANSA_E200V2" memory=8 arm9tdmicc + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" tool="$rootdir/tools/scramble -add=e2v2" @@ -1724,6 +1764,7 @@ target="-DSANSA_M200V4" memory=2 arm9tdmicc + bmp2rb_format=0 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$bmp2rb_mono" tool="$rootdir/tools/scramble -add=m2v4" @@ -1745,6 +1786,7 @@ target="-DSANSA_FUZE" memory=2 arm9tdmicc + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" tool="$rootdir/tools/scramble -add=fuze" @@ -1767,6 +1809,7 @@ memory=32 # always arm7tdmicc tool="$rootdir/tools/scramble -add tpj2" + bmp2rb_format=5 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 5" output="rockbox.elio" @@ -1791,6 +1834,7 @@ memory=32 # supposedly arm7tdmicc tool="$rootdir/tools/scramble -mi4v3 -model=9200 -type=RBOS" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.mi4" @@ -1815,6 +1859,7 @@ memory=32 # supposedly arm7tdmicc tool="$rootdir/tools/scramble -mi4v3 -model=1630 -type=RBOS" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.mi4" @@ -1839,6 +1884,7 @@ memory=16 # always arm940tbecc tool="cp" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.meizu" @@ -1861,6 +1907,7 @@ memory=16 # always arm940tbecc tool="cp" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.meizu" @@ -1883,6 +1930,7 @@ memory=16 # always arm940tbecc tool="cp" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.meizu" @@ -1905,6 +1953,7 @@ memory=16 #FIXME mipselcc tool="cp" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.vx747" @@ -1927,6 +1976,7 @@ memory=16 #FIXME mipselcc tool="cp" + bmp2rb_format=4 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4" output="rockbox.vx767" @@ -2357,6 +2407,7 @@ -e "s,@DLLWRAP@,${DLLWRAP},g" \ -e "s,@RANLIB@,${RANLIB},g" \ -e "s,@TOOL@,${tool},g" \ + -e "s,@BMP2RB_FORMAT@,${bmp2rb_format},g" \ -e "s,@BMP2RB_NATIVE@,${bmp2rb_native},g" \ -e "s,@BMP2RB_MONO@,${bmp2rb_mono},g" \ -e "s,@BMP2RB_REMOTENATIVE@,${bmp2rb_remotenative},g" \ @@ -2397,18 +2448,6 @@ <&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.") -ifeq (\$(call info),old) -export info=echo "\$\$(1)"; -endif - export ROOTDIR=@ROOTDIR@ export FIRMDIR=@FIRMDIR@ export APPSDIR=@APPSDIR@ @@ -2428,9 +2467,10 @@ export LANGUAGE=@LANGUAGE@ export VOICELANGUAGE=@VOICELANGUAGE@ export MEMORYSIZE=@MEMORY@ -export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR)) -export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') +export VERSION:=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR)) +export BUILDDATE:=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') export MKFIRMWARE=@TOOL@ +export BMP2RB_FORMAT=@BMP2RB_FORMAT@ export BMP2RB_MONO=@BMP2RB_MONO@ export BMP2RB_NATIVE=@BMP2RB_NATIVE@ export BMP2RB_REMOTEMONO=@BMP2RB_REMOTEMONO@ @@ -2469,131 +2509,8 @@ export ENCODER=@ENCODER@ export USE_ELF=@USE_ELF@ -# Do not print "Entering directory ..." -MAKEFLAGS += --no-print-directory +include \$(TOOLSDIR)/root.make -.PHONY: all clean tags zip tools manual bin build info langs - -all: info - -info: build - \$(SILENT)\$(TOOLSDIR)/mkinfo.pl \$(BUILDDIR)/rockbox-info.txt - -build: tools @LANGS@ - @SIMUL1@ - @SIMUL2@ - \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ - -bin: tools @LANGS@ - @SIMUL1@ - @SIMUL2@ - \$(SILENT)\$(MAKE) -C \$(FIRMDIR) OBJDIR=\$(BUILDDIR)/firmware - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ \$(BUILDDIR)/\$(BINARY) - -rocks: tools - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ rocks - -veryclean: clean toolsclean - -toolsclean: - \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) clean - -clean: - \$(SILENT)echo Cleaning build directory - \$(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \ - rockbox.tar.bz2 TAGS @APPS@ firmware comsim sim lang.[ch] \ - manual *.pdf *.a credits.raw @OUTPUT@ bitmaps pluginbitmaps \ - @ARCHOSROM@ @FLASHFILE@ UI256.bmp rockbox-full.zip \ - html txt rockbox-manual*.zip sysfont.h rockbox-info.txt \ - voicefontids *.wav *.mp3 *.voice max_language_size.h - -tools: - \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @TOOLSET@ - -voicetools: - \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) AR=\$(HOSTAR) @VOICETOOLSET@ - -tags: - \$(SILENT)rm -f TAGS - \$(SILENT)\$(MAKE) -C \$(FIRMDIR) tags - \$(SILENT)\$(MAKE) -C \$(APPSDIR) tags - \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins tags - \$(SILENT)\$(MAKE) -C \$(APPSDIR)/plugins/lib tags - -fontzip: - \$(SILENT)\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\" -r "\$(ROOTDIR)" -f 1 -o rockbox-fonts.zip \$(TARGET) \$(BINARY) - -zip: info - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\ - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY) - -mapzip: info - \$(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip - -fullzip: info - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\ - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -r "\$(ROOTDIR)" -f 2 -o rockbox-full.zip \$(TARGET) \$(BINARY) - -7zip: info - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\ - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY) - -tar: info - \$(SILENT)rm -f rockbox.tar - \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\ - \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY) - -bzip2: tar - \$(SILENT)bzip2 -f9 rockbox.tar - -gzip: tar - \$(SILENT)gzip -f9 rockbox.tar - -langs: features - \$(SILENT)mkdir -p \$(BUILDDIR)/apps/lang - \$(SILENT)\$(MAKE) -C \$(APPSDIR)/lang OBJDIR=\$(BUILDDIR)/apps/lang - -manual: manual-pdf -manual-pdf: - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-pdf -manual-html: - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-html -manual-zhtml: manual-zip -manual-txt: - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt -manual-ztxt: - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-txt-zip -manual-zip: - \$(SILENT)\$(MAKE) -C \$(MANUALDIR) OBJDIR=\$(BUILDDIR)/manual manual-zip - -features: tools - \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features - -help: - @echo "A few helpful make targets" - @echo "" - @echo "all - builds a full Rockbox (default), including tools" - @echo "bin - builds only the Rockbox. file" - @echo "rocks - builds only plugins and codecs" - @echo "clean - cleans a build directory (not tools)" - @echo "veryclean - cleans the build and tools directories" - @echo "manual - builds a manual" - @echo "manual-html - HTML manual" - @echo "manual-zip - HTML manual (zipped)" - @echo "manual-txt - txt manual" - @echo "fullzip - creates a rockbox.zip of your build with fonts" - @echo "zip - creates a rockbox.zip of your build (no fonts)" - @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)" - @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)" - @echo "7zip - creates a rockbox.7z of your build (no fonts)" - @echo "fontzip - creates rockbox-fonts.zip" - @echo "mapzip - creates rockbox-maps.zip with all .map files" - @echo "tools - builds the tools only" - @echo "voicetools - builds the voice tools only" - @echo "install - installs your build (for simulator builds only, no fonts)" - @echo "fullinstall - installs your build (for simulator builds only, with fonts)" - EOF if [ "yes" = "$simulator" ]; then Index: tools/rules.make =================================================================== --- tools/rules.make (revision 0) +++ tools/rules.make (revision 0) @@ -0,0 +1,52 @@ +# add the list of sources to build to the SRC variable + +# This uses the native 'gcc' compiler and not $(CC) since we use the -imacros +# option and older gcc compiler doesn't have that. We use one such older +# compiler for the win32 cross-compiles on Linux. +# +# The weird grep -v thing in here is due to Apple's stupidities and is needed +# to make this do right when used on Mac OS X. +# +# The sed line is to prepend the directory to all source files + +source2src = $(shell $(HOSTCC) $(INCLUDES) \ + $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -x c -imacros "config.h" $(1)/SOURCES 2>/dev/null | \ + grep -v '^\#' | \ + sed -e 's:^.\+:$(1)/&:') + +preprocess = $(shell $(HOSTCC) $(INCLUDES) \ + $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -x c -imacros "config.h" $(1)/$(2) 2>/dev/null | \ + grep -v '^\#' | \ + sed -e 's:^.\+:$(1)/&:') + +c2obj = $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR),$(BUILDDIR),$(1)))) + +# calculate dependencies for a list of source files $(2) and output them +# to a file $(1) + +mkdepfile = $(shell \ + for each in $(2); do \ + obj=`echo $$each | sed -e 's/\.[cS]/.o/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ + $(HOSTCC) -MG -MM -MT "$$obj" $(DEFINES) $(INCLUDES) $$each 2>/dev/null; \ + done | sed -e "s:[^[:space:]]*lang.h:$(BUILDDIR)/lang.o:" \ + -e "s:[^[:space:]]*sysfont.h:$(BUILDDIR)/sysfont.h:" \ + -e "s:[^[:space:]]*max_language_size.h:$(BUILDDIR)/max_language_size.h:" \ + -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ + -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ + -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ + -e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \ + > $(1); ) + +ifndef V +SILENT:=@ +else +VERBOSEOPT:=-v +endif +PRINTS=$(SILENT)$(call info,$(1)) + +# old 'make' versions don't have the built-in 'info' function +info=old$(shell echo >&2 "Consider upgrading to GNU make 3.81+ for optimum build performance.") +ifeq ($(call info),old) +export info=echo "$$(1)"; +endif + Index: tools/root.make =================================================================== --- tools/root.make (revision 0) +++ tools/root.make (revision 0) @@ -0,0 +1,211 @@ +# Do not print "Entering directory ..." +MAKEFLAGS += --no-print-directory + +include $(TOOLSDIR)/rules.make + +DEFINES = -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \ + -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" \ + -DAPPSVERSION=\"$(VERSION)\" $(BUILDDATE) $(BUILDDATE) $(TARGET) \ + -DROCKBOX \ + $(EXTRA_DEFINES) # <-- -DSIMULATOR or not +INCLUDES := -I$(BUILDDIR) + +CFLAGS = $(INCLUDES) $(GCCOPTS) $(DEFINES) #-Werror + +TOOLS := $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \ + $(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb + +# don't use builtin suffix list +.SUFFIXES: + +.PHONY: all clean tags zip tools manual bin build info langs + +ifneq ($(MAKECMDGOALS),clean) +DEPFILE := $(BUILDDIR)/make.dep +endif + +all: $(DEPFILE) build + +# Subdir makefiles. their primary purpose is to populate $(SRC), +# but they also define special dependencies +include $(TOOLSDIR)/tools.make +include $(FIRMDIR)/firmware.make +include $(APPSDIR)/apps.make +include $(APPSDIR)/lang/lang.make +include $(APPSDIR)/plugins/bitmaps/pluginbitmaps.make +include $(APPSDIR)/bitmaps/bitmaps.make +include $(APPSDIR)/plugins/plugins.make +include $(APPSDIR)/codecs/codecs.make + +OBJ := $(SRC:.c=.o) +OBJ := $(OBJ:.S=.o) +OBJ += $(BMP:.bmp=.o) +OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(OBJ)) + +build: $(TOOLS) $(BUILDDIR)/$(BINARY) $(CODECS) $(ROCKS) + +$(DEPFILE): + @echo Generating dependencies + $(call mkdepfile,$(DEPFILE),$(SRC) $(OTHER_SRC)) + $(call bmpdepfile,$(DEPFILE),$(BMP) $(PBMP)) + +LDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds +LINKFILE := $(BUILDDIR)/linkage.lds + +$(LINKFILE): $(LDS) + $(call PRINTS,PP $(@F))$(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -x c $(ROMBUILD) $< >$@ + +$(BUILDDIR)/rockbox.elf : $(OBJ) $(VOICESPEEXLIB) $(LINKFILE) + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \ + $(VOICESPEEXLIB) -lgcc -T$(LINKFILE) -Wl,-Map,$(BUILDDIR)/rockbox.map + +$(BUILDDIR)/rockbox.bin : $(BUILDDIR)/rockbox.elf + $(call PRINTS,OBJCOPY $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ + +# +# If there's a flashfile defined for this target (rockbox.ucl for Archos +# models) Then check if the mkfirmware script fails, as then it is (likely) +# because the image is too big and we need to create a compressed image +# instead. +# +$(BUILDDIR)/$(BINARY) : $(BUILDDIR)/rockbox.bin $(FLASHFILE) + $(call PRINTS,SCRAMBLE $(notdir $@))($(MKFIRMWARE) $< $@; \ + stat=$$?; \ + if test -n "$(FLASHFILE)"; then \ + if test "$$stat" -ne 0; then \ + echo "Image too big, making a compressed version!"; \ + $(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \ + $(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \ + fi \ + fi ) + +-include $(DEPFILE) + +####################### old stuff still to be done ######################### + +info: build + $(SILENT)$(TOOLSDIR)/mkinfo.pl $(BUILDDIR)/rockbox-info.txt + +old.build: tools langs + $(SILENT)$(MAKE) -C $(FIRMDIR) OBJDIR=$(BUILDDIR)/firmware + $(SILENT)$(MAKE) -C $(APPSDIR) OBJDIR=$(BUILDDIR)/apps + +bin: tools langs + $(SILENT)$(MAKE) -C $(FIRMDIR) OBJDIR=$(BUILDDIR)/firmware + $(SILENT)$(MAKE) -C $(APPSDIR) OBJDIR=$(BUILDDIR)/apps $(BUILDDIR)/$(BINARY) + +rocks: tools + $(SILENT)$(MAKE) -C $(APPSDIR) OBJDIR=$(BUILDDIR)/apps rocks + +veryclean: clean toolsclean + +toolsclean: + $(SILENT)$(MAKE) -C $(TOOLSDIR) clean + +clean: + $(SILENT)echo Cleaning build directory + $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz rockbox.tar.bz2 TAGS apps firmware comsim sim lang.[ch] manual *.pdf *.a credits.raw rockbox.ipod bitmaps pluginbitmaps UI256.bmp rockbox-full.zip html txt rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids *.wav *.mp3 *.voice max_language_size.h $(CLEANOBJS) $(LINKFILE) rockbox.elf rockbox.map rockbox.bin libspeex-core $(DEPFILE) $(TOOLS) + +tools: + $(SILENT)$(MAKE) -C $(TOOLSDIR) CC=$(HOSTCC) AR=$(HOSTAR) rdf2binary convbdf codepages scramble bmp2rb + +voicetools: + $(SILENT)$(MAKE) -C $(TOOLSDIR) CC=$(HOSTCC) AR=$(HOSTAR) rbspeexenc voicefont wavtrim + +tags: + $(SILENT)rm -f TAGS + $(SILENT)$(MAKE) -C $(FIRMDIR) tags + $(SILENT)$(MAKE) -C $(APPSDIR) tags + $(SILENT)$(MAKE) -C $(APPSDIR)/plugins tags + $(SILENT)$(MAKE) -C $(APPSDIR)/plugins/lib tags + +fontzip: + $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)\" -r "$(ROOTDIR)" -f 1 -o rockbox-fonts.zip $(TARGET) $(BINARY) + +zip: + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \ + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" $(TARGET) $(BINARY) + +mapzip: info + $(SILENT)find . -name "*.map" | xargs zip rockbox-maps.zip + +fullzip: info + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -r "$(ROOTDIR)" -f 2 -o rockbox-full.zip $(TARGET) $(BINARY) + +7zip: info + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.7z" -z "7za a -mx=9" -r "$(ROOTDIR)" $(TARGET) $(BINARY) + +tar: info + $(SILENT)rm -f rockbox.tar + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ + $(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(MODELNAME)$$feat\" -i \"$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "$(ROOTDIR)" $(TARGET) $(BINARY) + +bzip2: tar + $(SILENT)bzip2 -f9 rockbox.tar + +gzip: tar + $(SILENT)gzip -f9 rockbox.tar + +langs: features + $(SILENT)mkdir -p $(BUILDDIR)/apps/lang + $(SILENT)$(MAKE) -C $(APPSDIR)/lang OBJDIR=$(BUILDDIR)/apps/lang + +manual: manual-pdf +manual-pdf: + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-pdf +manual-html: + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-html +manual-zhtml: manual-zip +manual-txt: + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt +manual-ztxt: + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-txt-zip +manual-zip: + $(SILENT)$(MAKE) -C $(MANUALDIR) OBJDIR=$(BUILDDIR)/manual manual-zip + +features: tools + $(SILENT)$(MAKE) -C $(APPSDIR) OBJDIR=$(BUILDDIR)/apps features + +help: + @echo "A few helpful make targets" + @echo "" + @echo "all - builds a full Rockbox (default), including tools" + @echo "bin - builds only the Rockbox. file" + @echo "rocks - builds only plugins and codecs" + @echo "clean - cleans a build directory (not tools)" + @echo "veryclean - cleans the build and tools directories" + @echo "manual - builds a manual" + @echo "manual-html - HTML manual" + @echo "manual-zip - HTML manual (zipped)" + @echo "manual-txt - txt manual" + @echo "fullzip - creates a rockbox.zip of your build with fonts" + @echo "zip - creates a rockbox.zip of your build (no fonts)" + @echo "gzip - creates a rockbox.tar.gz of your build (no fonts)" + @echo "bzip2 - creates a rockbox.tar.bz2 of your build (no fonts)" + @echo "7zip - creates a rockbox.7z of your build (no fonts)" + @echo "fontzip - creates rockbox-fonts.zip" + @echo "mapzip - creates rockbox-maps.zip with all .map files" + @echo "tools - builds the tools only" + @echo "voicetools - builds the voice tools only" + @echo "install - installs your build (for simulator builds only, no fonts)" + @echo "fullinstall - installs your build (for simulator builds only, with fonts)" + +# when source and object are both in BUILDDIR (generated code): +%.o: %.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ + +%.o: %.S + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ + +# when source and object are in different locations (normal): +$(BUILDDIR)/%.o: $(ROOTDIR)/%.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ + +$(BUILDDIR)/%.o: $(ROOTDIR)/%.S + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ Index: tools/tools.make =================================================================== --- tools/tools.make (revision 0) +++ tools/tools.make (revision 0) @@ -0,0 +1,33 @@ +TOOLSCFLAGS := -O -g -W -Wall -Wshadow -pedantic -I$(ROOTDIR)/tools + +$(TOOLSDIR)/scramble: $(TOOLSDIR)/scramble.o $(TOOLSDIR)/iriver.o \ + $(TOOLSDIR)/mi4.o $(TOOLSDIR)/gigabeat.o \ + $(TOOLSDIR)/gigabeats.o $(TOOLSDIR)/telechips.o \ + $(TOOLSDIR)/iaudio_bl_flash.o \ + $(TOOLSDIR)/creative.o $(TOOLSDIR)/hmac-sha1.o + $(call PRINTS,LD $(@F)) + $(SILENT)$(HOSTCC) $(TOOLSCFLAGS) $+ -o $@ + +$(TOOLSDIR)/bmp2rb: $(TOOLSDIR)/bmp2rb.c + $(call PRINTS,CC $(@F)) + $(SILENT)$(HOSTCC) -DAPPLICATION_NAME=\"$@\" $(TOOLSCFLAGS) $+ -o $@ + +$(TOOLSDIR)/rdf2binary: $(TOOLSDIR)/rdf2binary.c + $(call PRINTS,CC $(@F)) + $(SILENT)$(HOSTCC) $(TOOLSCFLAGS) $+ -o $@ + +$(TOOLSDIR)/convbdf: $(TOOLSDIR)/convbdf.c + $(call PRINTS,CC $(@F)) + $(SILENT)$(HOSTCC) $(TOOLSCFLAGS) $+ -o $@ + +$(TOOLSDIR)/codepages: $(TOOLSDIR)/codepages.c $(TOOLSDIR)/codepage_tables.c + $(call PRINTS,CC $(@F)) + $(SILENT)$(HOSTCC) $(TOOLSCFLAGS) $+ -o $@ + +# pattern rule for compiling tools +$(ROOTDIR)/tools/%.o: $(ROOTDIR)/tools/%.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(@F)) + $(SILENT)$(HOSTCC) $(TOOLSCFLAGS) -c $< -o $@ + + Index: apps/lang/lang.make =================================================================== --- apps/lang/lang.make (revision 0) +++ apps/lang/lang.make (revision 0) @@ -0,0 +1,25 @@ +LANG = $(call source2src, $(APPSDIR)/lang); +LANGOBJ = $(LANG:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng) + +SRC += $(ROOTDIR)/lang.o # yes ROOTDIR. root.make will subst it to BUILDDIR. + +CLEANOBJS += $(BUILDDIR)/max_language_size.h $(BUILDDIR)/lang.* + +# $(BUILDDIR)/apps/lang must exist before we create dependencies on it, +# otherwise make will simply ignore those dependencies. +# Therefore we create it here. +#DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang) + +$(BUILDDIR)/max_language_size.h: $(LANGOBJ) + $(call PRINTS,Create $(notdir $@)) + $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@ + +$(BUILDDIR)/lang.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features + $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ + perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $< + $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ + +$(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features + $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<)) + $(SILENT)mkdir -p $(dir $@) + $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME)`cat $(BUILDDIR)/apps/genlang-features` -i=$(TARGET_ID) -b=$@ $< Index: apps/plugins/xobox.c =================================================================== --- apps/plugins/xobox.c (revision 19084) +++ apps/plugins/xobox.c (working copy) @@ -21,7 +21,7 @@ ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/test_resize.c =================================================================== --- apps/plugins/test_resize.c (revision 19084) +++ apps/plugins/test_resize.c (working copy) @@ -25,8 +25,8 @@ */ #include "plugin.h" -#include "pluginlib_actions.h" -#include "bmp.h" +#include "lib/pluginlib_actions.h" +#include "lib/bmp.h" PLUGIN_HEADER Index: apps/plugins/keybox.c =================================================================== --- apps/plugins/keybox.c (revision 19084) +++ apps/plugins/keybox.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "md5.h" +#include "lib/md5.h" PLUGIN_HEADER #define KEYBOX_FILE PLUGIN_DIR "/apps/keybox.dat" Index: apps/plugins/sliding_puzzle.c =================================================================== --- apps/plugins/sliding_puzzle.c (revision 19084) +++ apps/plugins/sliding_puzzle.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "bmp.h" +#include "lib/bmp.h" #ifdef HAVE_LCD_BITMAP PLUGIN_HEADER Index: apps/plugins/plasma.c =================================================================== --- apps/plugins/plasma.c (revision 19084) +++ apps/plugins/plasma.c (working copy) @@ -25,14 +25,14 @@ ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" #ifdef HAVE_LCD_BITMAP #ifndef HAVE_LCD_COLOR -#include "grey.h" +#include "lib/grey.h" #endif -#include "fixedpoint.h" +#include "lib/fixedpoint.h" PLUGIN_HEADER Index: apps/plugins/random_folder_advance_config.c =================================================================== --- apps/plugins/random_folder_advance_config.c (revision 19084) +++ apps/plugins/random_folder_advance_config.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "oldmenuapi.h" +#include "lib/oldmenuapi.h" PLUGIN_HEADER Index: apps/plugins/mandelbrot.c =================================================================== --- apps/plugins/mandelbrot.c (revision 19084) +++ apps/plugins/mandelbrot.c (working copy) @@ -23,8 +23,8 @@ #include "plugin.h" #ifdef HAVE_LCD_BITMAP -#include "grey.h" -#include "xlcd.h" +#include "lib/grey.h" +#include "lib/xlcd.h" PLUGIN_HEADER Index: apps/plugins/maze.c =================================================================== --- apps/plugins/maze.c (revision 19084) +++ apps/plugins/maze.c (working copy) @@ -31,7 +31,7 @@ */ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/wavrecord.c =================================================================== --- apps/plugins/wavrecord.c (revision 19084) +++ apps/plugins/wavrecord.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "configfile.h" +#include "lib/configfile.h" PLUGIN_HEADER Index: apps/plugins/oscilloscope.c =================================================================== --- apps/plugins/oscilloscope.c (revision 19084) +++ apps/plugins/oscilloscope.c (working copy) @@ -22,11 +22,11 @@ ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" #ifdef HAVE_LCD_BITMAP -#include "xlcd.h" -#include "configfile.h" +#include "lib/xlcd.h" +#include "lib/configfile.h" PLUGIN_HEADER Index: apps/plugins/euroconverter.c =================================================================== --- apps/plugins/euroconverter.c (revision 19084) +++ apps/plugins/euroconverter.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "configfile.h" +#include "lib/configfile.h" #ifdef HAVE_LCD_CHARCELLS Index: apps/plugins/video.c =================================================================== --- apps/plugins/video.c (revision 19084) +++ apps/plugins/video.c (working copy) @@ -29,7 +29,7 @@ #include "plugin.h" #include "sh7034.h" #include "system.h" -#include "helper.h" +#include "lib/helper.h" #ifndef SIMULATOR /* not for simulator by now */ #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */ Index: apps/plugins/zxbox.c =================================================================== --- apps/plugins/zxbox.c (revision 19084) +++ apps/plugins/zxbox.c (working copy) @@ -21,7 +21,7 @@ #if MEM <= 8 && !defined(SIMULATOR) -#include "overlay.h" +#include "lib/overlay.h" PLUGIN_HEADER Index: apps/plugins/fireworks.c =================================================================== --- apps/plugins/fireworks.c (revision 19084) +++ apps/plugins/fireworks.c (working copy) @@ -19,8 +19,8 @@ * ****************************************************************************/ #include "plugin.h" -#include "oldmenuapi.h" -#include "helper.h" +#include "lib/oldmenuapi.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/plugins.make =================================================================== --- apps/plugins/plugins.make (revision 0) +++ apps/plugins/plugins.make (revision 0) @@ -0,0 +1,46 @@ +PLUGINS_SRC := $(call source2src, $(APPSDIR)/plugins) +OTHER_SRC += $(PLUGINS_SRC) +ROCKS := $(PLUGINS_SRC:.c=.rock) +ROCKS := $(subst $(ROOTDIR),$(BUILDDIR),$(ROCKS)) + +PLUGINLIB := $(BUILDDIR)/apps/plugins/libplugin.a +PLUGINLIB_SRC := $(call source2src, $(APPSDIR)/plugins/lib) + +PLUGINLIB_OBJ := $(PLUGINLIB_SRC:.c=.o) +PLUGINLIB_OBJ := $(PLUGINLIB_OBJ:.S=.o) +PLUGINLIB_OBJ := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGINLIB_OBJ)) + +PLUGIN_LDS := $(APPSDIR)/plugins/plugin.lds +PLUGINLINK_LDS := $(BUILDDIR)/apps/plugins/pluginlink.lds + +# special compile flags for plugins: +PLUGINFLAGS := $(CFLAGS) -I$(APPSDIR)/plugins -DPLUGIN + +$(ROCKS): $(PLUGINLIB) $(APPSDIR)/plugin.h $(PLUGINLINK_LDS) $(PLUGINBITMAPLIB) + +$(PLUGINLIB): $(PLUGINLIB_OBJ) + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 + +$(PLUGINLINK_LDS): $(PLUGIN_LDS) + $(call PRINTS,PP $(@F))$(CC) $(CFLAGS) -E -P -x c $< >$@ + +$(BUILDDIR)/credits.raw credits.raw: $(DOCSDIR)/CREDITS + $(call PRINTS,Create credits.raw)perl $(APPSDIR)/plugins/credits.pl < $< > $(BUILDDIR)/$(@F) + +# special dependencies +$(BUILDDIR)/apps/plugins/wav2wv.rock: $(BUILDDIR)/apps/codecs/libwavpack.a + + +# special pattern rule for compiling plugins (-DPLUGIN) +$(BUILDDIR)/apps/plugins/%.o: $(ROOTDIR)/apps/plugins/%.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(@F))$(CC) $(PLUGINFLAGS) -c $< -o $@ + +$(BUILDDIR)/%.rock: $(BUILDDIR)/%.o $(PLUGINLIB) $(PLUGINBITMAPLIB) + $(SILENT)$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf $< \ + $(filter %.a, $^) \ + -lgcc -T$(PLUGINLINK_LDS) \ + -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/$*.map + $(call PRINTS,LD $(@F))$(OC) -O binary $(BUILDDIR)/$*.elf $(BUILDDIR)/$*.rock + +# -L$(BUILDDIR)/apps/codecs $(LCODECLIBS) Index: apps/plugins/starfield.c =================================================================== --- apps/plugins/starfield.c (revision 19084) +++ apps/plugins/starfield.c (working copy) @@ -18,7 +18,7 @@ ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" #ifdef HAVE_LCD_BITMAP /* and also not for the Player */ Index: apps/plugins/ppmviewer.c =================================================================== --- apps/plugins/ppmviewer.c (revision 19084) +++ apps/plugins/ppmviewer.c (working copy) @@ -20,7 +20,7 @@ ****************************************************************************/ #include "plugin.h" -#include "bmp.h" +#include "lib/bmp.h" #if defined(HAVE_LCD_COLOR) Index: apps/plugins/bitmaps/native/SOURCES =================================================================== --- apps/plugins/bitmaps/native/SOURCES (revision 19084) +++ apps/plugins/bitmaps/native/SOURCES (working copy) @@ -669,14 +669,14 @@ /* pictureflow */ #if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE) #if (LCD_WIDTH < 200) - pictureflow_logo.100x18x16.bmp +pictureflow_logo.100x18x16.bmp #else - pictureflow_logo.193x34x16.bmp +pictureflow_logo.193x34x16.bmp #endif #if (LCD_HEIGHT < 100 ) - pictureflow_emptyslide.50x50x16.bmp +pictureflow_emptyslide.50x50x16.bmp #else - pictureflow_emptyslide.100x100x16.bmp +pictureflow_emptyslide.100x100x16.bmp #endif #endif @@ -689,53 +689,53 @@ #if defined HAVE_LCD_COLOR #if SMALLER_DIMENSION <= 80 - sliding_puzzle.80x80x16.bmp +sliding_puzzle.80x80x16.bmp #elif SMALLER_DIMENSION <= 108 - sliding_puzzle.108x108x16.bmp +sliding_puzzle.108x108x16.bmp #elif SMALLER_DIMENSION <= 128 - sliding_puzzle.128x128x16.bmp +sliding_puzzle.128x128x16.bmp #elif SMALLER_DIMENSION <= 132 - sliding_puzzle.132x132x16.bmp +sliding_puzzle.132x132x16.bmp #elif SMALLER_DIMENSION <= 176 - sliding_puzzle.176x176x16.bmp +sliding_puzzle.176x176x16.bmp #elif SMALLER_DIMENSION <= 240 - sliding_puzzle.240x240x16.bmp +sliding_puzzle.240x240x16.bmp #endif #elif (LCD_DEPTH > 1) #if SMALLER_DIMENSION <= 96 - sliding_puzzle.96x96x2.bmp +sliding_puzzle.96x96x2.bmp #elif SMALLER_DIMENSION <= 110 - sliding_puzzle.108x108x2.bmp +sliding_puzzle.108x108x2.bmp #elif SMALLER_DIMENSION <= 128 - sliding_puzzle.128x128x2.bmp +sliding_puzzle.128x128x2.bmp #endif #else /* mono targets, one size currently */ - sliding_puzzle.80x64x1.bmp +sliding_puzzle.80x64x1.bmp #endif /* Logo */ #if LCD_DEPTH == 16 #if (LCD_WIDTH >= 320) - rockboxlogo.220x68x16.bmp +rockboxlogo.220x68x16.bmp #elif (LCD_WIDTH > 160) - rockboxlogo.128x40x16.bmp +rockboxlogo.128x40x16.bmp #else - rockboxlogo.90x28x16.bmp +rockboxlogo.90x28x16.bmp #endif #elif LCD_DEPTH == 2 #if (LCD_WIDTH > 138) - rockboxlogo.138x46x2.bmp +rockboxlogo.138x46x2.bmp #else - rockboxlogo.91x32x2.bmp +rockboxlogo.91x32x2.bmp #endif #elif LCD_DEPTH == 1 #if (LCD_WIDTH > 112) /* Such a screen isn't currently in any target */ - rockboxlogo.112x30x1.bmp +rockboxlogo.112x30x1.bmp #else - rockboxlogo.91x32x1.bmp +rockboxlogo.91x32x1.bmp #endif #endif Index: apps/plugins/bitmaps/pluginbitmaps.make =================================================================== --- apps/plugins/bitmaps/pluginbitmaps.make (revision 0) +++ apps/plugins/bitmaps/pluginbitmaps.make (revision 0) @@ -0,0 +1,24 @@ +PBMPINCDIR := $(BUILDDIR)/pluginbitmaps + +PFLAGS += -I$(PBMPINCDIR) + +PBMP = $(call source2src, $(APPSDIR)/plugins/bitmaps/mono) +PBMP += $(call source2src, $(APPSDIR)/plugins/bitmaps/native) +PBMP += $(call source2src, $(APPSDIR)/plugins/bitmaps/remote_mono) +PBMP += $(call source2src, $(APPSDIR)/plugins/bitmaps/remote_native) + +BMP += $(PBMP) + +PLUGIN_BITMAPS := $(BMP:.bmp=.o) +PLUGIN_BITMAPS := $(subst $(ROOTDIR),$(BUILDDIR),$(PLUGIN_BITMAPS)) + +PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a +PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB)) + +$(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS) + $(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1 + +# pattern rule to create .c files from .bmp +$(BUILDDIR)/apps/plugins/%.c: $(ROOTDIR)/apps/plugins/%.bmp + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) + $(call PRINTS,BMP2RB $( $@ Index: apps/plugins/chessbox.c =================================================================== --- apps/plugins/chessbox.c (revision 19084) +++ apps/plugins/chessbox.c (working copy) @@ -24,7 +24,7 @@ #if MEM <= 8 && !defined(SIMULATOR) -#include "overlay.h" +#include "lib/overlay.h" PLUGIN_HEADER Index: apps/plugins/test_sampr.c =================================================================== --- apps/plugins/test_sampr.c (revision 19084) +++ apps/plugins/test_sampr.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "oldmenuapi.h" +#include "lib/oldmenuapi.h" PLUGIN_HEADER Index: apps/plugins/rockblox.c =================================================================== --- apps/plugins/rockblox.c (revision 19084) +++ apps/plugins/rockblox.c (working copy) @@ -21,9 +21,9 @@ * ****************************************************************************/ #include "plugin.h" -#include "highscore.h" -#include "playergfx.h" -#include "helper.h" +#include "lib/highscore.h" +#include "lib/playergfx.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/fire.c =================================================================== --- apps/plugins/fire.c (revision 19084) +++ apps/plugins/fire.c (working copy) @@ -22,14 +22,14 @@ ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" #ifdef HAVE_LCD_BITMAP -#include "pluginlib_actions.h" -#include "fixedpoint.h" +#include "lib/pluginlib_actions.h" +#include "lib/fixedpoint.h" #ifndef HAVE_LCD_COLOR -#include "grey.h" +#include "lib/grey.h" #endif #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) Index: apps/plugins/solitaire.c =================================================================== --- apps/plugins/solitaire.c (revision 19084) +++ apps/plugins/solitaire.c (working copy) @@ -20,11 +20,11 @@ ****************************************************************************/ #include "plugin.h" -#include "playback_control.h" -#include "configfile.h" +#include "lib/playback_control.h" +#include "lib/configfile.h" #include "button.h" #include "lcd.h" -#include "oldmenuapi.h" +#include "lib/oldmenuapi.h" #ifdef HAVE_LCD_BITMAP Index: apps/plugins/rocklife.c =================================================================== --- apps/plugins/rocklife.c (revision 19084) +++ apps/plugins/rocklife.c (working copy) @@ -61,8 +61,8 @@ */ #include "plugin.h" -#include "pluginlib_actions.h" -#include "helper.h" +#include "lib/pluginlib_actions.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/pictureflow.c =================================================================== --- apps/plugins/pictureflow.c (revision 19084) +++ apps/plugins/pictureflow.c (working copy) @@ -24,10 +24,10 @@ ****************************************************************************/ #include "plugin.h" -#include "pluginlib_actions.h" -#include "helper.h" -#include "bmp.h" -#include "picture.h" +#include "lib/pluginlib_actions.h" +#include "lib/helper.h" +#include "lib/bmp.h" +#include "lib/picture.h" #include "pluginbitmaps/pictureflow_logo.h" #include "pluginbitmaps/pictureflow_emptyslide.h" Index: apps/plugins/dice.c =================================================================== --- apps/plugins/dice.c (revision 19084) +++ apps/plugins/dice.c (working copy) @@ -20,8 +20,8 @@ ****************************************************************************/ #include "plugin.h" -#include "pluginlib_actions.h" -#include "configfile.h" +#include "lib/pluginlib_actions.h" +#include "lib/configfile.h" #define MAX_DICES 12 #define INITIAL_NB_DICES 1 Index: apps/plugins/bounce.c =================================================================== --- apps/plugins/bounce.c (revision 19084) +++ apps/plugins/bounce.c (working copy) @@ -20,7 +20,7 @@ **************************************************************************/ #include "plugin.h" #include "time.h" -#include "fixedpoint.h" +#include "lib/fixedpoint.h" PLUGIN_HEADER Index: apps/plugins/cube.c =================================================================== --- apps/plugins/cube.c (revision 19084) +++ apps/plugins/cube.c (working copy) @@ -21,10 +21,10 @@ * ***************************************************************************/ #include "plugin.h" -#include "grey.h" -#include "playergfx.h" -#include "xlcd.h" -#include "fixedpoint.h" +#include "lib/grey.h" +#include "lib/playergfx.h" +#include "lib/xlcd.h" +#include "lib/fixedpoint.h" PLUGIN_HEADER Index: apps/plugins/greyscale.c =================================================================== --- apps/plugins/greyscale.c (revision 19084) +++ apps/plugins/greyscale.c (working copy) @@ -22,10 +22,10 @@ ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) -#include "grey.h" +#include "lib/grey.h" PLUGIN_HEADER Index: apps/plugins/vu_meter.c =================================================================== --- apps/plugins/vu_meter.c (revision 19084) +++ apps/plugins/vu_meter.c (working copy) @@ -18,7 +18,7 @@ * **************************************************************************/ #include "plugin.h" -#include "fixedpoint.h" +#include "lib/fixedpoint.h" #if defined(HAVE_LCD_BITMAP) Index: apps/plugins/snow.c =================================================================== --- apps/plugins/snow.c (revision 19084) +++ apps/plugins/snow.c (working copy) @@ -19,7 +19,7 @@ * **************************************************************************/ #include "plugin.h" -#include "playergfx.h" +#include "lib/playergfx.h" PLUGIN_HEADER Index: apps/plugins/test_disk.c =================================================================== --- apps/plugins/test_disk.c (revision 19084) +++ apps/plugins/test_disk.c (working copy) @@ -20,8 +20,8 @@ ****************************************************************************/ #include "plugin.h" -#include "oldmenuapi.h" -#include "helper.h" +#include "lib/oldmenuapi.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/lamp.c =================================================================== --- apps/plugins/lamp.c (revision 19084) +++ apps/plugins/lamp.c (working copy) @@ -23,7 +23,7 @@ ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/jackpot.c =================================================================== --- apps/plugins/jackpot.c (revision 19084) +++ apps/plugins/jackpot.c (working copy) @@ -20,8 +20,8 @@ ****************************************************************************/ #include "plugin.h" -#include "pluginlib_actions.h" -#include "picture.h" +#include "lib/pluginlib_actions.h" +#include "lib/picture.h" PLUGIN_HEADER Index: apps/plugins/spacerocks.c =================================================================== --- apps/plugins/spacerocks.c (revision 19084) +++ apps/plugins/spacerocks.c (working copy) @@ -20,9 +20,7 @@ ****************************************************************************/ #include "plugin.h" -#include "math.h" -#include "stdio.h" -#include "helper.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/logo.c =================================================================== --- apps/plugins/logo.c (revision 19084) +++ apps/plugins/logo.c (working copy) @@ -19,7 +19,7 @@ * **************************************************************************/ #include "plugin.h" -#include "playergfx.h" +#include "lib/playergfx.h" PLUGIN_HEADER Index: apps/plugins/brickmania.c =================================================================== --- apps/plugins/brickmania.c (revision 19084) +++ apps/plugins/brickmania.c (working copy) @@ -20,8 +20,8 @@ ****************************************************************************/ #include "plugin.h" -#include "configfile.h" /* Part of libplugin */ -#include "helper.h" +#include "lib/configfile.h" /* Part of libplugin */ +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/chopper.c =================================================================== --- apps/plugins/chopper.c (revision 19084) +++ apps/plugins/chopper.c (working copy) @@ -21,9 +21,9 @@ ****************************************************************************/ #include "plugin.h" -#include "xlcd.h" -#include "configfile.h" -#include "helper.h" +#include "lib/xlcd.h" +#include "lib/configfile.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/viewer.c =================================================================== --- apps/plugins/viewer.c (revision 19084) +++ apps/plugins/viewer.c (working copy) @@ -21,8 +21,8 @@ ****************************************************************************/ #include "plugin.h" #include -#include "playback_control.h" -#include "oldmenuapi.h" +#include "lib/playback_control.h" +#include "lib/oldmenuapi.h" PLUGIN_HEADER Index: apps/plugins/mazezam.c =================================================================== --- apps/plugins/mazezam.c (revision 19084) +++ apps/plugins/mazezam.c (working copy) @@ -20,10 +20,10 @@ * ****************************************************************************/ #include "plugin.h" -#include "configfile.h" -#include "helper.h" -#include "pluginlib_actions.h" -#include "playback_control.h" +#include "lib/configfile.h" +#include "lib/helper.h" +#include "lib/pluginlib_actions.h" +#include "lib/playback_control.h" /* Include standard plugin macro */ PLUGIN_HEADER Index: apps/plugins/metronome.c =================================================================== --- apps/plugins/metronome.c (revision 19084) +++ apps/plugins/metronome.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "pluginlib_actions.h" +#include "lib/pluginlib_actions.h" PLUGIN_HEADER Index: apps/plugins/rockboy.c =================================================================== --- apps/plugins/rockboy.c (revision 19084) +++ apps/plugins/rockboy.c (working copy) @@ -24,7 +24,7 @@ #if MEM <= 8 && !defined(SIMULATOR) -#include "overlay.h" +#include "lib/overlay.h" PLUGIN_HEADER Index: apps/plugins/demystify.c =================================================================== --- apps/plugins/demystify.c (revision 19084) +++ apps/plugins/demystify.c (working copy) @@ -24,8 +24,8 @@ #include "plugin.h" #ifdef HAVE_LCD_BITMAP -#include "pluginlib_actions.h" -#include "helper.h" +#include "lib/pluginlib_actions.h" +#include "lib/helper.h" PLUGIN_HEADER #define DEFAULT_WAIT_TIME 3 Index: apps/plugins/bubbles.c =================================================================== --- apps/plugins/bubbles.c (revision 19084) +++ apps/plugins/bubbles.c (working copy) @@ -25,9 +25,9 @@ #ifdef HAVE_LCD_BITMAP -#include "xlcd.h" -#include "pluginlib_actions.h" -#include "fixedpoint.h" +#include "lib/xlcd.h" +#include "lib/pluginlib_actions.h" +#include "lib/fixedpoint.h" PLUGIN_HEADER Index: apps/plugins/mosaique.c =================================================================== --- apps/plugins/mosaique.c (revision 19084) +++ apps/plugins/mosaique.c (working copy) @@ -19,7 +19,7 @@ * **************************************************************************/ #include "plugin.h" -#include "playergfx.h" +#include "lib/playergfx.h" PLUGIN_HEADER Index: apps/plugins/test_fps.c =================================================================== --- apps/plugins/test_fps.c (revision 19084) +++ apps/plugins/test_fps.c (working copy) @@ -19,8 +19,8 @@ * ****************************************************************************/ #include "plugin.h" -#include "helper.h" -#include "grey.h" +#include "lib/helper.h" +#include "lib/grey.h" #ifdef HAVE_LCD_BITMAP Index: apps/plugins/robotfindskitten.c =================================================================== --- apps/plugins/robotfindskitten.c (revision 19084) +++ apps/plugins/robotfindskitten.c (working copy) @@ -29,7 +29,7 @@ */ #include "plugin.h" -#include "pluginlib_actions.h" +#include "lib/pluginlib_actions.h" /* This macros must always be included. Should be placed at the top by convention, although the actual position doesn't matter */ Index: apps/plugins/jewels.c =================================================================== --- apps/plugins/jewels.c (revision 19084) +++ apps/plugins/jewels.c (working copy) @@ -22,7 +22,7 @@ ****************************************************************************/ #include "plugin.h" -#include "playback_control.h" +#include "lib/playback_control.h" #ifdef HAVE_LCD_BITMAP Index: apps/plugins/wormlet.c =================================================================== --- apps/plugins/wormlet.c (revision 19084) +++ apps/plugins/wormlet.c (working copy) @@ -19,8 +19,8 @@ * ****************************************************************************/ #include "plugin.h" -#include "configfile.h" -#include "helper.h" +#include "lib/configfile.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/invadrox.c =================================================================== --- apps/plugins/invadrox.c (revision 19084) +++ apps/plugins/invadrox.c (working copy) @@ -26,8 +26,8 @@ */ #include "plugin.h" -#include "highscore.h" -#include "helper.h" +#include "lib/highscore.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/plugins/rockpaint.c =================================================================== --- apps/plugins/rockpaint.c (revision 19084) +++ apps/plugins/rockpaint.c (working copy) @@ -29,7 +29,6 @@ */ #include "plugin.h" -#include "errno.h" #include "lib/bmp.h" #include "lib/rgb_hsv.h" Index: apps/plugins/text_editor.c =================================================================== --- apps/plugins/text_editor.c (revision 19084) +++ apps/plugins/text_editor.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "playback_control.h" +#include "lib/playback_control.h" #if PLUGIN_BUFFER_SIZE > 0x45000 #define MAX_CHARS 0x40000 /* 128 kiB */ Index: apps/plugins/credits.c =================================================================== --- apps/plugins/credits.c (revision 19084) +++ apps/plugins/credits.c (working copy) @@ -19,7 +19,7 @@ * ****************************************************************************/ #include "plugin.h" -#include "helper.h" +#include "lib/helper.h" PLUGIN_HEADER Index: apps/bitmaps/bitmaps.make =================================================================== --- apps/bitmaps/bitmaps.make (revision 0) +++ apps/bitmaps/bitmaps.make (revision 0) @@ -0,0 +1,31 @@ +BMPINCDIR := $(BUILDDIR)/bitmaps + +INCLUDES += -I$(BMPINCDIR) +BMP = $(call source2src, $(APPSDIR)/bitmaps/mono) +BMP += $(call source2src, $(APPSDIR)/bitmaps/native) +BMP += $(call source2src, $(APPSDIR)/bitmaps/remote_mono) +BMP += $(call source2src, $(APPSDIR)/bitmaps/remote_native) + +BMPOBJ = $(BMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o); +BMPSRC = $(BMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.c); + +$(BMPINCDIR)/usblogo.h $(BMPINCDIR)/default_icons.h $(BMPINCDIR)/rockboxlogo.h: $(BMPOBJ) + +# pattern rule to create .c files from .bmp +$(BUILDDIR)/%.c: $(ROOTDIR)/%.bmp + $(SILENT)mkdir -p $(dir $@) $(BMPINCDIR) + $(call PRINTS,BMP2RB $( $@ + +# function to create .bmp dependencies +bmpdepfile = $(shell \ + for each in $(2); do \ + obj=`echo $$each | sed -e 's/\.bmp/.o/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ + src=`echo $$each | sed -e 's/\.bmp/.c/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ + echo $$obj: $$src; \ + echo $$src: $$each; \ + done \ + >> $(1); ) + +clean-bitmaps: + $(SILENT)rm $(BMPOBJ) $(BMPSRC) + $(SILENT)rmdir $(BMPINCDIR) Index: apps/apps.make =================================================================== --- apps/apps.make (revision 0) +++ apps/apps.make (revision 0) @@ -0,0 +1,10 @@ +INCLUDES += -I$(APPSDIR) $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) +SRC += $(call source2src, $(APPSDIR)) + +$(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt + $(SILENT)mkdir -p $(dir $@) + $(SILENT)cat $< | $(HOSTCC) $(INCLUDES) $(DEFINES) $(EXTRA_DEFINES) \ + -E -P -imacros "config.h" -imacros "button.h" - | \ + grep -v "^\#" | grep -v "^$$" > $@; \ + for f in `cat $@`; do feat="$$feat:$$f" ; done ; \ + echo "$$feat" >$(BUILDDIR)/apps/genlang-features Index: apps/codecs/ape.c =================================================================== --- apps/codecs/ape.c (revision 19084) +++ apps/codecs/ape.c (working copy) @@ -20,7 +20,6 @@ ****************************************************************************/ #include "codeclib.h" -#define ROCKBOX #include CODEC_HEADER Index: apps/codecs/libspeex/libspeex.make =================================================================== --- apps/codecs/libspeex/libspeex.make (revision 0) +++ apps/codecs/libspeex/libspeex.make (revision 0) @@ -0,0 +1,45 @@ +# we need to build two different speex libraries +# (one for codec, one for core voice) +# so a little trickery is necessary + +SPEEXFLAGS := $(CODECFLAGS) -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER \ + -I$(APPSDIR)/codecs/libspeex +VOICESPEEXFLAGS := $(SPEEXFLAGS) -DROCKBOX_VOICE_CODEC + +# libspeex +SPEEXLIB := $(CODECDIR)/libspeex.a +SPEEXLIB_SRC := $(call source2src, $(APPSDIR)/codecs/libspeex) +SPEEXLIB_OBJ := $(call c2obj, $(SPEEXLIB_SRC)) + +$(SPEEXLIB): $(SPEEXLIB_OBJ) + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 + +# libspeex-voice +VOICESPEEXLIB := $(CODECDIR)/libspeex-voice.a +VOICESPEEXLIB_SRC := $(call source2src, $(APPSDIR)/codecs/libspeex) +VOICESPEEXLIB_OBJ := $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR)/apps/codecs/libspeex,$(BUILDDIR)/apps/codecs/libspeex-voice,$(VOICESPEEXLIB_SRC)))) + +$(VOICESPEEXLIB): $(VOICESPEEXLIB_OBJ) + $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 + +# pattern rules + +$(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ + $(CC) $(VOICESPEEXFLAGS) -c $< -o $@ + +$(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ + $(CC) $(VOICESPEEXFLAGS) -c $< -o $@ + +$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ + $(CC) $(SPEEXFLAGS) -c $< -o $@ + +$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \ + $(CC) $(SPEEXFLAGS) -c $< -o $@ Index: apps/codecs/libspeex/cb_search.c =================================================================== --- apps/codecs/libspeex/cb_search.c (revision 19084) +++ apps/codecs/libspeex/cb_search.c (working copy) @@ -522,6 +522,9 @@ spx_int32_t *seed ) { + (void)nsf; + (void)stack; + (void)seed; int i,j; VARDECL(int *ind); VARDECL(int *signs); @@ -609,6 +612,9 @@ spx_int32_t *seed ) { + (void)par; + (void)bits; + (void)stack; int i; /* FIXME: This is bad, but I don't think the function ever gets called anyway */ for (i=0;i63) Index: apps/codecs/libspeex/filters.c =================================================================== --- apps/codecs/libspeex/filters.c (revision 19084) +++ apps/codecs/libspeex/filters.c (working copy) @@ -681,6 +681,9 @@ char *stack ) { + (void)ak; + (void)p; + (void)stack; int i; VARDECL(spx_word16_t *iexc); spx_word16_t old_ener, new_ener; Index: apps/codecs/libspeex/rockbox.h =================================================================== --- apps/codecs/libspeex/rockbox.h (revision 19084) +++ apps/codecs/libspeex/rockbox.h (working copy) @@ -75,6 +75,9 @@ #define OVERRIDE_SPEEX_FATAL 1 static inline void _speex_fatal(const char *str, const char *file, int line) { + (void)str; + (void)file; + (void)line; DEBUGF("Fatal error: %s\n", str); //exit(1); } @@ -82,24 +85,30 @@ #define OVERRIDE_SPEEX_WARNING 1 static inline void speex_warning(const char *str) { + (void)str; DEBUGF("warning: %s\n", str); } #define OVERRIDE_SPEEX_WARNING_INT 1 static inline void speex_warning_int(const char *str, int val) { + (void)str; + (void)val; DEBUGF("warning: %s %d\n", str, val); } #define OVERRIDE_SPEEX_NOTIFY 1 static inline void speex_notify(const char *str) { + (void)str; DEBUGF("notice: %s\n", str); } #define OVERRIDE_SPEEX_PUTC 1 static inline void _speex_putc(int ch, void *file) { + (void)ch; + (void)file; //FILE *f = (FILE *)file; //printf("%c", ch); } Index: apps/codecs/libspeex/ltp_arm4.h =================================================================== --- apps/codecs/libspeex/ltp_arm4.h (revision 19084) +++ apps/codecs/libspeex/ltp_arm4.h (working copy) @@ -87,6 +87,7 @@ #define OVERRIDE_PITCH_XCORR void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack) { + (void)stack; int i,j; for (i=0;i /** Basic configuration options **/ Index: firmware/target/arm/ipod/app.lds =================================================================== --- firmware/target/arm/ipod/app.lds (revision 19084) +++ firmware/target/arm/ipod/app.lds (working copy) @@ -4,7 +4,7 @@ OUTPUT_FORMAT(elf32-littlearm) OUTPUT_ARCH(arm) -STARTUP(target/arm/crt0-pp.o) +/*STARTUP(target/arm/crt0-pp.o)*/ #define PLUGINSIZE PLUGIN_BUFFER_SIZE #define CODECSIZE CODEC_SIZE Index: firmware/firmware.make =================================================================== --- firmware/firmware.make (revision 0) +++ firmware/firmware.make (revision 0) @@ -0,0 +1,22 @@ +INCLUDES += $(TARGET_INC) -I$(FIRMDIR) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers +SRC += $(call source2src, $(FIRMDIR)) +SRC += $(ROOTDIR)/sysfont.o + +SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf + +CLEANOBJS += $(BUILDDIR)/sysfont.* + +# Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds +ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES))) + MAXCHAR = 127 +else + MAXCHAR = 255 +endif + +$(BUILDDIR)/sysfont.h: $(SYSFONT) $(TOOLS) + $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $< + +$(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h + $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $< + $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@ +