Index: include/conf.h
===================================================================
--- include/conf.h	(Revision 613)
+++ include/conf.h	(Arbeitskopie)
@@ -309,8 +309,8 @@
 
 // reyalp: putting these in conf, since the conf values are lookups for them
 // prefixes and extentions available for raw images (index with conf.raw_prefix etc)
-#define NUM_IMG_PREFIXES 3 // IMG_ CRW_ SND_ (could add ETC_ SDR_ AUT_ MVI_ MRK_)
-#define NUM_IMG_EXTS 5 // .JPG .CRW .CR2 .THM .WAV (could add .AVI .MRK)
+#define NUM_IMG_PREFIXES 9 // see conf.c for the list
+#define NUM_IMG_EXTS 8 // see conf.c for the list
 extern const char* img_prefixes[NUM_IMG_PREFIXES];
 extern const char* img_exts[NUM_IMG_EXTS];
 // ugh, but various things need it
Index: include/lolevel.h
===================================================================
--- include/lolevel.h	(Revision 613)
+++ include/lolevel.h	(Arbeitskopie)
@@ -42,6 +42,10 @@
 extern void _SleepTask(long msec);
 extern void __attribute__((noreturn)) _ExitTask();
 extern int _taskNameToId(char* taskName); // VxWorks only, task's name first letter must be 't', maximum 10 chars total 
+// for getting and setting environment variables. Those somehow seem to
+// influence time based functions, but this is mainly for playing around
+extern char* _getenv(const char* name); 
+extern int _putenv(char* string);
 extern const char *_taskName(int taskID); // VxWorks only for now
 extern int _taskIdListGet(int *idlist,int max); // VxWorks only for now
 extern void _taskSuspend(int taskId); 
Index: platform/s2is/sub/100e/makefile.inc.new
===================================================================
--- platform/s2is/sub/100e/makefile.inc.new	(Revision 0)
+++ platform/s2is/sub/100e/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/s2is/sub/100f/makefile.inc.new
===================================================================
--- platform/s2is/sub/100f/makefile.inc.new	(Revision 0)
+++ platform/s2is/sub/100f/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/s2is/sub/100g/makefile.inc.new
===================================================================
--- platform/s2is/sub/100g/makefile.inc.new	(Revision 0)
+++ platform/s2is/sub/100g/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/s2is/makefile.inc.new
===================================================================
--- platform/s2is/makefile.inc.new	(Revision 0)
+++ platform/s2is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/s3is/sub/100a/makefile.inc.new
===================================================================
--- platform/s3is/sub/100a/makefile.inc.new	(Revision 0)
+++ platform/s3is/sub/100a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/s3is/makefile.inc.new
===================================================================
--- platform/s3is/makefile.inc.new	(Revision 0)
+++ platform/s3is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus65_sd630/sub/100a/makefile.inc.new
===================================================================
--- platform/ixus65_sd630/sub/100a/makefile.inc.new	(Revision 0)
+++ platform/ixus65_sd630/sub/100a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus65_sd630/makefile.inc.new
===================================================================
--- platform/ixus65_sd630/makefile.inc.new	(Revision 0)
+++ platform/ixus65_sd630/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/s5is/sub/101a/makefile.inc.new
===================================================================
--- platform/s5is/sub/101a/makefile.inc.new	(Revision 0)
+++ platform/s5is/sub/101a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o  lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c 
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/s5is/sub/101b/makefile.inc.new
===================================================================
--- platform/s5is/sub/101b/makefile.inc.new	(Revision 0)
+++ platform/s5is/sub/101b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/s5is/makefile.inc.new
===================================================================
--- platform/s5is/makefile.inc.new	(Revision 0)
+++ platform/s5is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus70_sd1000/sub/100c/makefile.inc.new
===================================================================
--- platform/ixus70_sd1000/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/ixus70_sd1000/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus70_sd1000/sub/101b/makefile.inc.new
===================================================================
--- platform/ixus70_sd1000/sub/101b/makefile.inc.new	(Revision 0)
+++ platform/ixus70_sd1000/sub/101b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus70_sd1000/sub/102a/makefile.inc.new
===================================================================
--- platform/ixus70_sd1000/sub/102a/makefile.inc.new	(Revision 0)
+++ platform/ixus70_sd1000/sub/102a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c 
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus70_sd1000/makefile.inc.new
===================================================================
--- platform/ixus70_sd1000/makefile.inc.new	(Revision 0)
+++ platform/ixus70_sd1000/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixusW_sd430/sub/110a/makefile.inc.new
===================================================================
--- platform/ixusW_sd430/sub/110a/makefile.inc.new	(Revision 0)
+++ platform/ixusW_sd430/sub/110a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixusW_sd430/makefile.inc.new
===================================================================
--- platform/ixusW_sd430/makefile.inc.new	(Revision 0)
+++ platform/ixusW_sd430/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus850_sd800/sub/100e/makefile.inc.new
===================================================================
--- platform/ixus850_sd800/sub/100e/makefile.inc.new	(Revision 0)
+++ platform/ixus850_sd800/sub/100e/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus850_sd800/makefile.inc.new
===================================================================
--- platform/ixus850_sd800/makefile.inc.new	(Revision 0)
+++ platform/ixus850_sd800/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus40_sd300/sub/100j/makefile.inc.new
===================================================================
--- platform/ixus40_sd300/sub/100j/makefile.inc.new	(Revision 0)
+++ platform/ixus40_sd300/sub/100j/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus40_sd300/sub/100k/makefile.inc.new
===================================================================
--- platform/ixus40_sd300/sub/100k/makefile.inc.new	(Revision 0)
+++ platform/ixus40_sd300/sub/100k/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus40_sd300/makefile.inc.new
===================================================================
--- platform/ixus40_sd300/makefile.inc.new	(Revision 0)
+++ platform/ixus40_sd300/makefile.inc.new	(Revision 0)
@@ -0,0 +1,5 @@
+
+EXTRA_ASM_OBJS := stubs_auto.o
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a700/sub/100b/makefile.inc.new
===================================================================
--- platform/a700/sub/100b/makefile.inc.new	(Revision 0)
+++ platform/a700/sub/100b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a700/makefile.inc.new
===================================================================
--- platform/a700/makefile.inc.new	(Revision 0)
+++ platform/a700/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a620/sub/100f/makefile.inc.new
===================================================================
--- platform/a620/sub/100f/makefile.inc.new	(Revision 0)
+++ platform/a620/sub/100f/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a620/makefile.inc.new
===================================================================
--- platform/a620/makefile.inc.new	(Revision 0)
+++ platform/a620/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a540/sub/100b/makefile.inc.new
===================================================================
--- platform/a540/sub/100b/makefile.inc.new	(Revision 0)
+++ platform/a540/sub/100b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a540/makefile.inc.new
===================================================================
--- platform/a540/makefile.inc.new	(Revision 0)
+++ platform/a540/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a720/sub/100c/stubs_auto.S
===================================================================
--- platform/a720/sub/100c/stubs_auto.S	(Revision 613)
+++ platform/a720/sub/100c/stubs_auto.S	(Arbeitskopie)
@@ -8,10 +8,13 @@
 STUB(FFC00FB8)
 STUB(FFC014D0)
 STUB(FFC02D70)
+STUB(FFc0357C)
 STUB(FFC049E0)
+STUB(FFc04ACC)
 STUB(FFC04EB0)
 STUB(FFC05088)
 STUB(FFC051CC)
+STUB(FFc095A0)
 STUB(FFC09A18)
 STUB(FFC0BA5C)
 STUB(FFC0BBC0)
@@ -378,6 +381,3 @@
 STUB(FFD621F8)
 STUB(FFE3B620)
 STUB(FFE3CED0)
-STUB(FFc0357C)
-STUB(FFc04ACC)
-STUB(FFc095A0)
Index: platform/a720/sub/100c/makefile.inc.new
===================================================================
--- platform/a720/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/a720/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a720/makefile.inc.new
===================================================================
--- platform/a720/makefile.inc.new	(Revision 0)
+++ platform/a720/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/s80/sub/100g/makefile.inc.new
===================================================================
--- platform/s80/sub/100g/makefile.inc.new	(Revision 0)
+++ platform/s80/sub/100g/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/s80/makefile.inc.new
===================================================================
--- platform/s80/makefile.inc.new	(Revision 0)
+++ platform/s80/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus60_sd600/sub/100a/makefile.inc.new
===================================================================
--- platform/ixus60_sd600/sub/100a/makefile.inc.new	(Revision 0)
+++ platform/ixus60_sd600/sub/100a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o  lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus60_sd600/sub/100d/makefile.inc.new
===================================================================
--- platform/ixus60_sd600/sub/100d/makefile.inc.new	(Revision 0)
+++ platform/ixus60_sd600/sub/100d/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o  lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus60_sd600/makefile.inc.new
===================================================================
--- platform/ixus60_sd600/makefile.inc.new	(Revision 0)
+++ platform/ixus60_sd600/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a640/sub/100b/makefile.inc.new
===================================================================
--- platform/a640/sub/100b/makefile.inc.new	(Revision 0)
+++ platform/a640/sub/100b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a640/makefile.inc.new
===================================================================
--- platform/a640/makefile.inc.new	(Revision 0)
+++ platform/a640/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a460/sub/100d/makefile.inc.new
===================================================================
--- platform/a460/sub/100d/makefile.inc.new	(Revision 0)
+++ platform/a460/sub/100d/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a460/makefile.inc.new
===================================================================
--- platform/a460/makefile.inc.new	(Revision 0)
+++ platform/a460/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus960_sd950/sub/100d/makefile.inc.new
===================================================================
--- platform/ixus960_sd950/sub/100d/makefile.inc.new	(Revision 0)
+++ platform/ixus960_sd950/sub/100d/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus960_sd950/makefile.inc.new
===================================================================
--- platform/ixus960_sd950/makefile.inc.new	(Revision 0)
+++ platform/ixus960_sd950/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus860_sd870/sub/100c/makefile.inc.new
===================================================================
--- platform/ixus860_sd870/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/ixus860_sd870/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o touch_wheel.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c touch_wheel.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus860_sd870/makefile.inc.new
===================================================================
--- platform/ixus860_sd870/makefile.inc.new	(Revision 0)
+++ platform/ixus860_sd870/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a560/sub/100a/makefile.inc.new
===================================================================
--- platform/a560/sub/100a/makefile.inc.new	(Revision 0)
+++ platform/a560/sub/100a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a560/makefile.inc.new
===================================================================
--- platform/a560/makefile.inc.new	(Revision 0)
+++ platform/a560/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/tx1/sub/101b/makefile.inc.new
===================================================================
--- platform/tx1/sub/101b/makefile.inc.new	(Revision 0)
+++ platform/tx1/sub/101b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/tx1/sub/100g/makefile.inc.new
===================================================================
--- platform/tx1/sub/100g/makefile.inc.new	(Revision 0)
+++ platform/tx1/sub/100g/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/tx1/makefile.inc.new
===================================================================
--- platform/tx1/makefile.inc.new	(Revision 0)
+++ platform/tx1/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus55_sd450/sub/100b/makefile.inc.new
===================================================================
--- platform/ixus55_sd450/sub/100b/makefile.inc.new	(Revision 0)
+++ platform/ixus55_sd450/sub/100b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus55_sd450/sub/100c/makefile.inc.new
===================================================================
--- platform/ixus55_sd450/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/ixus55_sd450/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus55_sd450/sub/100d/makefile.inc.new
===================================================================
--- platform/ixus55_sd450/sub/100d/makefile.inc.new	(Revision 0)
+++ platform/ixus55_sd450/sub/100d/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus55_sd450/makefile.inc.new
===================================================================
--- platform/ixus55_sd450/makefile.inc.new	(Revision 0)
+++ platform/ixus55_sd450/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/makefile_sub.inc.new
===================================================================
--- platform/makefile_sub.inc.new	(Revision 0)
+++ platform/makefile_sub.inc.new	(Revision 0)
@@ -0,0 +1,79 @@
+# This file is included from */sub/*/makefile.inc.new
+
+
+
+LOCAL_CFLAGS:=-DLOW_LEVEL
+
+sub-platform-all: $(subdir)/libplatformsub.a
+
+TARGET_PRIMARY = PRIMARY.BIN
+
+#OBJS= should be defined in */sub/*/Makefile
+
+
+$(eval $(call gen-rule, sub-platform-clean, $(PLATFORM)-platform-clean, rm -f $(OBJS) $(subdir)/libplatformsub.a $(subdir)/stubs_entry.S.err $(subdir)/stubs_not_found_names.err ))
+
+$(eval $(call gen-rule, sub-platform-distclean, clean, rm -f $(subdir)/stubs_entry.S $(subdir)/stubs_auto.S; rm -rf $(subdir)/.dep ))
+
+OBJS:=$(call subdirize,$(ASM_OBJS) $(C_OBJS) )
+ASM_OBJS:=$(call subdirize,$(ASM_OBJS))
+C_OBJS:=$(call subdirize,$(C_OBJS))
+
+STUBS_AUTO_DEPS:=$(call subdirize , $(STUBS_AUTO_DEPS) )
+
+$(eval $(call ar-targets, libplatformsub.a, $(OBJS), ))
+
+$(eval $(call compile-asm-targets, $(ASM_OBJS) ) )
+$(eval $(call compile-targets, $(C_OBJS), $(LOCAL_CFLAGS) ) )
+
+ifeq ($(OSTYPE),Windows)
+$(eval $(call gen-rule, $(subdir)/stubs_auto.S, $(STUBS_AUTO_DEPS), \
+	cat $(STUBS_AUTO_DEPS) | \						
+	    grep -E 'B[[:alpha:]]*[[:space:]]+sub_[0-9A-Fa-f]' | \
+	    sed 's/.*[[:space:]]sub_\\([0-9A-Fa-f]*\\).*/\\1/' | \
+	    $(SORT) | uniq | \
+	    awk 'BEGIN {print "/* THIS FILE IS GENERATED */\n/* DO NOT EDIT THIS FILE! */\n\n#include \"stubs_asm.h\"\n"} \
+	        {printf("STUB(%s)\n",$$$$1)}' > $(subdir)/stubs_auto.S	
+	    ) )
+else							
+$(eval $(call gen-rule, $(subdir)/stubs_auto.S, $(STUBS_AUTO_DEPS), \
+	cat $(STUBS_AUTO_DEPS) | \
+	    grep -E 'B[[:alpha:]]*[[:space:]]+sub_[0-9A-Fa-f]' | \
+	    sed 's/.*[[:space:]]sub_\([0-9A-Fa-f]*\).*/\1/' | \
+	    $(SORT) | uniq | \
+	    awk 'BEGIN {print "/* THIS FILE IS GENERATED */\n/* DO NOT EDIT THIS FILE! */\n\n#include \"stubs_asm.h\"\n"} \
+	        {printf("STUB(%s)\n",$$$$1)}' > $(subdir)/stubs_auto.S \
+	    ))
+endif
+
+define extract-stubs-entry
+	rm -f stubs_entry.S.err
+	if [ -s $(TARGET_PRIMARY) ] ; then \
+	  $(topdir)tools/finsig $(TARGET_PRIMARY) $(ROMBASEADDR) > stubs_entry.S ; \
+	else \
+	  echo CAUTION! \'stubs_entry.S\' is not uptated due to target firmware binary not found! ; \
+	  touch stubs_entry.S ; \
+	fi ; \
+	if [ "X`grep 'ERROR' stubs_entry.S`" != "X" ] ; then \
+	  grep "ERROR" stubs_entry.S | $(ESED) "s/\/\/ ERROR: ([^ ]+) is not found.*/\1/" | $(SORT) | uniq > stubs_nf.names ; \
+	  grep -E "NH?STUB" stubs_entry_2.S | $(ESED) "s/ *NH?STUB\( *([^ ,]+).*/\1/" | $(SORT) | uniq > stubs_mn.names ; \
+	  comm -23 stubs_nf.names stubs_mn.names > stubs_not_found_names.err ; \
+	  rm -f stubs_nf.names stubs_mn.names ; \
+	  if [ -s stubs_not_found_names.err ] ; then \
+	    echo ERROR! There are unresolved addresses in \'stubs_entry.S\' \($(PLATFORM)-$(PLATFORMSUB)\) for the following names: ; \
+	    cat stubs_not_found_names.err ; \
+	    echo Please, add them into \'stubs_entry_2.S\' manually! ; \
+	    mv stubs_entry.S stubs_entry.S.err ; \
+	    exit 1 ; \
+	  fi ; \
+	  rm -f stubs_not_found_names.err ; \
+	fi
+endef
+
+$(eval $(call gen-rule, $(subdir)/stubs_entry.S, $(TARGET_PRIMARY) $(topdir)tools/signatures_$(PLATFORMOS).h $(topdir)tools/finsig$(EXE), \
+	$(extract-stubs-entry) ) )
+
+$(TARGET_PRIMARY):
+	touch $(TARGET_PRIMARY)
+
+# vim: ft=make
Index: platform/ixus75_sd750/sub/100b/stubs_auto.S
===================================================================
--- platform/ixus75_sd750/sub/100b/stubs_auto.S	(Revision 613)
+++ platform/ixus75_sd750/sub/100b/stubs_auto.S	(Arbeitskopie)
@@ -1,4 +1,6 @@
 /* THIS FILE IS GENERATED */
