Index: Makefile
===================================================================
RCS file: /cvs/Tekkotsu/Makefile,v
retrieving revision 1.72
retrieving revision 1.72.2.1
diff -r1.72 -r1.72.2.1
3,4c3,4
< ############### $Revision: 1.1 $ #################
< ########## $Date: 2009/02/08 05:34:40 $ ###########
---
> ############### $Revision: 1.1 $ #################
> ########## $Date: 2009/02/08 05:34:40 $ ###########
58c58,65
< 	$(shell if [ -d "$(ICE_ROOT)" ] ; then echo "-DHAVE_ICE -I$(ICE_ROOT)/include"; fi)
---
> 	$(shell if [ -d "$(ICE_ROOT)" ] ; then echo "-DHAVE_ICE -I$(ICE_ROOT)/include"; fi) \
> 	$(shell if [ -d "$(CWIID_ROOT)" ] ; then echo "-DCWIID_ICE -I$(CWIID_ROOT)/include"; fi)
>   #enable -fPIC if we are building shared libraries on x86_64/amd64
>   ifneq ($(filter __amd64__ __x86_64__,$(shell g++ $(CXXFLAGS) -dM -E - < /dev/null)),)
>     ifneq ($(suffix $(LIBTEKKOTSU)),.a)
>       PLATFORM_FLAGS:=$(PLATFORM_FLAGS) -fPIC
>     endif
>   endif
63,64d69
< else
<   unexport CXXFLAGS
65a71
> unexport CXXFLAGS
72,73c78
< 	-I$(TEKKOTSU_ROOT) -I$(TEKKOTSU_ROOT)/Motion/roboop \
< 	-I$(TEKKOTSU_ROOT)/Shared/newmat \
---
> 	-I$(TEKKOTSU_ROOT) -I$(TEKKOTSU_ROOT)/Shared/newmat \
89c94
< SRCS:=$(shell find $(SRC_DIRS) -name "*$(SRCSUFFIX)")
---
> SRCS:=$(shell find $(SRC_DIRS) -name "[^.]*$(SRCSUFFIX)")
94,95c99
< USERLIBS:= Motion/roboop \
<            Shared/newmat \
---
> USERLIBS:= Shared/newmat Motion/roboop
305c309
< 		rm -f "aperios/$$dir/$${dir}Stub."{h,cc} "aperios/$$dir/def.h" "aperios/$$dir/entry.h" ; \
---
> 		rm -f "aperios/$$dir/$${dir}Stub.h" "aperios/$$dir/$${dir}Stub.cc" "aperios/$$dir/def.h" "aperios/$$dir/entry.h" ; \
Index: Behaviors/Controls/HelpControl.cc
===================================================================
RCS file: /cvs/Tekkotsu/Behaviors/Controls/HelpControl.cc,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -r1.10 -r1.10.2.1
6c6
< 	char * fmt="  * ";
---
> 	const char * fmt="  * ";
52c52
< 		char * fmt;
---
> 		const char * fmt;
111c111
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
113c113
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: Behaviors/Controls/WalkCalibration.cc
===================================================================
RCS file: /cvs/Tekkotsu/Behaviors/Controls/WalkCalibration.cc,v
retrieving revision 1.14
retrieving revision 1.14.2.2
diff -r1.14 -r1.14.2.2
15c15
< char * WalkCalibration::datanames[WalkCalibration::NUM_SRC] = { "fs","fr","sr","br","bs","rr" };
---
> const char * WalkCalibration::datanames[WalkCalibration::NUM_SRC] = { "fs","fr","sr","br","bs","rr" };
683c683
< char * WalkCalibration::getIndexName(unsigned int t) {
---
> const char * WalkCalibration::getIndexName(unsigned int t) {
697c697
< char * WalkCalibration::getFirstMeasure(WalkCalibration::dataSource t) {
---
> const char * WalkCalibration::getFirstMeasure(WalkCalibration::dataSource t) {
721c721
< char * WalkCalibration::getSecondMeasure(WalkCalibration::dataSource t) {
---
> const char * WalkCalibration::getSecondMeasure(WalkCalibration::dataSource t) {
902c902
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
904c904
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: Behaviors/Controls/WalkCalibration.h
===================================================================
RCS file: /cvs/Tekkotsu/Behaviors/Controls/WalkCalibration.h,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -r1.8 -r1.8.2.1
82,84c82,84
< 	char * getIndexName(unsigned int t); //!< returns name for measurement type
< 	char * getFirstMeasure(dataSource t); //!< returns name for first measurement type
< 	char * getSecondMeasure(dataSource t); //!< returns name for second measurement type
---
> 	const char * getIndexName(unsigned int t); //!< returns name for measurement type
> 	const char * getFirstMeasure(dataSource t); //!< returns name for first measurement type
> 	const char * getSecondMeasure(dataSource t); //!< returns name for second measurement type
112c112
< 	static char * datanames[NUM_SRC]; //!< name for each sample type
---
> 	static const char * datanames[NUM_SRC]; //!< name for each sample type
127c127
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
129c129
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: DualCoding/LineData.cc
===================================================================
RCS file: /cvs/Tekkotsu/DualCoding/LineData.cc,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -r1.42 -r1.42.2.1
684c684
<     if(0.0 <= u_a <=1.0)
---
>     if(0.0<=u_a && u_a<=1.0)
690c690
<     if(0.0 <= u_b <=1.0)
---
>     if(0.0<=u_b && u_b<=1.0)
Index: DualCoding/PFShapeSLAM.cc
===================================================================
RCS file: /cvs/Tekkotsu/DualCoding/PFShapeSLAM.cc,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -r1.1 -r1.1.4.1
31c31
< 	float const randval = float(rand()) / (RAND_MAX*6);
---
> 	float const randval = float(rand()) / (float(RAND_MAX)*6);
Index: DualCoding/PolygonData.h
===================================================================
RCS file: /cvs/Tekkotsu/DualCoding/PolygonData.h,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -r1.18 -r1.18.4.1
12a13,17
> namespace NEWMAT {
> class ColumnVector;
> class Matrix;
> }
> 
16,17d20
< class NEWMAT::ColumnVector;
< class NEWMAT::Matrix;
Index: DualCoding/visops.h
===================================================================
RCS file: /cvs/Tekkotsu/DualCoding/visops.h,v
retrieving revision 1.41
retrieving revision 1.41.2.1
diff -r1.41 -r1.41.2.1
11c11,13
< class DualCoding::SketchIndices;
---
> namespace DualCoding {
>   class SketchIndices;
> }
Index: Motion/roboop/Makefile
===================================================================
RCS file: /cvs/Tekkotsu/Motion/roboop/Attic/Makefile,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -r1.22 -r1.22.2.1
70a71,76
> 
>   #enable -fPIC if we are building shared libraries on x86_64/amd64
>   ifneq ($(filter __amd64__ __x86_64__,$(shell g++ $(ENV_CXXFLAGS) -dM -E - < /dev/null)),)
>     CXXFLAGS:=$(CXXFLAGS) -fPIC
>   endif
> 
Index: Shared/LoadSave.h
===================================================================
RCS file: /cvs/Tekkotsu/Shared/LoadSave.h,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -r1.24 -r1.24.2.1
5c5,6
< #include <string>
---
> #include <cstring>
> #include <malloc.h>
803c804
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
805c806
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: Shared/LocalizationParticle.h
===================================================================
RCS file: /cvs/Tekkotsu/Shared/LocalizationParticle.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -r1.5 -r1.5.2.1
13c13
< class LocalizationParticle : public ParticleBase {
---
> class LocalizationParticle : public ParticleBase<LocalizationParticle> {
23c23
< 	LocalizationParticle() : ParticleBase(), x(0), y(0), theta(0) {}
---
> 	LocalizationParticle() : ParticleBase<LocalizationParticle>(), x(0), y(0), theta(0) {}
26c26
< 	LocalizationParticle(float xp, float yp, AngTwoPi tp) : ParticleBase(), x(xp), y(yp), theta(tp) {}
---
> 	LocalizationParticle(float xp, float yp, AngTwoPi tp) : ParticleBase<LocalizationParticle>(), x(xp), y(yp), theta(tp) {}
29c29
< 	template<typename ParticleT> float sumSqErr(const ParticleT& lp) const {
---
> 	float sumSqErr(const LocalizationParticle& lp) const {
100c100
< * $Revision: 1.1 $
---
> * $Revision: 1.1 $
102c102
< * $Date: 2009/02/08 05:34:40 $
---
> * $Date: 2009/02/08 05:34:40 $
Index: Shared/ParticleFilter.h
===================================================================
RCS file: /cvs/Tekkotsu/Shared/ParticleFilter.h,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -r1.14 -r1.14.2.1
39c39
< class ParticleBase {
---
> template<class ParticleT> class ParticleBase {
50,55c50,51
< 	 *  ParticleFilter::confidence() depends on how this function is implemented.
< 	 *
< 	 *  A template is used so you can assume the argument type is that
< 	 *  of your own particle type. (it doesn't really make sense to compare
< 	 *  the distance between particles of different types.) */
< 	template<typename ParticleT> float sumSqErr(const ParticleT& p) const=0;
---
> 	 *  ParticleFilter::confidence() depends on how this function is implemented. */
> 	virtual float sumSqErr(const ParticleT& p) const=0;
620c616
< * $Revision: 1.1 $
---
> * $Revision: 1.1 $
622c618
< * $Date: 2009/02/08 05:34:40 $
---
> * $Date: 2009/02/08 05:34:40 $
Index: Shared/StackTrace.cc
===================================================================
RCS file: /cvs/Tekkotsu/Shared/StackTrace.cc,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -r1.14 -r1.14.2.1
164c164
< #ifdef __pic__
---
> #ifdef __PIC__
225c225
< #ifdef __pic__
---
> #ifdef __PIC__
233c233
< #ifdef __pic__
---
> #ifdef __PIC__
263c263
< #endif /* __pic__ */
---
> #endif /* __PIC__ */
267c267
< #ifdef __pic__
---
> #ifdef __PIC__
292c292
< #ifdef __pic__
---
> #ifdef __PIC__
295c295
< #endif /* __pic__ */
---
> #endif /* __PIC__ */
300c300
< #if defined(__i386__) || defined(__x86_64__) || defined(__amd64__)
---
> #if defined(__i386__)
307a308,316
> // basically the same as i386, but movq instead of movl, and rbp instead of ebp
> #if defined(__x86_64__) || defined(__amd64__)
> 	__asm __volatile__ ("movq %%rbp,%0" : "=m"(csp) ); // get the caller's stack pointer
> 	csp++; //go back one to really be a stack pointer
> 	//__asm __volatile__ ("movq (%%rsp),%0" : "=r"(cra) ); // get the caller's address
> 	cra=*((machineInstruction**)csp);
> 	csp=((void***)csp)[-1]+1;
> #endif /* amd64/x86_64 */
> 
309c318
< #ifdef __pic__
---
> #if defined(__PIC__) && (defined(__MIPSEL__) || defined(__MIPS__))
314c323
< #endif /* __pic__ */
---
> #endif /* __PIC__ */
407a417,419
> #  ifdef __APPLE__
> 	const char* consolation=", try 'atos' to make human-readable backtrace";
> #  else
408a421
> #  endif
476a490,492
> #    ifdef __APPLE__
> 	const char* consolation=", try 'atos' to make human-readable backtrace";
> #    else
477a494
> #    endif
707c724
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
709c726
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: Shared/StackTrace.h
===================================================================
RCS file: /cvs/Tekkotsu/Shared/StackTrace.h,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -r1.6 -r1.6.2.1
30c30
< #ifdef __pic__
---
> #if defined(__PIC__) && (defined(__MIPSEL__) || defined(__MIPS__))
34c34
< 	 *  When executing position independent code (pic), this is the address relative
---
> 	 *  When executing position independent code (PIC), this is the address relative
39c39
< 	//! global offset used in position independent code (pic)
---
> 	//! global offset used in position independent code (PIC)
48c48
< #endif /* __pic__ */
---
> #endif /* __PIC__ */
117c117
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
119c119
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: Shared/plistPrimitives.h
===================================================================
RCS file: /cvs/Tekkotsu/Shared/plistPrimitives.h,v
retrieving revision 1.35
retrieving revision 1.35.2.1
diff -r1.35 -r1.35.2.1
6a7,9
> #include <limits>
> #include <typeinfo>
> #include <algorithm>
626c629
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
628c631
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: Shared/newmat/Makefile
===================================================================
RCS file: /cvs/Tekkotsu/Shared/newmat/Makefile,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -r1.22 -r1.22.2.1
65a66,71
> 
>   #enable -fPIC if we are building shared libraries on x86_64/amd64
>   ifneq ($(filter __amd64__ __x86_64__,$(shell g++ $(ENV_CXXFLAGS) -dM -E - < /dev/null)),)
>     CXXFLAGS:=$(CXXFLAGS) -fPIC
>   endif
> 
Index: Vision/JPEGGenerator.cc
===================================================================
RCS file: /cvs/Tekkotsu/Vision/JPEGGenerator.cc,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -r1.22 -r1.22.2.1
88c88
< 	char * type;
---
> 	const char * type;
142c142
< 	char * type;
---
> 	const char * type;
240c240
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
242c242
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: Vision/PNGGenerator.cc
===================================================================
RCS file: /cvs/Tekkotsu/Vision/PNGGenerator.cc,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -r1.8 -r1.8.2.1
76c76
< 	char * type;
---
> 	const char * type;
130c130
< 	char * type;
---
> 	const char * type;
225c225
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
227c227
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: local/DeviceDrivers/ImageStreamDriver.h
===================================================================
RCS file: /cvs/Tekkotsu/local/DeviceDrivers/ImageStreamDriver.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -r1.5 -r1.5.2.1
60c60
< 	void copyImage(char * buf, unsigned int width, unsigned int height, unsigned int channels, const char * chan, unsigned int lwidth, unsigned int lheight, unsigned int chan);
---
> 	void copyImage(char * buf, unsigned int width, unsigned int height, unsigned int channels, const char * chan, unsigned int lwidth, unsigned int lheight, unsigned int c);
81c81
<  * $Revision: 1.1 $
---
>  * $Revision: 1.1 $
83c83
<  * $Date: 2009/02/08 05:34:40 $
---
>  * $Date: 2009/02/08 05:34:40 $
Index: local/tekkotsu/sim.cc
===================================================================
RCS file: /cvs/Tekkotsu/local/tekkotsu/sim.cc,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -r1.7 -r1.7.2.1
436c436
< 	char * name=NULL;
---
> 	const char * name=NULL;
450c450
< 		snprintf(name,30,"signal %d",sig);
---
> 		snprintf(defBuf,30,"signal %d",sig);
Index: project/Environment.conf
===================================================================
RCS file: /cvs/Tekkotsu/project/Environment.conf,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -r1.33 -r1.33.2.1
3,4c3,4
< ############### $Revision: 1.1 $ #################
< ########## $Date: 2009/02/08 05:34:40 $ ###########
---
> ############### $Revision: 1.1 $ #################
> ########## $Date: 2009/02/08 05:34:40 $ ###########
151,152c151,152
< TEST_CXX_MAJOR:=$(shell $(CXX) --version | sed -n 's/^.* (GCC) \([0-9]*\)\.\([0-9]*\).*/\1/p')
< TEST_CXX_MINOR:=$(shell $(CXX) --version | sed -n 's/^.* (GCC) \([0-9]*\)\.\([0-9]*\).*/\2/p')
---
> TEST_CXX_MAJOR:=$(shell $(CXX) -v 2>&1 | sed -n 's/^.* version \([0-9]*\)\.\([0-9]*\).*/\1/p')
> TEST_CXX_MINOR:=$(shell $(CXX) -v 2>&1 | sed -n 's/^.* version \([0-9]*\)\.\([0-9]*\).*/\2/p')
157c157
< TEKKOTSU_PCH ?= $(shell if [ $(TEST_CXX_MAJOR) -ge 4 -o $(TEST_CXX_MAJOR) -ge 3 -a -z "$(TEST_CXX_CYGMING)" -a \( $(TEST_CXX_MINOR) -ge 4 -o -n "$(TEST_CXX_APPLE)" \) ] ; then echo "common.h"; fi)
---
> TEKKOTSU_PCH ?= $(shell if [ "$(TEST_CXX_MAJOR)" -ge 4 -o "$(TEST_CXX_MAJOR)" -ge 3 -a -z "$(TEST_CXX_CYGMING)" -a \( "$(TEST_CXX_MINOR)" -ge 4 -o -n "$(TEST_CXX_APPLE)" \) ] ; then echo "common.h"; fi)
Index: project/Makefile
===================================================================
RCS file: /cvs/Tekkotsu/project/Makefile,v
retrieving revision 1.155
retrieving revision 1.155.2.1
diff -r1.155 -r1.155.2.1
3,4c3,4
< ############### $Revision: 1.1 $ #################
< ########## $Date: 2009/02/08 05:34:40 $ ###########
---
> ############### $Revision: 1.1 $ #################
> ########## $Date: 2009/02/08 05:34:40 $ ###########
64a65,70
>   #enable -fPIC if we are building shared libraries on x86_64/amd64
>   ifneq ($(filter __amd64__ __x86_64__,$(shell g++ $(CXXFLAGS) -dM -E - < /dev/null)),)
>     ifneq ($(suffix $(LIBTEKKOTSU)),.a)
>       PLATFORM_FLAGS:=$(PLATFORM_FLAGS) -fPIC
>     endif
>   endif
73,74d78
< else
<   unexport CXXFLAGS
75a80
> unexport CXXFLAGS
82,83c87
< 	-I. -I$(TEKKOTSU_ROOT) -I$(TEKKOTSU_ROOT)/Motion/roboop \
< 	-I$(TEKKOTSU_ROOT)/Shared/newmat \
---
> 	-I. -I$(TEKKOTSU_ROOT) -I$(TEKKOTSU_ROOT)/Shared/newmat -I$(PROJ_BD) \
101c105,106
< SRCS:=$(patsubst ./%,%,$(shell find . -name "*$(SRCSUFFIX)" -or -name "$(PROJECT_BUILDDIR)" \! -prune -or -name "templates" \! -prune -or -name "aperios" \! -prune -or -name "local" \! -prune))
---
> SRCS:=$(patsubst ./%,%,$(shell find . -name "[^.]*$(SRCSUFFIX)" -or -path "*$(PROJECT_BUILDDIR)" \! -prune -or -name "templates" \! -prune -or -name "aperios" \! -prune -or -name "local" \! -prune))
> FSMS:=$(patsubst ./%,%,$(shell find . -name "[^.]*\.fsm" -or -path "*$(PROJECT_BUILDDIR)" \! -prune -or -name "templates" \! -prune -or -name "aperios" \! -prune -or -name "local" \! -prune))
105d109
<            $(TK_LIB_BD)/Motion/roboop/libroboop$(suffix $(LIBTEKKOTSU)) \
107c111
< 
---
>            $(TK_LIB_BD)/Motion/roboop/libroboop$(suffix $(LIBTEKKOTSU)) \
173c177
< SRCS:=$(shell ls -t $(SRCS))
---
> SRCS:=$(shell ls -t $(SRCS) $(filter %$(SRCSUFFIX).fsm,$(FSMS)))
176a181
> OBJS:=$(OBJS:$(SRCSUFFIX).fsm=-fsm.o)
181a187,189
> DEPENDS:=$(DEPENDS:$(SRCSUFFIX).fsm=-fsm.d)
> 
> SRCS:=$(patsubst %$(SRCSUFFIX).fsm,$(PROJ_BD)/%-fsm$(SRCSUFFIX),$(SRCS))
197c205,219
< %.d :
---
> $(patsubst %.fsm,$(PROJ_BD)/%,$(filter %.h.fsm,$(FSMS))) : $(PROJ_BD)/%.h : %.h.fsm
> 	@mkdir -p $(dir $@)
> 	@echo "Generating state machine: tools/stateparser $^"
> 	@$(TEKKOTSU_ROOT)/tools/stateparser "$^" "$@"
> 
> $(patsubst %$(SRCSUFFIX).fsm,$(PROJ_BD)/%-fsm$(SRCSUFFIX),$(filter %$(SRCSUFFIX).fsm,$(FSMS))) : $(PROJ_BD)/%-fsm$(SRCSUFFIX) : %$(SRCSUFFIX).fsm
> 	@mkdir -p $(dir $@)
> 	@echo "Generating state machine: tools/stateparser $^"
> 	@$(TEKKOTSU_ROOT)/tools/stateparser "$^" "$@"
> 
> $(filter %-fsm.d,$(DEPENDS)) : $(PROJ_BD)/%.d : $(PROJ_BD)/%$(SRCSUFFIX)
> 
> $(filter-out %-fsm.d,$(DEPENDS)) : $(PROJ_BD)/%.d : %$(SRCSUFFIX) | $(patsubst %.fsm,$(PROJ_BD)/%,$(filter %.h.fsm,$(FSMS)))
> 
> $(PROJ_BD)/%.d : 
199,203c221
< 	@src=$(patsubst %.d,%.cc,$(patsubst $(PROJ_BD)/%,%,$@)); \
< 	if [ ! -f "$$src" ] ; then \
< 		echo "Generating source file '$$src'"; \
< 		$(MAKE) "$$src" ; \
< 	fi; \
---
> 	@src=$(if $(filter %-fsm.d,$@),$(@:.d=$(SRCSUFFIX)),$*$(SRCSUFFIX)); \
205c223
< 	$(CXX) $(CXXFLAGS) -MP -MG -MT "$@" -MT "$(@:.d=.o)" -MM "$$src" > $@
---
> 	$(CXX) $(CXXFLAGS) -MP -MG -MT "$@" -MT "$(@:.d=.o)" -MM "$$src" > "$@" || (rm -f "$@"; exit 1)
226c244
< 	echo "I don't know anything about `$*'";
---
> 	echo "I don't know anything about ‘$*’";
233c251
< %.o: $(if $(TEKKOTSU_PCH),$(TK_BD)/$(TEKKOTSU_PCH).gch)
---
> $(PROJ_BD)/%.o: $(if $(TEKKOTSU_PCH),$(TK_BD)/$(TEKKOTSU_PCH).gch)
235c253
< 	@src=$(patsubst %.o,%$(SRCSUFFIX),$(if $(findstring $(TK_BD),$@),$(patsubst $(TK_BD)%,$(TEKKOTSU_ROOT)%,$@),$(patsubst $(PROJ_BD)/%,%,$@))); \
---
> 	@src=$(if $(filter %-fsm.o,$@),$(@:.o=$(SRCSUFFIX)),$*$(SRCSUFFIX)); \
238c256
< 		echo "$(CXX) $(CXXFLAGS) -o $@ -c $$src > $*.log 2>&1; retval=\$$?; cat $*.log | $(FILTERSYSWARN) | $(COLORFILT); test \$$retval -eq 0;" >> $(PROJ_BD)/joblist.txt ; \
---
> 		echo "$(CXX) $(CXXFLAGS) -o $@ -c $$src > $(PROJ_BD)/$*.log 2>&1; retval=\$$?; cat $(PROJ_BD)/$*.log | $(FILTERSYSWARN) | $(COLORFILT); test \$$retval -eq 0;" >> $(PROJ_BD)/joblist.txt ; \
243c261
< 		$(CXX) $(CXXFLAGS) $(INCLUDE_PCH) -o $@ -c $$src > $*.log 2>&1; \
---
> 		$(CXX) $(CXXFLAGS) $(INCLUDE_PCH) -o $@ -c $$src > $(PROJ_BD)/$*.log 2>&1; \
245c263
< 		cat $*.log | $(FILTERSYSWARN) | $(COLORFILT) | $(TEKKOTSU_LOGVIEW); \
---
> 		cat $(PROJ_BD)/$*.log | $(FILTERSYSWARN) | $(COLORFILT) | $(TEKKOTSU_LOGVIEW); \
269c287
< 		rm -f "aperios/$$dir/$${dir}Stub."{h,cc} "aperios/$$dir/def.h" "aperios/$$dir/entry.h" ; \
---
> 		rm -f "aperios/$$dir/$${dir}Stub.h" "aperios/$$dir/$${dir}Stub.cc" "aperios/$$dir/def.h" "aperios/$$dir/entry.h" ; \
Index: project/ms/config/sim_ovrd.xml
===================================================================
RCS file: /cvs/Tekkotsu/project/ms/config/sim_ovrd.xml,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -r1.2 -r1.2.4.1
8,9c8,9
< #####################   $Revision: 1.1 $   ######################
< ################   $Date: 2009/02/08 05:34:40 $   ################
---
> #####################   $Revision: 1.1 $   ######################
> ################   $Date: 2009/02/08 05:34:40 $   ################
Index: project/ms/config/tekkotsu.xml
===================================================================
RCS file: /cvs/Tekkotsu/project/ms/config/tekkotsu.xml,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -r1.11 -r1.11.2.1
8,9c8,9
< #####################   $Revision: 1.1 $   ######################
< ################   $Date: 2009/02/08 05:34:40 $   ################
---
> #####################   $Revision: 1.1 $   ######################
> ################   $Date: 2009/02/08 05:34:40 $   ################
Index: tools/binstrswap/binstrswap.cc
===================================================================
RCS file: /cvs/Tekkotsu/tools/binstrswap/binstrswap.cc,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -r1.3 -r1.3.4.1
11c11
< int main(unsigned int argc, const char* argv[]) {
---
> int main(int argc, const char* argv[]) {
Index: tools/filtersyswarn/filtersyswarn.cc
===================================================================
RCS file: /cvs/Tekkotsu/tools/filtersyswarn/filtersyswarn.cc,v
retrieving revision 1.15
retrieving revision 1.15.2.2
diff -r1.15 -r1.15.2.2
5a6
> #include <cstdlib>
37c38
< 	regcomp(&ignorebegin,(OPENR+".*: warning: |"+pliststr_no_vdtor+"|"+dualcoding_no_vdtor+"|.*local/terk/(TeRKPeerCommon|peer/MRPLPeer|SerialIO).h:.*: warning:").c_str(),REG_EXTENDED|REG_NOSUB);
---
> 	regcomp(&ignorebegin,(OPENR+".*: warning: |"+pliststr_no_vdtor+"|"+dualcoding_no_vdtor+"|.*: Warning: Macro instruction expanded|.*: warning: suggest |.*local/terk/(TeRKPeerCommon|peer/MRPLPeer|SerialIO).h:.*: warning:").c_str(),REG_EXTENDED|REG_NOSUB);
Index: tools/mipaltools/src/EmonLog.cc
===================================================================
RCS file: /cvs/Tekkotsu/tools/mipaltools/src/EmonLog.cc,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -r1.1 -r1.1.4.1
16a17
> #include <cstdlib>
Index: tools/mipaltools/src/StackAnalyser.cc
===================================================================
RCS file: /cvs/Tekkotsu/tools/mipaltools/src/StackAnalyser.cc,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -r1.1 -r1.1.4.1
15a16
> #include <cstring>
Index: tools/mipaltools/src/StackDump.cc
===================================================================
RCS file: /cvs/Tekkotsu/tools/mipaltools/src/StackDump.cc,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -r1.2 -r1.2.4.1
18a19
> #include <cstdlib>
Index: tools/mipaltools/src/main.cc
===================================================================
RCS file: /cvs/Tekkotsu/tools/mipaltools/src/main.cc,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -r1.1 -r1.1.4.1
19a20,21
> #include <cstring>
> #include <cstdlib>