+/* DO NOT EDIT THIS FILE! */
+
 #include "stubs_asm.h"
 
 STUB(FF8111C4)
Index: platform/ixus75_sd750/sub/100b/makefile.inc.new
===================================================================
--- platform/ixus75_sd750/sub/100b/makefile.inc.new	(Revision 0)
+++ platform/ixus75_sd750/sub/100b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus75_sd750/sub/101a/makefile.inc.new
===================================================================
--- platform/ixus75_sd750/sub/101a/makefile.inc.new	(Revision 0)
+++ platform/ixus75_sd750/sub/101a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c 
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus75_sd750/sub/102a/makefile.inc.new
===================================================================
--- platform/ixus75_sd750/sub/102a/makefile.inc.new	(Revision 0)
+++ platform/ixus75_sd750/sub/102a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus75_sd750/makefile.inc.new
===================================================================
--- platform/ixus75_sd750/makefile.inc.new	(Revision 0)
+++ platform/ixus75_sd750/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus700_sd500/sub/101a/makefile.inc.new
===================================================================
--- platform/ixus700_sd500/sub/101a/makefile.inc.new	(Revision 0)
+++ platform/ixus700_sd500/sub/101a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus700_sd500/sub/101b/makefile.inc.new
===================================================================
--- platform/ixus700_sd500/sub/101b/makefile.inc.new	(Revision 0)
+++ platform/ixus700_sd500/sub/101b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus700_sd500/makefile.inc.new
===================================================================
--- platform/ixus700_sd500/makefile.inc.new	(Revision 0)
+++ platform/ixus700_sd500/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus800_sd700/sub/100b/makefile.inc.new
===================================================================
--- platform/ixus800_sd700/sub/100b/makefile.inc.new	(Revision 0)
+++ platform/ixus800_sd700/sub/100b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus800_sd700/sub/101b/makefile.inc.new
===================================================================
--- platform/ixus800_sd700/sub/101b/makefile.inc.new	(Revision 0)
+++ platform/ixus800_sd700/sub/101b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus800_sd700/makefile.inc.new
===================================================================
--- platform/ixus800_sd700/makefile.inc.new	(Revision 0)
+++ platform/ixus800_sd700/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus750_sd550/sub/100f/makefile.inc.new
===================================================================
--- platform/ixus750_sd550/sub/100f/makefile.inc.new	(Revision 0)
+++ platform/ixus750_sd550/sub/100f/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus750_sd550/sub/100g/makefile.inc.new
===================================================================
--- platform/ixus750_sd550/sub/100g/makefile.inc.new	(Revision 0)
+++ platform/ixus750_sd550/sub/100g/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus750_sd550/makefile.inc.new
===================================================================
--- platform/ixus750_sd550/makefile.inc.new	(Revision 0)
+++ platform/ixus750_sd550/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a610/sub/100e/makefile.inc.new
===================================================================
--- platform/a610/sub/100e/makefile.inc.new	(Revision 0)
+++ platform/a610/sub/100e/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a610/sub/100f/makefile.inc.new
===================================================================
--- platform/a610/sub/100f/makefile.inc.new	(Revision 0)
+++ platform/a610/sub/100f/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a610/makefile.inc.new
===================================================================
--- platform/a610/makefile.inc.new	(Revision 0)
+++ platform/a610/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus50_sd400/sub/101a/makefile.inc.new
===================================================================
--- platform/ixus50_sd400/sub/101a/makefile.inc.new	(Revision 0)
+++ platform/ixus50_sd400/sub/101a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus50_sd400/sub/101b/makefile.inc.new
===================================================================
--- platform/ixus50_sd400/sub/101b/makefile.inc.new	(Revision 0)
+++ platform/ixus50_sd400/sub/101b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus50_sd400/makefile.inc.new
===================================================================
--- platform/ixus50_sd400/makefile.inc.new	(Revision 0)
+++ platform/ixus50_sd400/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/sx100is/sub/100b/boot.c
===================================================================
--- platform/sx100is/sub/100b/boot.c	(Revision 613)
+++ platform/sx100is/sub/100b/boot.c	(Arbeitskopie)
@@ -101,6 +101,7 @@
 		 "BCC	loc_FFC00200\n"
 
 		 "BL	sub_FFC00FB8_my\n"				// <----------
+		 ".pool\n" // needed for gcc 4.x
 	);
 } //#fe
 
@@ -156,6 +157,7 @@
 		 "BL	sub_FFC02D70\n"
 		 "ADD	SP, SP,	#0x74\n"
 		 "LDR	PC, [SP],#4\n"
+		 ".pool\n" // needed for gcc 4.x
 	);
 }; //#fe
 
Index: platform/sx100is/sub/100b/stubs_auto.S
===================================================================
--- platform/sx100is/sub/100b/stubs_auto.S	(Revision 613)
+++ platform/sx100is/sub/100b/stubs_auto.S	(Arbeitskopie)
@@ -3,8 +3,8 @@
 
 #include "stubs_asm.h"
 
+STUB(FFC001a4)
 STUB(FFC001A4)
-STUB(FFC001a4)
 STUB(FFC0095C)
 STUB(FFC00FB8)
 STUB(FFC014D0)
Index: platform/sx100is/sub/100b/makefile.inc.new
===================================================================
--- platform/sx100is/sub/100b/makefile.inc.new	(Revision 0)
+++ platform/sx100is/sub/100b/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/sx100is/sub/100c/boot.c
===================================================================
--- platform/sx100is/sub/100c/boot.c	(Revision 613)
+++ platform/sx100is/sub/100c/boot.c	(Arbeitskopie)
@@ -101,6 +101,7 @@
 		 "BCC	loc_FFC00200\n"
 
 		 "BL	sub_FFC00FB8_my\n"				// <----------
+		 ".pool\n"
 	);
 } //#fe
 
@@ -156,6 +157,7 @@
 		 "BL	sub_FFC02D70\n"
 		 "ADD	SP, SP,	#0x74\n"
 		 "LDR	PC, [SP],#4\n"
+		 ".pool\n"
 	);
 }; //#fe
 
Index: platform/sx100is/sub/100c/stubs_auto.S
===================================================================
--- platform/sx100is/sub/100c/stubs_auto.S	(Revision 613)
+++ platform/sx100is/sub/100c/stubs_auto.S	(Arbeitskopie)
@@ -3,8 +3,8 @@
 
 #include "stubs_asm.h"
 
+STUB(FFC001a4)
 STUB(FFC001A4)
-STUB(FFC001a4)
 STUB(FFC0095C)
 STUB(FFC00FB8)
 STUB(FFC014D0)
Index: platform/sx100is/sub/100c/makefile.inc.new
===================================================================
--- platform/sx100is/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/sx100is/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/sx100is/makefile.inc.new
===================================================================
--- platform/sx100is/makefile.inc.new	(Revision 0)
+++ platform/sx100is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a710/sub/100a/makefile.inc.new
===================================================================
--- platform/a710/sub/100a/makefile.inc.new	(Revision 0)
+++ platform/a710/sub/100a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a710/makefile.inc.new
===================================================================
--- platform/a710/makefile.inc.new	(Revision 0)
+++ platform/a710/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a530/sub/100a/makefile.inc.new
===================================================================
--- platform/a530/sub/100a/makefile.inc.new	(Revision 0)
+++ platform/a530/sub/100a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a530/makefile.inc.new
===================================================================
--- platform/a530/makefile.inc.new	(Revision 0)
+++ platform/a530/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a450/sub/100d/makefile.inc.new
===================================================================
--- platform/a450/sub/100d/makefile.inc.new	(Revision 0)
+++ platform/a450/sub/100d/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a450/makefile.inc.new
===================================================================
--- platform/a450/makefile.inc.new	(Revision 0)
+++ platform/a450/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/ixus950_sd850/sub/100c/stubs_entry_2.S
===================================================================
--- platform/ixus950_sd850/sub/100c/stubs_entry_2.S	(Revision 613)
+++ platform/ixus950_sd850/sub/100c/stubs_entry_2.S	(Arbeitskopie)
@@ -57,6 +57,10 @@
 NHSTUB(GetOpticalTemperature, 0xFFA3D3E0)
 NHSTUB(PT_PlaySound, 0xFFB1A0A4)
 NHSTUB(taskNameToId, 0xFF935A64)
-
+// those are mainly to play around with them for me and to figure out how time
+// related functions work on my cam
+NHSTUB(getenv,0xFF9263C0)
+NHSTUB(putenv,0xFF92641C)
+NSTUB(localtime_r, 0xff924788)
 //NHSTUB(EnterToCompensationEVF, 0xFFFFFFFF) // Stub not found. When found, remove dummy function from lib.c.
 //NHSTUB(ExitFromCompensationEVF, 0xFFFFFFFF) // Stub not found. When found, remove dummy function from lib.c.
Index: platform/ixus950_sd850/sub/100c/makefile.inc.new
===================================================================
--- platform/ixus950_sd850/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/ixus950_sd850/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/ixus950_sd850/makefile.inc.new
===================================================================
--- platform/ixus950_sd850/makefile.inc.new	(Revision 0)
+++ platform/ixus950_sd850/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a630/sub/100c/makefile.inc.new
===================================================================
--- platform/a630/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/a630/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a630/makefile.inc.new
===================================================================
--- platform/a630/makefile.inc.new	(Revision 0)
+++ platform/a630/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/makefile_generic.inc.new
===================================================================
--- platform/makefile_generic.inc.new	(Revision 0)
+++ platform/makefile_generic.inc.new	(Revision 0)
@@ -0,0 +1,25 @@
+
+
+LOCAL_CFLAGS:=-DLOW_LEVEL
+
+SUBDIRS=sub
+
+C_OBJS := main.o lib.o wrappers.o kbd.o shooting.o $(EXTRA_C_OBJS)
+ASM_OBJS := $(EXTRA_ASM_OBJS)
+OBJS := $(C_OBJS) $(ASM_OBJS)
+
+# stubs_init.o
+OBJS := $(call subdirize,$(OBJS) )
+C_OBJS := $(call subdirize,$(C_OBJS) )
+ASM_OBJS := $(call subdirize,$(ASM_OBJS) )
+
+$(eval $(call compile-targets, $(C_OBJS), $(LOCAL_CFLAGS) ) )
+$(eval $(call compile-asm-targets, $(ASM_OBJS), $(LOCAL_CFLAGS) ) )
+
+$(eval $(call ar-targets, libplatform.a, $(OBJS), ))
+
+$(eval $(call gen-rule, $(PLATFORM)-platform-clean,, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/libplatform.a ))
+
+$(PLATFORM)-platform-distclean: $(PLATFORM)-platform-clean
+
+# vim: ft=make
Index: platform/a550/sub/100c/makefile.inc.new
===================================================================
--- platform/a550/sub/100c/makefile.inc.new	(Revision 0)
+++ platform/a550/sub/100c/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a550/makefile.inc.new
===================================================================
--- platform/a550/makefile.inc.new	(Revision 0)
+++ platform/a550/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a650/sub/100d/makefile.inc.new
===================================================================
--- platform/a650/sub/100d/makefile.inc.new	(Revision 0)
+++ platform/a650/sub/100d/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a650/makefile.inc.new
===================================================================
--- platform/a650/makefile.inc.new	(Revision 0)
+++ platform/a650/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/generic/makefile.inc.new
===================================================================
--- platform/generic/makefile.inc.new	(Revision 0)
+++ platform/generic/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/a570/sub/101a/makefile.inc.new
===================================================================
--- platform/a570/sub/101a/makefile.inc.new	(Revision 0)
+++ platform/a570/sub/101a/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a570/sub/100e/makefile.inc.new
===================================================================
--- platform/a570/sub/100e/makefile.inc.new	(Revision 0)
+++ platform/a570/sub/100e/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/a570/makefile.inc.new
===================================================================
--- platform/a570/makefile.inc.new	(Revision 0)
+++ platform/a570/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/g7/sub/100e/makefile.inc.new
===================================================================
--- platform/g7/sub/100e/makefile.inc.new	(Revision 0)
+++ platform/g7/sub/100e/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/g7/sub/100g/makefile.inc.new
===================================================================
--- platform/g7/sub/100g/makefile.inc.new	(Revision 0)
+++ platform/g7/sub/100g/makefile.inc.new	(Revision 0)
@@ -0,0 +1,7 @@
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/g7/sub/100i/makefile.inc.new
===================================================================
--- platform/g7/sub/100i/makefile.inc.new	(Revision 0)
+++ platform/g7/sub/100i/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/g7/sub/100j/makefile.inc.new
===================================================================
--- platform/g7/sub/100j/makefile.inc.new	(Revision 0)
+++ platform/g7/sub/100j/makefile.inc.new	(Revision 0)
@@ -0,0 +1,11 @@
+
+
+ASM_OBJS:= stubs_min.o stubs_auto.o stubs_entry.o stubs_entry_2.o 
+C_OBJS:= boot.o capt_seq.o movie_rec.o lib.o mount.o
+
+
+STUBS_AUTO_DEPS:=boot.c capt_seq.c movie_rec.c mount.c
+
+
+include $(subdir)/../../../makefile_sub.inc.new
+# vim: ft=make
Index: platform/g7/makefile.inc.new
===================================================================
--- platform/g7/makefile.inc.new	(Revision 0)
+++ platform/g7/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/platform/makefile_generic.inc.new
+
+# vim: ft=make
Index: platform/makefile.inc.new
===================================================================
--- platform/makefile.inc.new	(Revision 0)
+++ platform/makefile.inc.new	(Revision 0)
@@ -0,0 +1,13 @@
+
+LOCAL_SUBDIRS := $(PLATFORM)
+LOCAL_SUBSUBDIRS := $(subdir)/$(PLATFORM)/sub/$(PLATFORMSUB)
+
+$(eval $(call gen-rule, platform-clean, $(foreach lsub,$(LOCAL_SUBDIRS),sub-platform-clean), ))
+
+$(eval $(call gen-rule, platform-distclean, $(foreach lsub,$(LOCAL_SUBDIRS),sub-platform-distclean), ))
+LOCAL_SUBDIRS:=$(call subdirize,$(LOCAL_SUBDIRS) )
+
+$(foreach subdir,$(LOCAL_SUBDIRS),$(eval include $(subdir)/makefile.inc.new) )
+$(foreach subdir,$(LOCAL_SUBSUBDIRS),$(eval include $(subdir)/makefile.inc.new) )
+
+# vim: ft=make
Index: core/conf.c
===================================================================
--- core/conf.c	(Revision 613)
+++ core/conf.c	(Arbeitskopie)
@@ -53,8 +53,8 @@
 
 // reyalp: putting these in conf, since the conf values are lookups for them
 // prefixes and extentions available for raw images (index with conf.raw_prefix etc)
-const char* img_prefixes[NUM_IMG_PREFIXES]={ "IMG_", "CRW_", "SND_" /*, "AUT_", "ETC_","SDR_", "MVI_", "MRK_"*/};
-const char* img_exts[NUM_IMG_EXTS]={ ".JPG", ".CRW", ".CR2", ".THM", ".WAV"/*, ".AVI", ".MRK"*/};
+const char* img_prefixes[NUM_IMG_PREFIXES]={ "IMG_", "CRW_", "SND_", "crw_" , "AUT_", "ETC_","SDR_", "MVI_", "MRK_"};
+const char* img_exts[NUM_IMG_EXTS]={ ".JPG", ".CRW", ".CR2", ".THM", ".WAV", ".AVI", ".MRK", ".DNG" };
 // ugh
 const char *video_bitrate_strings[VIDEO_BITRATE_STEPS]={ "0.25x", "0.5x","0.75x", "1x", "1.25x", "1.5x", "1.75x", "2x", "2.5x", "3x"};
 
Index: core/gui_lang.c
===================================================================
--- core/gui_lang.c	(Revision 613)
+++ core/gui_lang.c	(Arbeitskopie)
@@ -546,7 +546,6 @@
 "425 \"RAW buffer cached\"\n"
 "426 \"Cannot load CHDK/badpixel.bin\"\n"
 "427 \"Show saving time\"\n"
-
 "428 \"Connect 4\"\n"
 "429 \"Opponent:\"\n"
 "430 \"Human\"\n"
@@ -558,6 +557,8 @@
 "436 \"Disable RAW @ Auto\"\n"
 "437 \"Enable flash in video?\"\n"
 "438 \"   Power of flash\"\n"
+"439 \"Property Compare/Dump\"\n"
+"440 \"Params Compare/Dump\"\n"
 ;
 
 //-------------------------------------------------------------------
Index: core/gui_lang.h
===================================================================
--- core/gui_lang.h	(Revision 613)
+++ core/gui_lang.h	(Arbeitskopie)
@@ -548,9 +548,12 @@
 #define LANG_MENU_RAW_SAVE_IN_AUTO         436
 #define LANG_MENU_FLASH_VIDEO_OVERRIDE     437
 #define LANG_MENU_FLASH_VIDEO_OVERRIDE_POWER     438
+#define LANG_XXX_PROPCOMPARE		439
+#define LANG_XXX_PARAMCOMPARE		440
+
 //-------------------------------------------------------------------
 
-#define GUI_LANG_ITEMS                  438
+#define GUI_LANG_ITEMS                  440
 
 //-------------------------------------------------------------------
 extern void gui_lang_init();
Index: core/gui.c
===================================================================
--- core/gui.c	(Revision 613)
+++ core/gui.c	(Arbeitskopie)
@@ -48,7 +48,7 @@
 //-------------------------------------------------------------------
 
 #define OPTIONS_AUTOSAVE
-#define SPLASH_TIME               20
+#define SPLASH_TIME               5 // XXX A configure option for this would be great
 
 int script_params_has_changed=0;
 //shortcuts
@@ -159,6 +159,7 @@
 static void gui_menuproc_edge_free(int arg);
 #ifdef OPT_DEBUGGING
 void gui_compare_props(int arg);
+void gui_compare_params(int arg);
 #endif
 #ifndef OPTIONS_AUTOSAVE
 static void gui_menuproc_save(int arg);
@@ -416,6 +417,8 @@
     {0x2a,LANG_MENU_MAIN_DEBUG,              MENUITEM_SUBMENU,   (int*)&debug_submenu },
 #endif
     {0x86,LANG_MENU_REMOTE_PARAM,            MENUITEM_SUBMENU,   (int*)&remote_submenu },
+    {0x80,LANG_XXX_PROPCOMPARE,        MENUITEM_PROC,    (int*)gui_compare_props},
+    {0x80,LANG_XXX_PARAMCOMPARE,        MENUITEM_PROC,   (int*)gui_compare_params},
     {0x51,LANG_MENU_BACK,                    MENUITEM_UP },
     {0},
 };
@@ -3197,7 +3200,7 @@
 	char buf[64];
 	int i;
 	int p;
-	int c;
+	int c = 0;
 
 
 	if( initialized )
@@ -3237,4 +3240,189 @@
 	initialized = 1;
 }
 
+#define NUM_params 256
+#define BLACKLIST_FILENAME "A/CHDK/DATA/BLACKLIST.PAR"
+static signed char *blacklist = 0;
+int shooting_get_param( int id )
+{
+	int r = 0;
+	int s = sizeof(r);
+	if( blacklist )
+	{
+		if( id < 0 || id >= NUM_params )
+		{
+			s = 0;
+		}
+		else
+		{
+			s = blacklist[id];
+		}
+	}
+	if( s )
+	{
+		get_parameter_data(id,&r,s);
+	}
+	return r;
+}
+
+void write_blacklist_file( const signed char* bl )
+{
+	int fd;
+	fd = open(BLACKLIST_FILENAME, O_RDWR|O_CREAT|O_TRUNC, 0777);
+	write(fd,bl,NUM_params);
+	close(fd);
+}
+
+void gui_compare_params(int arg)
+{
+	static int initialized = 0;
+	static int *params = 0;
+	char buf[64];
+	int i;
+	int p;
+	int c;
+	int fd;
+	int test = 0;
+
+	if( 0 == blacklist )
+	{ 
+		blacklist = malloc(NUM_params);
+		// blacklist creation/loading of next step wasn't done yet, lets have a look if...
+		// the file exists at all
+		struct stat s;
+		s.st_size = 0;
+
+		stat(BLACKLIST_FILENAME,&s);
+		if( s.st_size < NUM_params )
+		{ // either from another compile or broken in another way or not there or... well whatever
+			for(i = 0; i < NUM_params; ++i )
+			{ // initialize all to -8 meaning: not yet tested
+				blacklist[i] = -8;
+			}
+		}
+		else
+		{
+			// open and read the file
+			fd = open(BLACKLIST_FILENAME, O_RDONLY,0);
+			read(fd,blacklist,NUM_params);
+			close(fd);
+		}
+		/*
+		 * The following entries are possible with the said meaning in the
+		 * blacklist file:
+		 * -8 : This param has not yet been tested, you should do this
+		 * -4 : The last test was tried with reading 4 bytes and failed. Action to be taken: write 2
+		 * -2 : The last test was tried with reading 4 bytes and failed. Action to be taken: write 1
+		 * -1 : The last test was tried with reading 4 bytes and failed. Action to be taken: write 0
+		 *  0 : Not a single byte can ever be read from this location
+		 *  1 : Only ever read 1 byte from the location
+		 *  2 : Only ever read 2 bytes from the location
+		 *  4 : It is save to read 4 bytes from this location
+		 */
+		i = 0;
+		// skip all entries that have been tested already
+		while( i < NUM_params )
+		{
+			switch(blacklist[i])
+			{
+				case -8:
+					sprintf(buf,"Testing param %d read 1",i);
+					draw_string(16,16,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+					// need to test, so... note in the array
+					blacklist[i] = -1;
+					write_blacklist_file(blacklist);
+					get_parameter_data(i,&test,1);
+
+					sprintf(buf,"Testing param %d read 2",i);
+					draw_string(16,16,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+					// no crash? try more!
+					blacklist[i] = -2;
+					write_blacklist_file(blacklist);
+					get_parameter_data(i,&test,2);
+
+					sprintf(buf,"Testing param %d read 4",i);
+					draw_string(16,16,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+					// no crash? try more!
+					blacklist[i] = -4;
+					write_blacklist_file(blacklist);
+					get_parameter_data(i,&test,4);
+
+					sprintf(buf,"Testing param %d was successfull up to 4",i);
+					draw_string(16,16,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+					// still no crash? wow, nice
+					blacklist[i] = 4;
+					write_blacklist_file(blacklist);
+					break;
+				case -4: // last test failed, record this
+					blacklist[i] = 2;
+					break;
+				case -2: // last test failed, record this
+					blacklist[i] = 1;
+					break;
+				case -1: // last test failed, record this
+					blacklist[i] = 0;
+					break;
+				case 0:
+				case 1:
+				case 2:
+				case 4:
+				default:
+					// this one is safe...
+					break;
+			}
+			// advance to the next...
+			++i;
+		}
+		// we went here without any crashes, that means the blacklist is
+		// complete now
+		write_blacklist_file(blacklist);
+	}
+	if( 0 == params )
+	{
+		params = malloc(NUM_params * sizeof(int));
+	}
+
+	if( initialized )
+	{ // we have previous data set! do a comparison
+		c = 0;
+		for( i = 0; i < NUM_params; ++i )
+		{
+			p = shooting_get_param(i);
+			if( params[i] != p )
+			{
+				++c;
+				sprintf(buf,"%4d is %8d was %8d",i,p,params[i]);
+				draw_string(16,16*c,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+			}
+			params[i] = p;
+			if( c == 12 )
+			{
+				++c;
+				sprintf(buf,"%s","Waiting 10 Seconds");
+				draw_string(16,16*c,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+				msleep(10000);
+				c = 0;
+			}
+		}
+		++c;
+		sprintf(buf,"%s","Waiting 10 Seconds");
+		draw_string(16,16*c,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+		msleep(10000);
+	}
+	else
+	{
+		// no previous data was set so we save the data initially
+		for( i = 0; i < NUM_params; ++i )
+		{
+#if 0
+			sprintf(buf,"About to read %d",i);
+			draw_string(16,16,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+			msleep(1000);
 #endif
+			params[i] = shooting_get_param(i);
+		}
+	}
+	initialized = 1;
+}
+#endif
+// vim: tabstop=4 shiftwidth=4
Index: core/makefile.inc.new
===================================================================
--- core/makefile.inc.new	(Revision 0)
+++ core/makefile.inc.new	(Revision 0)
@@ -0,0 +1,96 @@
+
+LOCAL_CFLAGS:=$(CTHUMB)
+
+# warning: library order matters!
+CORE_LDLIBS:= -lgcc
+CORE_LDOPTS=-nostdlib -Wl,--allow-shlib-undefined -Wl,-T,$(TOPDIR)/tools/link-boot.ld
+CORE_LDOPTS+=-Wl,-N,-Ttext,$(MEMISOSTART)
+
+OPT_OBJS:=
+ifdef OPT_GAME_REVERSI
+LOCAL_CFLAGS +=-DOPT_GAME_REVERSI
+OPT_OBJS+=gui_reversi.o
+endif
+ifdef OPT_GAME_SOKOBAN
+LOCAL_CFLAGS+=-DOPT_GAME_SOKOBAN
+OPT_OBJS+=gui_sokoban.o
+endif
+ifdef OPT_GAME_CONNECT4
+LOCAL_CFLAGS+=-DOPT_GAME_CONNECT4
+OPT_OBJS+=gui_4wins.o
+endif
+ifdef OPT_BOOTLOGO
+LOCAL_CFLAGS+=-DOPT_BOOTLOGO
+endif
+ifdef OPT_CURVES
+LOCAL_CFLAGS+=-DOPT_CURVES
+OPT_OBJS+=curves.o
+endif
+ifdef OPT_TEXTREADER
+LOCAL_CFLAGS+=-DOPT_TEXTREADER
+OPT_OBJS+=gui_read.o 
+endif
+ifdef OPT_CALENDAR
+LOCAL_CFLAGS+=-DOPT_CALENDAR
+OPT_OBJS+=gui_calendar.o 
+endif
+ifdef OPT_DEBUGGING
+LOCAL_CFLAGS+=-DOPT_DEBUGGING
+OPT_OBJS+=gui_debug.o gui_bench.o 
+endif
+ifdef OPT_EDGEOVERLAY
+CFLAGS+=-DOPT_EDGEOVERLAY
+OPT_OBJS+=edgeoverlay.o 
+endif
+C_OBJS:= main.o gui_draw.o gui_menu.o gui_palette.o gui_mbox.o \
+     gui_fselect.o gui.o kbd.o conf.o \
+     histogram.o gui_batt.o gui_space.o gui_osd.o script.o raw.o \
+     gui_lang.o gui_mpopup.o gui_grid.o motion_detector.o raw_merge.o \
+     luascript.o shot_histogram.o dng_hdr.o $(OPT_OBJS)
+N_OBJS:= nothumb.o
+
+ASM_OBJS:=entry.o
+
+OBJS := $(call subdirize,$(ASM_OBJS) $(C_OBJS) $(N_OBJS) )
+N_OBJS:=$(call subdirize, $(N_OBJS) )
+C_OBJS:=$(call subdirize, $(C_OBJS) )
+ASM_OBJS:=$(call subdirize, $(ASM_OBJS) )
+
+MAIN_LIBS := \
+	$(TOPDIR)/platform/$(PLATFORM)/libplatform.a \
+	$(TOPDIR)/platform/$(PLATFORM)/sub/$(PLATFORMSUB)/libplatformsub.a \
+	$(TOPDIR)/lib/font/libfont.a \
+	$(TOPDIR)/lib/math/libmath.a \
+	$(TOPDIR)/lib/ubasic/libubasic.a \
+	$(TOPDIR)/lib/lang/liblang.a \
+	$(TOPDIR)/lib/lua/liblua.a
+
+core/nothumb.o:: core/nothumb.c
+	@echo $< \-\> $@
+	$(CC) $(CFLAGS) -marm -nostdinc -c -o $@ $<
+
+$(eval $(call compile-targets,$(C_OBJS),$(LOCAL_CFLAGS)))
+$(eval $(call compile-asm-targets,$(ASM_OBJS),$(LOCAL_CFLAGS)))
+
+$(eval $(call gen-rule, $(subdir)/main.bin, $(OBJS) $(subdir)/main.elf,  \
+	$(OBJDUMP) -z -d $(subdir)/main.elf > $(subdir)/main.dump; \
+	$(OBJCOPY) -O binary $(subdir)/main.elf $(subdir)/main.bin ))
+
+define postprocess-main-elf
+	( $(NM) $(subdir)/main.elf | grep ' U ' > $(subdir)/main.elf.syms ) && exit 1 || exit 0;
+	$(SIZE) $(subdir)/main.elf | tee $(TOPDIR)/size.txt;
+	$(SIZLENCE)printf " %s-%s (%s, #%s): MEMISOSIZE used: 0x%s\n" \
+	$(PLATFORM) $(PLATFORMSUB) $(PLATFORMOS) $(PLATFORMID) \
+	`cut -f5 $(TOPDIR)/size.txt | tail -1` >> $(TOPDIR)/bin/caminfo.txt;
+endef
+
+$(eval $(call gen-rule, $(subdir)/main.elf, $(OBJS) $(MAIN_LIBS), \
+    $(CC) $(CFLAGS) $(LOCAL_CFLAGS) -o $$@ --start-group $$^  $(CORE_LDLIBS) --end-group $(LDFLAGS) $(CORE_LDOPTS) || exit 1; \
+    $(call postprocess-main-elf) \
+    ))
+
+$(eval $(call gen-rule, core-clean,, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/main.bin $(subdir)/main.elf $(subdir)/main.dump $(subdir)/main.elf.syms ))
+
+$(eval $(call gen-rule, core-distclean, core-clean, rm -f $(OBJS:.o=.d) ))
+
+# vim: filetype=make
Index: core/main.c
===================================================================
--- core/main.c	(Revision 613)
+++ core/main.c	(Arbeitskopie)
@@ -68,6 +68,22 @@
         spytask_can_start = 1;
 }
 
+#include "gui.h"
+#include "gui_draw.h"
+
+void brain_dump() 
+{
+    char buf[64];
+    static const int p = 20;
+    static const long a = 4;
+    static int v = 0;
+
+    get_parameter_data(p,&v,a);
+
+    sprintf(buf,"param %d is %d",p,v);
+    draw_string(16,0,buf,MAKE_COLOR(COLOR_BLACK,COLOR_YELLOW));
+}
+
 void core_spytask()
 {
     int cnt = 1;
@@ -106,6 +122,7 @@
 #ifdef OPT_EDGEOVERLAY
     mkdir("A/CHDK/EDGE");
 #endif
+
     auto_started = 0;
 
     if (conf.script_startup==1) script_autostart();				// remote autostart
@@ -133,6 +150,8 @@
 #endif
 	}
 
+//	brain_dump();
+
 	if ((state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) && (!shooting_in_progress())) {
 	    state_shooting_progress = SHOOTING_PROGRESS_DONE;
             if (raw_need_postprocess) raw_postprocess();
Index: version.inc
===================================================================
--- version.inc	(Revision 613)
+++ version.inc	(Arbeitskopie)
@@ -1 +1 @@
-BUILD_NUMBER := 0.8.7
+BUILD_NUMBER := 0.8.7-p0
Index: tools/makefile.inc.new
===================================================================
--- tools/makefile.inc.new	(Revision 0)
+++ tools/makefile.inc.new	(Revision 0)
@@ -0,0 +1,56 @@
+
+
+OBJS:=pakwif.o finsig.o gensig.o dumpchk.o dancingbits.o
+OBJS:=$(call subdirize,$(OBJS))
+
+$(eval $(call compile-host-targets, $(OBJS), -DPLATFORMOS_$(PLATFORMOS) ) )
+
+$(eval $(call gen-rule, $(subdir)/pakwif$(EXE), $(subdir)/pakwif.o, $(HOSTCC) $(HOSTCFLAGS) -o $$@ $$^ ))
+$(eval $(call gen-rule, $(subdir)/finsig$(EXE), $(subdir)/finsig.o, $(HOSTCC) $(HOSTCFLAGS) -o $$@ $$^ ))
+$(eval $(call gen-rule, $(subdir)/gensig$(EXE), $(subdir)/gensig.o, $(HOSTCC) $(HOSTCFLAGS) -o $$@ $$^ ))
+$(eval $(call gen-rule, $(subdir)/dancingbits$(EXE), $(subdir)/dancingbits.o, $(HOSTCC) $(HOSTCFLAGS) -o $$@ $$^ ))
+$(eval $(call gen-rule, $(subdir)/dumpchk$(EXE), $(subdir)/dumpchk.o, $(HOSTCC) $(HOSTCFLAGS) -o $$@ $$^ ))
+
+$(eval $(call gen-rule,tools-clean,,rm -f $(subdir)/*.HOST.d $(subdir)/pakwif$(EXE) $(subdir)/finsig$(EXE) $(subdir)/gensig$(EXE) $(OBJS)))
+#	if [ -s sig_ref_vxworks_1.bin ] && [ -s sig_ref_vxworks_2.bin ] && [ -s sig_ref_vxworks_3.bin ] ; then \
+#	  rm -f signatures_vxworks.h ; \
+#	fi
+#	if [ -s sig_ref_dryos_1.bin ] ; then \
+#	  rm -f signatures_dryos.h ; \
+#	fi
+
+tools-distclean: tools-clean
+#	rm -f signatures.h
+
+
+tools/signatures_vxworks.h: tools/gensig$(EXE) tools/gensigs.sh tools/sig_ref_vxworks_1.txt tools/sig_ref_vxworks_1.bin tools/sig_ref_vxworks_2.txt tools/sig_ref_vxworks_2.bin tools/sig_ref_vxworks_3.txt tools/sig_ref_vxworks_3.bin
+	@echo \-\> $@
+	if [ -s tools/sig_ref_vxworks_1.bin ] && [ -s tools/sig_ref_vxworks_2.bin ] && [ -s tools/sig_ref_vxworks_3.bin ] ; then \
+	  $(SH) tools/gensigs.sh $(SORT) vxworks "1 2 3" > tools/signatures_vxworks.h ; \
+	else \
+	  echo CAUTION! \'signatures_vxworks.h\' is not uptated due to \'sig_ref_vxworks_1.bin\` or \'sig_ref_vxworks_2.bin\` or \'sig_ref_vxworks_3.bin\` is empty! ; \
+	  touch tools/signatures_vxworks.h ; \
+	fi
+
+tools/signatures_dryos.h: tools/gensig$(EXE) tools/gensigs.sh tools/sig_ref_dryos_1.txt tools/sig_ref_dryos_1.bin
+	@echo \-\> $@
+	if [ -s tools/sig_ref_dryos_1.bin ] ; then \
+	  $(SH) tools/gensigs.sh $(SORT) dryos "1" > tools/signatures_dryos.h ; \
+	else \
+	  echo CAUTION! \'signatures_dryos.h\' is not uptated due to \'sig_ref_dryos_1.bin\` is empty! ; \
+	  touch tools/signatures_dryos.h ; \
+	fi
+
+tools/sig_ref_vxworks_1.bin:
+	touch tools/sig_ref_vxworks_1.bin
+
+tools/sig_ref_vxworks_2.bin:
+	touch tools/sig_ref_vxworks_2.bin
+
+tools/sig_ref_vxworks_3.bin:
+	touch tools/sig_ref_vxworks_3.bin
+
+tools/sig_ref_dryos_1.bin:
+	touch tools/sig_ref_dryos_1.bin
+
+# vim: filetype=make
Index: Makefile.new
===================================================================
--- Makefile.new	(Revision 0)
+++ Makefile.new	(Revision 0)
@@ -0,0 +1,744 @@
+# This is an entirely new set of makefiles, completely independent from the
+# usual ones. The primary goal is to have proper (partly auto-generated during
+# compile, without a separate make depend step) dependencies. It uses a
+# completely different philosophy of generating the rules, so you need a pretty
+# new make version (3.81 or higher). The advantage is that now you should be
+# able to do a make -j N for quite big Ns (as much as you have cores + 2
+# recommended) to massively speed up your builds.
+
+#PLATFORM=s3is
+#PLATFORMSUB=100a
+
+#PLATFORM=a610
+#PLATFORMSUB=100e
+
+#PLATFORM=a620
+#PLATFORMSUB=100f
+
+#PLATFORM=ixus40_sd300
+#PLATFORMSUB=100k
+
+#PLATFORM=ixus40_sd300
+#PLATFORMSUB=100j
+
+#PLATFORM=sx100is
+#PLATFORMSUB=100c
+
+#PLATFORM=sx100is
+#PLATFORMSUB=100b
+
+#PLATFORM=ixus50_sd400
+#PLATFORMSUB=101a
+
+#PLATFORM=ixus50_sd400
+#PLATFORMSUB=101b
+
+#PLATFORM=ixus750_sd550
+#PLATFORMSUB=100f
+
+#PLATFORM=ixus750_sd550
+#PLATFORMSUB=100g
+
+#PLATFORM=a640
+#PLATFORMSUB=100b
+
+#PLATFORM=a700
+#PLATFORMSUB=100b
+
+#PLATFORM=a710
+#PLATFORMSUB=100a
+
+#PLATFORM=s2is
+#PLATFORMSUB=100e
+
+#PLATFORM=s2is
+#PLATFORMSUB=100f
+
+#PLATFORM=s2is
+#PLATFORMSUB=100g
+
+#PLATFORM=g7
+#PLATFORMSUB=100e
+
+#PLATFORM=g7
+#PLATFORMSUB=100g
+
+#PLATFORM=g7
+#PLATFORMSUB=100i
+
+#PLATFORM=g7
+#PLATFORMSUB=100j
+
+#PLATFORM=a530
+#PLATFORMSUB=100a
+
+#PLATFORM=a540
+#PLATFORMSUB=100b
+
+#PLATFORM=a560
+#PLATFORMSUB=100a
+
+#PLATFORM=a570
+#PLATFORMSUB=100a
+
+#PLATFORM=a570
+#PLATFORMSUB=100e
+
+#PLATFORM=a610
+#PLATFORMSUB=100e
+
+#PLATFORM=a610
+#PLATFORMSUB=100f
+
+#PLATFORM=ixus700_sd500
+#PLATFORMSUB=101a
+
+#PLATFORM=ixus700_sd500
+#PLATFORMSUB=101b
+
+#PLATFORM=ixus800_sd700
+#PLATFORMSUB=100b
+
+#PLATFORM=ixus800_sd700
+#PLATFORMSUB=101b
+
+#PLATFORM=a720
+#PLATFORMSUB=100c
+
+#PLATFORM=ixus850_sd800
+#PLATFORMSUB=100e
+
+#PLATFORM=ixus860_sd870
+#PLATFORMSUB=100c
+
+#PLATFORM=ixus80_sd1100
+#PLATFORMSUB=100c
+#PLATFORMSUB=101a
+
+PLATFORM=ixus950_sd850
+PLATFORMSUB=100c
+
+#PLATFORM=ixus55_sd450
+#PLATFORMSUB=100b
+
+#PLATFORM=ixus55_sd450
+#PLATFORMSUB=100c
+
+#PLATFORM=ixus55_sd450
+#PLATFORMSUB=100d
+
+#PLATFORM=ixus60_sd600
+#PLATFORMSUB=100a
+
+#PLATFORM=ixus60_sd600
+#PLATFORMSUB=100d
+
+#PLATFORM=ixus70_sd1000
+#PLATFORMSUB=100c
+
+#PLATFORM=ixus70_sd1000
+#PLATFORMSUB=101b
+
+#PLATFORM=ixus70_sd1000
+#PLATFORMSUB=102a
+
+#PLATFORM=a650
+#PLATFORMSUB=100d
+
+#PLATFORM=a450
+#PLATFORMSUB=100d
+
+#PLATFORM=a460
+#PLATFORMSUB=100d
+
+#PLATFORM=a550
+#PLATFORMSUB=100c
+
+#PLATFORM=a630
+#PLATFORMSUB=100c
+
+#PLATFORM=s5is
+#PLATFORMSUB=101a
+
+#PLATFORM=s5is
+#PLATFORMSUB=101b
+
+#PLATFORM=ixus65_sd630
+#PLATFORMSUB=100a
+
+#PLATFORM=tx1
+#PLATFORMSUB=100g
+
+#PLATFORM=tx1
+#PLATFORMSUB=101b
+
+#PLATFORM=ixus960_sd950
+#PLATFORM=100d
+
+#PLATFORM=ixus75_sd750
+#PLATFORMSUB=100b
+
+#PLATFORM=ixus75_sd750
+#PLATFORMSUB=101a
+
+#PLATFORM=ixus75_sd750
+#PLATFORMSUB=102a
+
+
+TOPDIR:=.
+SRCDIR:=.
+BINDIR:=$(TOPDIR)/bin
+
+VER=CHDK
+
+# build time optional components
+OPT_LUA_IOLIB=1
+OPT_LUA_OSLIB=1
+#OPT_LUA_STRLIB=1
+OPT_GAME_REVERSI=1
+OPT_GAME_SOKOBAN=1
+
+MEMISOSIZE="(&_end-&_start)"
+include $(TOPDIR)/version.inc
+include $(TOPDIR)/buildconf.inc
+include $(TOPDIR)/platform/$(PLATFORM)/sub/$(PLATFORMSUB)/makefile.inc
+
+NOZERO100K=TRUE
+
+##########################################################################
+##########################################################################
+##########################################################################
+
+ESED = sed -r
+
+ifndef OSTYPE
+  HOSTPLATFORM:=$(patsubst MINGW%,MINGW,$(shell uname -s))
+  ifeq ($(HOSTPLATFORM),MINGW)
+    OSTYPE = Windows
+    EXE = .exe
+    SH = sh
+    DEVNULL = NUL
+    SORT = $(dir $(shell which uniq.exe | sed s/\\\\/\\\//g))/sort.exe
+  else
+    ifeq ($(HOSTPLATFORM),Linux)
+      OSTYPE = Linux
+      EXE =
+      SH =
+      DEVNULL = /dev/null
+      SORT = sort
+    else
+      ifeq ($(HOSTPLATFORM),Darwin)
+        OSTYPE = Darwin
+        EXE =
+        SH =
+        DEVNULL = /dev/null
+        SORT = sort
+        ESED = sed -E
+      else
+        OSTYPE = Other
+        EXE =
+        SH =
+        DEVNULL = /dev/null
+        SORT = sort
+      endif
+    endif
+  endif
+else
+  EXE =
+  SH =
+  DEVNULL = /dev/null
+  SORT = sort
+endif
+
+##########################################################################
+##########################################################################
+##########################################################################
+
+HOSTCC=gcc
+HOSTCFLAGS=-g -O2 -Wall
+
+PAKWIF=$(TOPDIR)/tools/pakwif$(EXE)
+
+##########################################################################
+
+CC=arm-elf-gcc
+OBJCOPY=arm-elf-objcopy
+OBJDUMP=arm-elf-objdump
+STRIP=arm-elf-strip
+NM=arm-elf-nm
+AR=arm-elf-ar
+RANLIB=arm-elf-ranlib
+SIZE=arm-elf-size
+
+# -msoft-float is used per default but object files are marked as hard-float
+CFLAGS:=-fno-inline -fno-strict-aliasing -Wall -Os -Wextra
+# flags for gcc v4
+CFLAGS+=-mtune=arm946e-s
+# for gcc v3, we use to allow use of strd etc
+# CFLAGS+=-march=armv5te
+
+CTHUMB:=-mthumb
+CFLAGS+=-mthumb-interwork
+CFLAGS+=-I$(TOPDIR)/include $(PLFLAGS) $(CPPFLAGS)
+CFLAGS+=-DPLATFORM=\"$(PLATFORM)\" -DPLATFORMSUB=\"$(PLATFORMSUB)\" -DPLATFORMID=\"$(PLATFORMID)\" -DHDK_VERSION=\"$(VER)\" -DBUILD_NUMBER=\"$(BUILD_NUMBER)\" -DCAMERA_$(PLATFORM)=1
+CFLAGS+=-Wall -Wno-unused -Wno-format
+LDFLAGS:=-L$(TOPDIR)/lib/math -L$(TOPDIR)/lib/font
+LDFLAGS+=-L$(TOPDIR)/lib/libc -L$(TOPDIR)/lib/ubasic
+LDFLAGS+=-L$(TOPDIR)/platform/$(PLATFORM) -L$(TOPDIR)/platform/$(PLATFORM)/sub/$(PLATFORMSUB)
+
+ifdef OPT_DEBUGGING
+CFLAGS+=-DOPT_DEBUGGING
+endif
+##########################################################################
+
+#ifndef NO_INC_BUILD
+#BUILD_NUMBER := $(shell expr $(BUILD_NUMBER) + 1)
+#endif
+
+ifdef VERBOSE
+    ECHOTARGET:=&> /dev/null
+    SILENCE:=
+else
+    ECHOTARGET:=
+    SILENCE:=@
+endif
+
+SUBDIRS=tools lib platform core loader
+SUBRULES := all clean distclean
+
+default: all
+
+DEPFLAGS:=-MD -MF
+DEPSUFFIX:=$(PLATFORM)_$(PLATFORMSUB).d
+define single-compile-targets
+-include $(1).$(DEPSUFFIX)
+$(1): $(1:.o=.c) $(3)
+	@echo $$< \-\> $$@
+	$(CC) $(CFLAGS) $(2) $(DEPFLAGS) $(1).$(DEPSUFFIX) -nostdinc -o $$@ -c $$<
+endef
+
+define compile-targets
+$(foreach target,$(1),$(eval $(call single-compile-targets,$(target),$(2),$(3) ) ) )
+endef
+
+define single-compile-host-targets
+-include $(1).HOST.d
+$(1): $(1:.o=.c) $(3)
+	@echo $$< \-\> $$@
+	$(HOSTCC) $(HOSTCFLAGS) $(2) $(DEPFLAGS) $(1).HOST.d -o $$@ -c $$<
+endef
+
+define compile-host-targets
+$(foreach target,$(1),$(eval $(call single-compile-host-targets,$(target),$(2),$(3) ) ) )
+endef
+
+define single-compile-asm-targets
+-include $(1).$(PLATFORM)_$(PLATFORMSUB).d
+$(1): $(1:.o=.S) $(3)
+	@echo $$< \-\> $$@
+	$(CC) $(CFLAGS) $(2) $(DEPFLAGS) $(1).$(DEPSUFFIX) -nostdinc -o $$@ -c $$<
+endef
+
+define compile-asm-targets
+$(foreach target,$(1),$(eval $(call single-compile-asm-targets,$(target),$(2),$(3) ) ) )
+endef
+
+# use this helper function if you want to have immedeate evaluation of your
+# variables (usually for $(OBJS) you want) instead of evaluation only at the
+# point the rule is executed. As a nice side-effect this also prints whats going on, rule-wise
+define gen-rule
+$(1):: $(2)
+	@echo Executing commands for rule $(1): prerequisites \[$(strip $(2))\] already done
+	$(SILENCE)$(3)
+endef
+
+define ar-targets
+$(subdir)/$(strip $(1)): $(2)
+	@echo creating $(1) from $(2)
+	$(SILENCE)$(AR) rcs $(subdir)/$(strip $(1)) $(2)
+endef
+
+# rules for debugging, need to be tweaked each time
+#%.o: %.S
+#	if [ -n "$(echo $@ $< | grep \/)" ]; then echo $@ $< FAIL, PLEASE FIX RULE!; exit 1; fi
+#
+#%.o: %.c
+#	if [ -n "$(echo $@ $< | grep \/)" ]; then echo $@ $< FAIL, PLEASE FIX RULE!; exit 1; fi
+
+.dep/%.d: %.c .dep
+	$(CC) $(CFLAGS) -M $< > $@.$$$$; \
+	    sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+	    rm -f $@.$$$$
+
+.dep/%.d: %.S .dep
+	$(CC) $(CFLAGS) -M $< > $@.$$$$; \
+	    sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+	    rm -f $@.$$$$
+
+all: fir $(PAKWIF) tools/gensig tools/finsig
+
+
+clean: clean-recursive
+
+distclean: distclean-recursive
+
+.dep:
+	mkdir .dep
+
+.PHONY: $(SUBDIRS)
+
+define subdirize
+$(foreach f,$(1),$(subdir)/$(f))
+endef
+
+SAVEDSUBDIRS:=$(SUBDIRS) # the includes sometimes overwrite SUBDIRS
+# be carefull to leave the varname subdir it is used in the included makefiles
+#$(foreach subdir,$(SUBDIRS),$(info "include $(subdir)/makefile.inc.new") )
+$(foreach subdir,$(SUBDIRS),$(eval include $(subdir)/makefile.inc.new) )
+SUBDIRS:=$(SAVEDSUBDIRS)
+VPATH:=$(TOPDIR)
+
+#$(strip $(1))-recursive: $(foreach subdir,$(SUBDIRS),$(info "Generating $(strip $(1))-recursive: $(subdir)-$(strip $(1))"))
+define subdir-recursive-rule
+$(eval $(call gen-rule, $(strip $(1))-recursive, $(foreach subdir,$(SUBDIRS),$(subdir)-$(strip $(1))),))
+endef
+
+$(foreach subrule,$(SUBRULES),$(eval $(call subdir-recursive-rule,$(strip $(subrule) ) ) ) )
+
+MAKE:=$(MAKE) -f Makefile.new
+
+$(BINDIR):
+	@echo mkdir -p $@ $(ECHOTARGET)
+	$(SILENCE)mkdir -p $@
+
+
+
+fir: version firsub
+
+firsub: $(BINDIR) $(TOPDIR)/loader/$(PLATFORM)/main.bin $(PAKWIF)
+	$(SILENCE)mkdir -p $(TOPDIR)/bin
+	$(SILENCE)cp $(TOPDIR)/loader/$(PLATFORM)/main.bin $(TOPDIR)/bin/main.bin
+ifndef NOZERO100K
+ifeq ($(OSTYPE),Windows)
+	zero | dd bs=1k count=100 >> $(TOPDIR)/bin/main.bin 2> $(DEVNULL)
+else
+	dd if=/dev/zero bs=1k count=100 >> $(TOPDIR)/bin/main.bin 2> $(DEVNULL)
+endif
+endif
+ifdef PLATFORMOS
+  ifeq ($(PLATFORMOS),vxworks)
+	@echo \-\> $(PLATFORM)-$(PLATFORMSUB).FIR
+	$(PAKWIF) $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FIR \
+	     $(TOPDIR)/bin/main.bin\
+	    $(PLATFORMID) 0x01000101
+  endif
+  ifeq ($(PLATFORMOS),dryos)
+	#@echo \-\> $(PLATFORM)-$(PLATFORMSUB).FI2
+  endif
+endif
+	mv $(TOPDIR)/bin/main.bin $(TOPDIR)/bin/DISKBOOT.BIN
+	@echo "**** Firmware creation completed successfully"
+
+upload: fir
+	@echo Uploading...
+	cp $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FIR $(TOPDIR)/bin/PS.FIR
+	/home/vitalyb/Projects/ch/libptp2-1.1.0/src/ptpcam -u -m 0xbf01 --filename $(TOPDIR)/bin/PS.FIR
+
+infoline:
+	@echo "**** BUILDING CHDK-$(VER), #$(BUILD_NUMBER) FOR $(PLATFORM)-$(PLATFORMSUB)"
+
+version: FORCE
+	@echo "**** Build: $(BUILD_NUMBER)"
+	@echo "BUILD_NUMBER := $(BUILD_NUMBER)" > version.inc
+
+FORCE:
+
+firzip: version clean
+	$(MAKE) firsub
+
+firzipsub: infoline firzip
+	@echo \-\> $(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip
+	rm -f $(TOPDIR)/bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip
+	LANG=C echo -e "CHDK-$(VER) for $(PLATFORM) fw:$(PLATFORMSUB) build:$(BUILD_NUMBER) date:`date -R`" | \
+	    zip -9jz $(TOPDIR)/bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/bin/DISKBOOT.BIN > $(DEVNULL)
+ifdef PLATFORMOS
+  ifeq ($(PLATFORMOS),vxworks)
+	cp $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FIR $(TOPDIR)/bin/PS.FIR
+	zip -9j $(TOPDIR)/bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/bin/PS.FIR > $(DEVNULL)
+	rm -f $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FIR
+	rm -f $(TOPDIR)/bin/PS.FIR
+  endif
+  ifeq ($(PLATFORMOS),dryos)
+	#cp $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FI2 $(TOPDIR)/bin/PS.FI2
+	#zip -9jc $(TOPDIR)/bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/bin/PS.FI2 > $(DEVNULL)
+	#rm -f $(TOPDIR)/bin/PS.FI2
+  endif
+endif
+	rm -f $(TOPDIR)/bin/DISKBOOT.BIN
+
+firzipsubcomplete: infoline clean firsub
+	@echo \-\> $(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip
+	rm -f $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip
+	@echo \-\> $(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip
+	rm -f $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip
+	LANG=C echo -e "CHDK-$(VER) for $(PLATFORM) fw:$(PLATFORMSUB) build:$(BUILD_NUMBER) date:`date -R`" | \
+	zip -9jz $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/bin/DISKBOOT.BIN > $(DEVNULL)
+	LANG=C echo -e "CHDK-$(VER) for $(PLATFORM) fw:$(PLATFORMSUB) build:$(BUILD_NUMBER) date:`date -R`" | \
+	zip -9jz $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/bin/DISKBOOT.BIN > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/SYMBOLS/*  > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/BOOKS/*  > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/CURVES/*  > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/FONTS/*  > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/GAMES/*   > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/GRIDS/* > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/LANG/*   > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/SCRIPTS/*  > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/SCRIPTS/examples/* 	 > $(DEVNULL)
+	zip -9 $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/CHDK/syscurves.CVF 	 > $(DEVNULL)
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/doc/version.txt  > $(DEVNULL)
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/doc/version.txt  > $(DEVNULL)
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/tools/vers.req  > $(DEVNULL)
+ifdef PLATFORMOS
+  ifeq ($(PLATFORMOS),vxworks)
+	cp $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FIR $(TOPDIR)/bin/PS.FIR
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/bin/PS.FIR > $(DEVNULL)
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/bin/PS.FIR > $(DEVNULL)
+	cat $(TOPDIR)/doc/1_intro.txt $(TOPDIR)/platform/$(PLATFORM)/notes.txt $(TOPDIR)/doc/2_vxworks.txt $(TOPDIR)/doc/3_faq.txt $(TOPDIR)/doc/4_urls.txt $(TOPDIR)/doc/5_gpl.txt > $(TOPDIR)/doc/readme.txt
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/doc/readme.txt  > $(DEVNULL)
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/doc/readme.txt  > $(DEVNULL)
+	rm -f $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FIR
+	rm -f $(TOPDIR)/bin/PS.FIR
+  endif
+  ifeq ($(PLATFORMOS),dryos)
+	cat $(TOPDIR)/doc/1_intro.txt $(TOPDIR)/platform/$(PLATFORM)/notes.txt $(TOPDIR)/doc/2_dryos.txt $(TOPDIR)/doc/3_faq.txt $(TOPDIR)/doc/4_urls.txt $(TOPDIR)/doc/5_gpl.txt > $(TOPDIR)/doc/readme.txt
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/doc/readme.txt  > $(DEVNULL)
+	zip -9j $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/doc/readme.txt  > $(DEVNULL)
+	#cp $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB).FI2 $(TOPDIR)/bin/PS.FI2
+	#zip -9jc $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)-full.zip $(TOPDIR)/bin/PS.FI2 > $(DEVNULL)
+	#zip -9jc $(TOPDIR)/bin/$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(TOPDIR)/bin/PS.FI2 > $(DEVNULL)
+	#rm -f $(TOPDIR)/bin/PS.FI2
+  endif
+endif
+	rm -f $(TOPDIR)/bin/DISKBOOT.BIN
+
+
+batch-zip: version
+	$(MAKE) -s --no-print-directory PLATFORM=a610 PLATFORMSUB=100e NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a610 PLATFORMSUB=100f NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a620 PLATFORMSUB=100f NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a630 PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a640 PLATFORMSUB=100b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a700 PLATFORMSUB=100b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a710 PLATFORMSUB=100a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100e NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100f NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100g NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=s3is PLATFORMSUB=100a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100e NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100g NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100i NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100j NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a530 PLATFORMSUB=100a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a540 PLATFORMSUB=100b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a560 PLATFORMSUB=100a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a570 PLATFORMSUB=100e NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a570 PLATFORMSUB=101a NO_INC_BUILD=1 firzipsub
+	#$(MAKE) -s --no-print-directory PLATFORM=s80  PLATFORMSUB=100g NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus700_sd500   PLATFORMSUB=101a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus700_sd500   PLATFORMSUB=101b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus800_sd700   PLATFORMSUB=101b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus800_sd700   PLATFORMSUB=100b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus850_sd800   PLATFORMSUB=100e NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus860_sd870   PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus950_sd850   PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub	
+	$(MAKE) -s --no-print-directory PLATFORM=ixus40_sd300    PLATFORMSUB=100k NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus40_sd300    PLATFORMSUB=100j NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus50_sd400    PLATFORMSUB=101a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus50_sd400    PLATFORMSUB=101b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100d NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus65_sd630    PLATFORMSUB=100a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=101b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=102a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=100b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=101a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=102a NO_INC_BUILD=1 firzipsub
+	#$(MAKE) -s --no-print-directory PLATFORM=ixusW_sd430     PLATFORMSUB=110a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a720 PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a650 PLATFORMSUB=100d NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a450 PLATFORMSUB=100d NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a460 PLATFORMSUB=100d NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=a550 PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=s5is PLATFORMSUB=101a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=s5is PLATFORMSUB=101b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=tx1  PLATFORMSUB=100g NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=tx1  PLATFORMSUB=101b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=sx100is  PLATFORMSUB=100b NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=sx100is  PLATFORMSUB=100c NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus750_sd550  PLATFORMSUB=100f NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus750_sd550  PLATFORMSUB=100g NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus60_sd600  PLATFORMSUB=100a NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus60_sd600  PLATFORMSUB=100d NO_INC_BUILD=1 firzipsub
+	$(MAKE) -s --no-print-directory PLATFORM=ixus960_sd950  PLATFORMSUB=100d NO_INC_BUILD=1 firzipsub
+	@echo "**** All firmwares created successfully"
+	@echo "**** Copying duplicate Firmwares"
+	cp $(TOPDIR)/bin/$(VER)-a610-100e-$(BUILD_NUMBER).zip $(TOPDIR)/bin/$(VER)-a610-100d-$(BUILD_NUMBER).zip
+	cp $(TOPDIR)/bin/$(VER)-s2is-100g-$(BUILD_NUMBER).zip $(TOPDIR)/bin/$(VER)-s2is-100i-$(BUILD_NUMBER).zip
+	cp $(TOPDIR)/bin/$(VER)-ixus800_sd700-101b-$(BUILD_NUMBER).zip $(TOPDIR)/bin/$(VER)-ixus800_sd700-101a-$(BUILD_NUMBER).zip
+	cp $(TOPDIR)/bin/$(VER)-ixus850_sd800-100e-$(BUILD_NUMBER).zip $(TOPDIR)/bin/$(VER)-ixus850_sd800-100d-$(BUILD_NUMBER).zip
+	cp $(TOPDIR)/bin/$(VER)-ixus70_sd1000-101b-$(BUILD_NUMBER).zip $(TOPDIR)/bin/$(VER)-ixus70_sd1000-101a-$(BUILD_NUMBER).zip
+	cp $(topdir)bin/$(VER)-ixus75_sd750-101a-$(BUILD_NUMBER).zip $(topdir)bin/$(VER)-ixus75_sd750-101b-$(BUILD_NUMBER).zip
+	@echo "**** Done Copying duplicate Firmwares"
+	@echo "**** Summary of memisosizes"
+	cat $(TOPDIR)/bin/caminfo.txt
+	rm -f $(TOPDIR)/bin/caminfo.txt   > $(DEVNULL)
+
+batch-zip-complete: version
+	$(MAKE) -s --no-print-directory PLATFORM=a610 PLATFORMSUB=100e NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a610 PLATFORMSUB=100f NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a620 PLATFORMSUB=100f NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a630 PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a640 PLATFORMSUB=100b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a700 PLATFORMSUB=100b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a710 PLATFORMSUB=100a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100e NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100f NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100g NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=s3is PLATFORMSUB=100a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100e NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100g NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100i NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100j NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a530 PLATFORMSUB=100a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a540 PLATFORMSUB=100b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a560 PLATFORMSUB=100a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a570 PLATFORMSUB=100e NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a570 PLATFORMSUB=101a NO_INC_BUILD=1 firzipsubcomplete
+	#$(MAKE) -s --no-print-directory PLATFORM=s80  PLATFORMSUB=100g NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus700_sd500   PLATFORMSUB=101a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus700_sd500   PLATFORMSUB=101b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus800_sd700   PLATFORMSUB=101b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus800_sd700   PLATFORMSUB=100b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus850_sd800   PLATFORMSUB=100e NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus860_sd870   PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus950_sd850   PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete	
+	$(MAKE) -s --no-print-directory PLATFORM=ixus40_sd300    PLATFORMSUB=100k NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus40_sd300    PLATFORMSUB=100j NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus50_sd400    PLATFORMSUB=101a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus50_sd400    PLATFORMSUB=101b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100d NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus65_sd630    PLATFORMSUB=100a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=101b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=102a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=100b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=101a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=102a NO_INC_BUILD=1 firzipsubcomplete
+	#$(MAKE) -s --no-print-directory PLATFORM=ixusW_sd430     PLATFORMSUB=110a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a720 PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a650 PLATFORMSUB=100d NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a450 PLATFORMSUB=100d NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a460 PLATFORMSUB=100d NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=a550 PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=s5is PLATFORMSUB=101a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=s5is PLATFORMSUB=101b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=tx1  PLATFORMSUB=100g NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=tx1  PLATFORMSUB=101b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=sx100is  PLATFORMSUB=100b NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=sx100is  PLATFORMSUB=100c NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus750_sd550  PLATFORMSUB=100f NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus750_sd550  PLATFORMSUB=100g NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus60_sd600  PLATFORMSUB=100a NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus60_sd600  PLATFORMSUB=100d NO_INC_BUILD=1 firzipsubcomplete
+	$(MAKE) -s --no-print-directory PLATFORM=ixus960_sd950  PLATFORMSUB=100d NO_INC_BUILD=1 firzipsubcomplete
+	@echo "**** All zipfiles including firmwares and extra stuff created successfully"
+	@echo "**** Copying duplicate Firmwares"
+	cp $(topdir)bin/a610-100e-$(BUILD_NUMBER)-full.zip $(topdir)bin/a610-100d-$(BUILD_NUMBER)-full.zip
+	cp $(topdir)bin/a610-100e-$(BUILD_NUMBER).zip $(topdir)bin/a610-100d-$(BUILD_NUMBER).zip
+	cp $(topdir)bin/s2is-100g-$(BUILD_NUMBER)-full.zip $(topdir)bin/s2is-100i-$(BUILD_NUMBER)-full.zip
+	cp $(topdir)bin/s2is-100g-$(BUILD_NUMBER).zip $(topdir)bin/s2is-100i-$(BUILD_NUMBER).zip
+	cp $(topdir)bin/ixus800_sd700-101b-$(BUILD_NUMBER)-full.zip $(topdir)bin/ixus800_sd700-101a-$(BUILD_NUMBER)-full.zip
+	cp $(topdir)bin/ixus800_sd700-101b-$(BUILD_NUMBER).zip $(topdir)bin/ixus800_sd700-101a-$(BUILD_NUMBER).zip
+	cp $(topdir)bin/ixus850_sd800-100e-$(BUILD_NUMBER)-full.zip $(topdir)bin/ixus850_sd800-100d-$(BUILD_NUMBER)-full.zip
+	cp $(topdir)bin/ixus850_sd800-100e-$(BUILD_NUMBER).zip $(topdir)bin/ixus850_sd800-100d-$(BUILD_NUMBER).zip
+	cp $(topdir)bin/ixus70_sd1000-101b-$(BUILD_NUMBER)-full.zip $(topdir)bin/ixus70_sd1000-101a-$(BUILD_NUMBER)-full.zip
+	cp $(topdir)bin/ixus70_sd1000-101b-$(BUILD_NUMBER).zip $(topdir)bin/ixus70_sd1000-101a-$(BUILD_NUMBER).zip
+	cp $(topdir)bin/ixus75_sd750-101a-$(BUILD_NUMBER)-full.zip $(topdir)bin/ixus75_sd750-101b-$(BUILD_NUMBER)-full.zip
+	cp $(topdir)bin/ixus75_sd750-101a-$(BUILD_NUMBER).zip $(topdir)bin/ixus75_sd750-101b-$(BUILD_NUMBER).zip
+	@echo "**** Done Copying duplicate Firmwares"
+	@echo "**** Summary of memisosizes"
+	cat $(TOPDIR)/bin/caminfo.txt
+	rm -f $(TOPDIR)/bin/caminfo.txt   > $(DEVNULL)
+
+
+
+batch-clean:
+	$(MAKE) -s --no-print-directory PLATFORM=a610 PLATFORMSUB=100e NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a610 PLATFORMSUB=100f NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a620 PLATFORMSUB=100f NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a630 PLATFORMSUB=100c NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a640 PLATFORMSUB=100b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a700 PLATFORMSUB=100b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a710 PLATFORMSUB=100a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100e NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100f NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=s2is PLATFORMSUB=100g NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=s3is PLATFORMSUB=100a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100e NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100g NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100i NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=g7   PLATFORMSUB=100j NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a530 PLATFORMSUB=100a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a540 PLATFORMSUB=100b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a560 PLATFORMSUB=100a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a570 PLATFORMSUB=100e NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a570 PLATFORMSUB=101a NO_INC_BUILD=1 clean
+	#$(MAKE) -s --no-print-directory PLATFORM=s80  PLATFORMSUB=100g NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus700_sd500   PLATFORMSUB=101a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus700_sd500   PLATFORMSUB=101b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus800_sd700   PLATFORMSUB=101b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus800_sd700   PLATFORMSUB=100b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus850_sd800   PLATFORMSUB=100e NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus860_sd870   PLATFORMSUB=100c NO_INC_BUILD=1 clean	
+	$(MAKE) -s --no-print-directory PLATFORM=ixus950_sd850   PLATFORMSUB=100c NO_INC_BUILD=1 clean	
+	$(MAKE) -s --no-print-directory PLATFORM=ixus40_sd300    PLATFORMSUB=100k NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus40_sd300    PLATFORMSUB=100j NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus50_sd400    PLATFORMSUB=101a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus50_sd400    PLATFORMSUB=101b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100c NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus55_sd450    PLATFORMSUB=100d NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus65_sd630    PLATFORMSUB=100a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=100c NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=101b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus70_sd1000   PLATFORMSUB=102a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=100b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=101a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus75_sd750   PLATFORMSUB=102a NO_INC_BUILD=1 clean
+	#$(MAKE) -s --no-print-directory PLATFORM=ixusW_sd430     PLATFORMSUB=110a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a720 PLATFORMSUB=100c NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a650 PLATFORMSUB=100d NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a450 PLATFORMSUB=100d NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a460 PLATFORMSUB=100d NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=a550 PLATFORMSUB=100c NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=s5is PLATFORMSUB=101a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=s5is PLATFORMSUB=101b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=tx1  PLATFORMSUB=100g NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=tx1  PLATFORMSUB=101b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=sx100is  PLATFORMSUB=100b NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=sx100is  PLATFORMSUB=100c NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus750_sd550  PLATFORMSUB=100f NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus750_sd550  PLATFORMSUB=100g NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus60_sd600  PLATFORMSUB=100a NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus60_sd600  PLATFORMSUB=100d NO_INC_BUILD=1 clean
+	$(MAKE) -s --no-print-directory PLATFORM=ixus960_sd950  PLATFORMSUB=100d NO_INC_BUILD=1 clean
+	
+
+.PHONY: fir upload
+
+include bottom.inc
+
Index: loader/s2is/resetcode/makefile.inc.new
===================================================================
--- loader/s2is/resetcode/makefile.inc.new	(Revision 0)
+++ loader/s2is/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/s2is/makefile.inc.new
===================================================================
--- loader/s2is/makefile.inc.new	(Revision 0)
+++ loader/s2is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/s3is/resetcode/makefile.inc.new
===================================================================
--- loader/s3is/resetcode/makefile.inc.new	(Revision 0)
+++ loader/s3is/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/s3is/makefile.inc.new
===================================================================
--- loader/s3is/makefile.inc.new	(Revision 0)
+++ loader/s3is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus65_sd630/resetcode/makefile.inc.new
===================================================================
--- loader/ixus65_sd630/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus65_sd630/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus65_sd630/makefile.inc.new
===================================================================
--- loader/ixus65_sd630/makefile.inc.new	(Revision 0)
+++ loader/ixus65_sd630/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/s5is/resetcode/makefile.inc.new
===================================================================
--- loader/s5is/resetcode/makefile.inc.new	(Revision 0)
+++ loader/s5is/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/s5is/makefile.inc.new
===================================================================
--- loader/s5is/makefile.inc.new	(Revision 0)
+++ loader/s5is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus70_sd1000/resetcode/makefile.inc.new
===================================================================
--- loader/ixus70_sd1000/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus70_sd1000/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus70_sd1000/makefile.inc.new
===================================================================
--- loader/ixus70_sd1000/makefile.inc.new	(Revision 0)
+++ loader/ixus70_sd1000/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixusW_sd430/resetcode/makefile.inc.new
===================================================================
--- loader/ixusW_sd430/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixusW_sd430/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixusW_sd430/makefile.inc.new
===================================================================
--- loader/ixusW_sd430/makefile.inc.new	(Revision 0)
+++ loader/ixusW_sd430/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus850_sd800/resetcode/makefile.inc.new
===================================================================
--- loader/ixus850_sd800/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus850_sd800/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus850_sd800/makefile.inc.new
===================================================================
--- loader/ixus850_sd800/makefile.inc.new	(Revision 0)
+++ loader/ixus850_sd800/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus40_sd300/resetcode/makefile.inc.new
===================================================================
--- loader/ixus40_sd300/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus40_sd300/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus40_sd300/makefile.inc.new
===================================================================
--- loader/ixus40_sd300/makefile.inc.new	(Revision 0)
+++ loader/ixus40_sd300/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a700/resetcode/makefile.inc.new
===================================================================
--- loader/a700/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a700/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a700/makefile.inc.new
===================================================================
--- loader/a700/makefile.inc.new	(Revision 0)
+++ loader/a700/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a620/resetcode/makefile.inc.new
===================================================================
--- loader/a620/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a620/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a620/makefile.inc.new
===================================================================
--- loader/a620/makefile.inc.new	(Revision 0)
+++ loader/a620/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a540/resetcode/makefile.inc.new
===================================================================
--- loader/a540/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a540/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a540/makefile.inc.new
===================================================================
--- loader/a540/makefile.inc.new	(Revision 0)
+++ loader/a540/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a720/resetcode/makefile.inc.new
===================================================================
--- loader/a720/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a720/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a720/makefile.inc.new
===================================================================
--- loader/a720/makefile.inc.new	(Revision 0)
+++ loader/a720/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/s80/resetcode/makefile.inc.new
===================================================================
--- loader/s80/resetcode/makefile.inc.new	(Revision 0)
+++ loader/s80/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/s80/makefile.inc.new
===================================================================
--- loader/s80/makefile.inc.new	(Revision 0)
+++ loader/s80/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus60_sd600/resetcode/makefile.inc.new
===================================================================
--- loader/ixus60_sd600/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus60_sd600/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus60_sd600/makefile.inc.new
===================================================================
--- loader/ixus60_sd600/makefile.inc.new	(Revision 0)
+++ loader/ixus60_sd600/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a460/resetcode/makefile.inc.new
===================================================================
--- loader/a460/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a460/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a460/makefile.inc.new
===================================================================
--- loader/a460/makefile.inc.new	(Revision 0)
+++ loader/a460/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a640/resetcode/makefile.inc.new
===================================================================
--- loader/a640/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a640/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a640/makefile.inc.new
===================================================================
--- loader/a640/makefile.inc.new	(Revision 0)
+++ loader/a640/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/makefile_resetcode.inc.new
===================================================================
--- loader/makefile_resetcode.inc.new	(Revision 0)
+++ loader/makefile_resetcode.inc.new	(Revision 0)
@@ -0,0 +1,30 @@
+
+# warning: library order matters!
+LDLIBS:=
+LDOPTS:=-nostdlib -Wl,--allow-shlib-undefined -Wl,--no-define-common,-EL,-T,$(topdir)tools/link-boot.ld
+LDOPTS+=-Wl,-N,-Ttext,$(RESTARTSTART)
+
+subdir:=$(subdir)/resetcode
+
+ASM_OBJS:=entry.o
+C_OBJS:=main.o
+OBJS:=$(call subdirize, $(ASM_OBJS) $(C_OBJS) )
+
+$(eval $(call compile-asm-targets, $(ASM_OBJS),,))
+$(eval $(call compile-targets, $(C_OBJS),,))
+
+$(eval $(call gen-rule, $(subdir)/main.bin, $(subdir)/main.elf, \
+	$(OBJDUMP) -z -d $(subdir)/main.elf > $(subdir)/main.dump; \
+	$(OBJCOPY) -O binary $(subdir)/main.elf $(subdir)/main.bin ) )
+
+$(eval $(call gen-rule, $(subdir)/main.elf, $(OBJS), \
+	$(CC) $(CFLAGS) -o $(subdir)/main.elf $(OBJS) $(LDLIBS) $(LDFLAGS) $(LDOPTS); \
+	( $(NM) $(subdir)/main.elf | grep ' U ' > $(subdir)/main.elf.syms ) && exit 1 || exit 0 ) )
+
+$(eval $(call gen-rule, resetcode-$(PLATFORM)-loader-clean,, \
+	$(SILENCE)rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/main.bin $(subdir)/main.elf $(subdir)/main.dump $(subdir)/main.elf.syms ) )
+
+$(eval $(call gen-rule, resetcode-$(PLATFORM)-loader-distclean,, \
+	$(SILENCE)rm -f $(OBJS) $(subdir)/main.bin $(subdir)/main.elf $(subdir)/main.dump $(subdir)/main.elf.syms ))
+
+# vim: ft=make
Index: loader/ixus960_sd950/resetcode/makefile.inc.new
===================================================================
--- loader/ixus960_sd950/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus960_sd950/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus960_sd950/makefile.inc.new
===================================================================
--- loader/ixus960_sd950/makefile.inc.new	(Revision 0)
+++ loader/ixus960_sd950/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus860_sd870/resetcode/makefile.inc.new
===================================================================
--- loader/ixus860_sd870/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus860_sd870/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus860_sd870/makefile.inc.new
===================================================================
--- loader/ixus860_sd870/makefile.inc.new	(Revision 0)
+++ loader/ixus860_sd870/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a560/resetcode/makefile.inc.new
===================================================================
--- loader/a560/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a560/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a560/makefile.inc.new
===================================================================
--- loader/a560/makefile.inc.new	(Revision 0)
+++ loader/a560/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/tx1/resetcode/makefile.inc.new
===================================================================
--- loader/tx1/resetcode/makefile.inc.new	(Revision 0)
+++ loader/tx1/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/tx1/makefile.inc.new
===================================================================
--- loader/tx1/makefile.inc.new	(Revision 0)
+++ loader/tx1/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus55_sd450/resetcode/makefile.inc.new
===================================================================
--- loader/ixus55_sd450/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus55_sd450/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus55_sd450/makefile.inc.new
===================================================================
--- loader/ixus55_sd450/makefile.inc.new	(Revision 0)
+++ loader/ixus55_sd450/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus75_sd750/resetcode/makefile.inc.new
===================================================================
--- loader/ixus75_sd750/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus75_sd750/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus75_sd750/makefile.inc.new
===================================================================
--- loader/ixus75_sd750/makefile.inc.new	(Revision 0)
+++ loader/ixus75_sd750/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus700_sd500/resetcode/makefile.inc.new
===================================================================
--- loader/ixus700_sd500/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus700_sd500/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus700_sd500/makefile.inc.new
===================================================================
--- loader/ixus700_sd500/makefile.inc.new	(Revision 0)
+++ loader/ixus700_sd500/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus800_sd700/resetcode/makefile.inc.new
===================================================================
--- loader/ixus800_sd700/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus800_sd700/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus800_sd700/makefile.inc.new
===================================================================
--- loader/ixus800_sd700/makefile.inc.new	(Revision 0)
+++ loader/ixus800_sd700/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus750_sd550/resetcode/makefile.inc.new
===================================================================
--- loader/ixus750_sd550/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus750_sd550/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus750_sd550/makefile.inc.new
===================================================================
--- loader/ixus750_sd550/makefile.inc.new	(Revision 0)
+++ loader/ixus750_sd550/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a610/resetcode/makefile.inc.new
===================================================================
--- loader/a610/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a610/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a610/makefile.inc.new
===================================================================
--- loader/a610/makefile.inc.new	(Revision 0)
+++ loader/a610/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/sx100is/resetcode/makefile.inc.new
===================================================================
--- loader/sx100is/resetcode/makefile.inc.new	(Revision 0)
+++ loader/sx100is/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/sx100is/makefile.inc.new
===================================================================
--- loader/sx100is/makefile.inc.new	(Revision 0)
+++ loader/sx100is/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus50_sd400/resetcode/makefile.inc.new
===================================================================
--- loader/ixus50_sd400/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus50_sd400/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus50_sd400/makefile.inc.new
===================================================================
--- loader/ixus50_sd400/makefile.inc.new	(Revision 0)
+++ loader/ixus50_sd400/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a530/resetcode/makefile.inc.new
===================================================================
--- loader/a530/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a530/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a530/makefile.inc.new
===================================================================
--- loader/a530/makefile.inc.new	(Revision 0)
+++ loader/a530/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a710/resetcode/makefile.inc.new
===================================================================
--- loader/a710/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a710/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a710/makefile.inc.new
===================================================================
--- loader/a710/makefile.inc.new	(Revision 0)
+++ loader/a710/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a450/resetcode/makefile.inc.new
===================================================================
--- loader/a450/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a450/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a450/makefile.inc.new
===================================================================
--- loader/a450/makefile.inc.new	(Revision 0)
+++ loader/a450/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/ixus950_sd850/resetcode/makefile.inc.new
===================================================================
--- loader/ixus950_sd850/resetcode/makefile.inc.new	(Revision 0)
+++ loader/ixus950_sd850/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/ixus950_sd850/makefile.inc.new
===================================================================
--- loader/ixus950_sd850/makefile.inc.new	(Revision 0)
+++ loader/ixus950_sd850/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a630/resetcode/makefile.inc.new
===================================================================
--- loader/a630/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a630/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a630/makefile.inc.new
===================================================================
--- loader/a630/makefile.inc.new	(Revision 0)
+++ loader/a630/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/makefile_generic.inc.new
===================================================================
--- loader/makefile_generic.inc.new	(Revision 0)
+++ loader/makefile_generic.inc.new	(Revision 0)
@@ -0,0 +1,46 @@
+
+
+
+
+LDLIBS=
+LOADER_LDOPTS:=-nostdlib -Wl,--allow-shlib-undefined -Wl,--no-define-common,-EL,-T,$(TOPDIR)/tools/link-boot.ld
+LOADER_LDOPTS+=-Wl,-N,-Ttext,$(MEMBASEADDR)
+
+LOCAL_CFLAGS:=-I.
+
+CORE_FILE:=$(TOPDIR)/core/main.bin
+RESET_FILE:=$(subdir)/resetcode/main.bin
+
+LOCAL_CFLAGS+=-DCORE_FILE=\"$(CORE_FILE)\"
+LOCAL_CFLAGS+=-DRESET_FILE=\"$(RESET_FILE)\"
+
+$(eval $(call gen-rule, $(subdir)/main.bin, loader-main.bin, ))
+
+ASM_OBJS :=entry.o blobs.o
+C_OBJS := main.o 
+
+ASM_OBJS:=$(call subdirize,$(ASM_OBJS) )
+C_OBJS:=$(call subdirize,$(C_OBJS) )
+
+$(eval $(call compile-asm-targets, $(ASM_OBJS) , $(LOCAL_CFLAGS), $(CORE_FILE) $(RESET_FILE) ) )
+$(eval $(call compile-targets, $(C_OBJS) , $(LOCAL_CFLAGS) ) )
+
+
+OBJS:=$(ASM_OBJS) $(C_OBJS)
+
+$(eval $(call gen-rule, loader-main.bin, loader-main.elf, \
+	$(OBJDUMP) -z -d $(subdir)/main.elf > $(subdir)/main.dump; \
+	$(OBJCOPY) -O binary $(subdir)/main.elf $(subdir)/main.bin ))
+
+$(eval $(call gen-rule, loader-main.elf, $(OBJS), \
+	$(SILENCE)$(CC) $(CFLAGS) -o $(subdir)/main.elf $(OBJS) $(LDLIBS) $(LDFLAGS) $(LOADER_LDOPTS); \
+	( $(NM) $(subdir)/main.elf | grep ' U ' > $(subdir)/main.elf.syms ) && exit 1 || exit 0 ) )
+
+$(eval $(call gen-rule, $(PLATFORM)-loader-clean, resetcode-$(PLATFORM)-loader-clean, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/main.bin $(subdir)/main.elf $(subdir)/main.dump $(subdir)/main.elf.syms))
+
+$(eval $(call gen-rule, $(PLATFORM)-loader-distclean, resetcode-$(PLATFORM)-loader-distclean loader-clean, rm -f reboot_core.h copy_and_reset.h ))
+
+LOCAL_SUBDIRS:=$(subdir)/resetcode
+$(foreach subdir,$(LOCAL_SUBDIRS),$(eval include $(subdir)/makefile.inc.new) )
+
+# vim: ft=make
Index: loader/a550/resetcode/makefile.inc.new
===================================================================
--- loader/a550/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a550/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a550/makefile.inc.new
===================================================================
--- loader/a550/makefile.inc.new	(Revision 0)
+++ loader/a550/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a650/resetcode/makefile.inc.new
===================================================================
--- loader/a650/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a650/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a650/makefile.inc.new
===================================================================
--- loader/a650/makefile.inc.new	(Revision 0)
+++ loader/a650/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/a570/resetcode/makefile.inc.new
===================================================================
--- loader/a570/resetcode/makefile.inc.new	(Revision 0)
+++ loader/a570/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/a570/makefile.inc.new
===================================================================
--- loader/a570/makefile.inc.new	(Revision 0)
+++ loader/a570/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/g7/resetcode/makefile.inc.new
===================================================================
--- loader/g7/resetcode/makefile.inc.new	(Revision 0)
+++ loader/g7/resetcode/makefile.inc.new	(Revision 0)
@@ -0,0 +1,6 @@
+
+# warning: library order matters!
+
+include $(TOPDIR)/loader/makefile_resetcode.inc.new
+
+# vim: ft=make
Index: loader/g7/makefile.inc.new
===================================================================
--- loader/g7/makefile.inc.new	(Revision 0)
+++ loader/g7/makefile.inc.new	(Revision 0)
@@ -0,0 +1,4 @@
+
+include $(TOPDIR)/loader/makefile_generic.inc.new
+
+# vim: ft=make
Index: loader/makefile.inc.new
===================================================================
--- loader/makefile.inc.new	(Revision 0)
+++ loader/makefile.inc.new	(Revision 0)
@@ -0,0 +1,16 @@
+
+
+
+LOCAL_SUBDIRS:=$(PLATFORM)
+
+$(eval $(call gen-rule, loader-clean, $(foreach lsub,$(LOCAL_SUBDIRS),$(lsub)-loader-clean), ))
+
+$(eval $(call gen-rule, loader-distclean, $(foreach lsub,$(LOCAL_SUBDIRS),$(lsub)-loader-distclean), ))
+
+LOCAL_SUBDIRS:=$(call subdirize,$(LOCAL_SUBDIRS) )
+
+$(foreach subdir,$(LOCAL_SUBDIRS),$(eval include $(subdir)/makefile.inc.new) )
+
+# vim: ft=make
+
+
Index: lib/lang/makefile.inc.new
===================================================================
--- lib/lang/makefile.inc.new	(Revision 0)
+++ lib/lang/makefile.inc.new	(Revision 0)
@@ -0,0 +1,17 @@
+
+LOCAL_CFLAGS:=$(CTHUMB)
+
+OBJS := lang.o
+OBJS := $(call subdirize, $(OBJS) )
+
+$(eval $(call compile-targets,$(OBJS),$(LOCAL_CFLAGS)))
+
+$(eval $(call ar-targets, liblang.a, $(OBJS) ))
+
+$(eval $(call gen-rule, lang-lib-clean,, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/liblang.a))
+
+lang-lib-distclean: lang-lib-clean
+	rm -f $(OBJS:.o=.d)
+
+# vim: ft=make
+
Index: lib/lua/makefile.inc.new
===================================================================
--- lib/lua/makefile.inc.new	(Revision 0)
+++ lib/lua/makefile.inc.new	(Revision 0)
@@ -0,0 +1,46 @@
+
+
+LOCAL_CFLAGS := $(CTHUMB) -DSTDIO_COMPAT_FILE -DFS_USE_FUT
+
+LUA_OPTLIB_OBJS:=
+
+ifdef OPT_LUA_IOLIB
+LOCAL_CFLAGS+=-DOPT_LUA_IOLIB
+LUA_OPTLIB_OBJS+=liolib.o
+endif
+
+ifdef OPT_LUA_OSLIB
+LOCAL_CFLAGS+=-DOPT_LUA_OSLIB
+LUA_OPTLIB_OBJS+=loslib.o
+endif
+
+ifdef OPT_LUA_STRLIB
+LOCAL_CFLAGS+=-DOPT_LUA_STRLIB
+LUA_OPTLIB_OBJS+=lstrlib.o
+endif
+
+ASM_OBJS := setjmp.o
+
+C_OBJS := \
+       lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
+       lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
+       lundump.o lvm.o lzio.o \
+       \
+       lauxlib.o lbaselib.o ldblib.o ltablib.o lmathlib.o \
+	   $(LUA_OPTLIB_OBJS) loadlib.o linit.o
+
+OBJS := $(call subdirize,$(ASM_OBJS) $(C_OBJS) )
+C_OBJS := $(call subdirize,$(C_OBJS) )
+ASM_OBJS := $(call subdirize,$(ASM_OBJS) )
+
+$(eval $(call compile-targets,$(C_OBJS),$(LOCAL_CFLAGS)))
+$(eval $(call compile-asm-targets,$(ASM_OBJS),$(LOCAL_CFLAGS)))
+
+
+$(eval $(call ar-targets, liblua.a, $(OBJS)))
+
+$(eval $(call gen-rule, lua-lib-clean,, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/liblua.a ))
+
+$(eval $(call gen-rule, lua-lib-distclean, lua-lib-clean, rm -f $(OBJS:.o=.d)))
+
+# vim: filetype=make
Index: lib/font/makefile.inc.new
===================================================================
--- lib/font/makefile.inc.new	(Revision 0)
+++ lib/font/makefile.inc.new	(Revision 0)
@@ -0,0 +1,18 @@
+
+
+LOCAL_CFLAGS:=$(CTHUMB)
+
+OBJS := font_8x16.o rbf_font.o
+OBJS := $(call subdirize, $(OBJS) )
+
+$(eval $(call compile-targets,$(OBJS),$(LOCAL_CFLAGS)))
+
+$(eval $(call ar-targets, libfont.a, $(OBJS)))
+
+# XXX generate the .h deps automatically via -MMD !!
+font_8x16.o: font_8x16.c codepages.h font_8x16_uni.h
+
+$(eval $(call gen-rule,font-lib-clean,,rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/libfont.a))
+$(eval $(call gen-rule,font-lib-distclean,font-lib-clean,rm -rf $(OBJS:.o=.d)))
+
+# vim: ft=make
Index: lib/ubasic/makefile.inc.new
===================================================================
--- lib/ubasic/makefile.inc.new	(Revision 0)
+++ lib/ubasic/makefile.inc.new	(Revision 0)
@@ -0,0 +1,18 @@
+
+LOCAL_CFLAGS:=$(CTHUMB)
+
+OBJS := camera_functions.o tokenizer.o ubasic.o
+OBJS := $(call subdirize, $(OBJS) )
+
+$(eval $(call compile-targets,$(OBJS),$(LOCAL_CFLAGS)))
+
+$(eval $(call ar-targets, libubasic.a, $(OBJS),))
+
+check:
+	gcc -g -Wall -DTEST -DCAMERA_a610 -o ubasic_test$(EXE) *.c
+
+$(eval $(call gen-rule, ubasic-lib-clean,, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/libubasic.a $(subdir)/ubasic_test$(EXE) ))
+
+$(eval $(call gen-rule, ubasic-lib-distclean, ubasic-lib-clean, rm -f $(OBJS:.o=.d) ))
+
+# vim: ft=make
Index: lib/libc/Makefile
===================================================================
--- lib/libc/Makefile	(Revision 613)
+++ lib/libc/Makefile	(Arbeitskopie)
@@ -1,5 +1,7 @@
 topdir=../../
 
+primary: libc.a
+
 include $(topdir)makefile.inc
 
 CFLAGS+=$(CTHUMB)
Index: lib/libc/makefile.inc.new
===================================================================
--- lib/libc/makefile.inc.new	(Revision 0)
+++ lib/libc/makefile.inc.new	(Revision 0)
@@ -0,0 +1,18 @@
+
+LOCAL_CFLAGS:=$(CTHUMB)
+
+OBJS := issmth.o strncmp.o strtol.o strchr.o \
+    memcmp.o memset.o memmove.o memcpy.o strlen.o \
+    strcmp.o
+
+OBJS := $(call subdirize, $(OBJS) )
+
+$(eval $(call compile-targets,$(OBJS),$(LOCAL_CFLAGS)))
+
+$(eval $(call gen-rule, libc.a, $(OBJS),))
+
+$(eval $(call gen-rule, libc-lib-clean,, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/libc.a))
+
+$(eval $(call gen-rule, libc-lib-distclean, libc-lib-clean, rm -f $(OBJS:.o=.d)))
+
+# vim: ft=make
Index: lib/math/makefile.inc.new
===================================================================
--- lib/math/makefile.inc.new	(Revision 0)
+++ lib/math/makefile.inc.new	(Revision 0)
@@ -0,0 +1,18 @@
+
+LOCAL_CFLAGS:=$(CTHUMB)
+
+OBJS := d2d.o wrapper.o
+OBJS := $(call subdirize, $(OBJS) )
+
+$(eval $(call compile-targets,$(OBJS),$(LOCAL_CFLAGS)))
+
+$(eval $(call ar-targets, libmath.a, $(OBJS)))
+
+# XXX AUTOGEN!
+d2d.o: d2d.c fdlibm.h
+
+$(eval $(call gen-rule, math-lib-clean,, rm -f $(OBJS) $(subdir)/*.$(DEPSUFFIX) $(subdir)/libmath.a))
+
+$(eval $(call gen-rule, math-lib-distclean, math-lib-clean, rm -f $(OBJS:.o=.d) ))
+
+# vim: ft=make
Index: lib/makefile.inc.new
===================================================================
--- lib/makefile.inc.new	(Revision 0)
+++ lib/makefile.inc.new	(Revision 0)
@@ -0,0 +1,13 @@
+
+LOCAL_SUBDIRS:=font math ubasic lang lua libc
+
+$(eval $(call gen-rule, lib-clean, $(foreach lsub,$(LOCAL_SUBDIRS),$(lsub)-lib-clean),))
+
+$(eval $(call gen-rule, lib-distclean, $(foreach lsub,$(LOCAL_SUBDIRS),$(lsub)-lib-distclean),))
+
+LOCAL_SUBDIRS:=$(call subdirize,$(LOCAL_SUBDIRS) )
+
+$(foreach subdir,$(LOCAL_SUBDIRS),$(eval include $(subdir)/makefile.inc.new) )
+
+
+# vim: filetype=make
