# Makefile for tsukuba_challenge/programs
# Satofumi KAMIMURA
# $Id$

# Compile options
CC = g++
CXXFLAGS = -g -O0 -Wall -Werror ${INCLUDES} `sdl-config --cflags`
INCLUDES = -I../../libs/joystick -I../../libs/common -I../../libs/pathCtrl -I../../libs/runCtrl -I../../libs/coordinateCtrl -I../../libs/gl_gui -I../../libs/gui -I../../libs/connection -Iscip_samples -I../../libs/rangesCtrl -I../../libs/gps
LDFLAGS =
LDLIBS = -lwiimote `sdl-config --libs` -lboost_regex

# Target
TARGET = \
	binaryViewSample \
	getGpsSample \
	adjustSteerOffset \
	clockSample \
	steerCtrlSample \
	wiiRadicon \
	pathFollow \
#	followLinesSample \

all : ${TARGET}

rm :
	${RM} log* up* down* 0* *log b0* l0* Todo.dat Fodo.dat TAG* steer_offset.txt

clean : rm
	${RM} *.o ${TARGET}

depend :
	makedepend -Y -- ${INCLUDES} -- ${wildcard *.h *.cpp}

.PHONY : all clean
######################################################################
REQUIRE_LIBS = ../../libs/pathCtrl/pathCtrl.a ../../libs/rangesCtrl/rangesCtrl.a ../../libs/coordinateCtrl/coordinateCtrl.a ../../libs/joystick/joystick.a ../../libs/gui/gui.a ../../libs/gps/gps.a ../../libs/connection/connection.a ../../libs/common/common.a

${REQUIRE_LIBS} :
	cd ${@D}/ && ${MAKE} ${@F}

scip2.o : scip_samples/scip2.c
	${CXX} ${CXXFLAGS} -c $<

scipUtil.o : scip_samples/scipUtil.c
	${CXX} ${CXXFLAGS} -c $<

scipBase.o : scip_samples/scipBase.c
	${CXX} ${CXXFLAGS} -c $<

getGpsSample : GpsHandler.o ${REQUIRE_LIBS}
binaryViewSample : SfBinaryHandler.o
wiiRadicon pathFollow adjustSteerOffset : RobotCtrl.o SimulationCtrl.o SteerCtrl.o SeniorCarCtrl.o HoistTask.o scip2.o scipUtil.o scipBase.o FollowLineCalc.o localize3.o aroundmap.o SH2.o GpsHandler.o URG_Ctrl.o connectcheck.o GpsHandler.o SteerOffsetHandler.o  ${REQUIRE_LIBS}
steerCtrlSample : HoistTask.o SteerCtrl.o scip2.o localize3.o aroundmap.o scipUtil.o SH2.o scipBase.o GpsHandler.o URG_Ctrl.o connectcheck.o ${REQUIRE_LIBS}
followLinesSample : SimulationCtrl.o FollowLineCalc.o connectcheck.o ${REQUIRE_LIBS}

# DO NOT DELETE

FollowLineCalc.o: ../../libs/common/GridTypes.h
RobotCtrl.o: RobotCtrlInterface.h ../../libs/common/GridTypes.h
RobotCtrl.o: ../../libs/runCtrl/FollowLineInterface.h
RobotCtrl.o: ../../libs/runCtrl/GetPositionInterface.h
RobotCtrlInterface.o: ../../libs/common/GridTypes.h
RobotCtrlInterface.o: ../../libs/runCtrl/FollowLineInterface.h
RobotCtrlInterface.o: ../../libs/runCtrl/GetPositionInterface.h
SimulationCtrl.o: RobotCtrlInterface.h ../../libs/common/GridTypes.h
SimulationCtrl.o: ../../libs/runCtrl/FollowLineInterface.h
SimulationCtrl.o: ../../libs/runCtrl/GetPositionInterface.h
TwinGpsCoordinate.o: ../../libs/common/GridTypes.h
FollowLineCalc.o: FollowLineCalc.h ../../libs/common/GridTypes.h
FollowLineCalc.o: RobotCtrlInterface.h
FollowLineCalc.o: ../../libs/runCtrl/FollowLineInterface.h
FollowLineCalc.o: ../../libs/runCtrl/GetPositionInterface.h
FollowLineCalc.o: ../../libs/common/MathUtils.h ../../libs/common/DetectOS.h
GpsHandler.o: GpsHandler.h ../../libs/connection/SerialCtrl.h
GpsHandler.o: ../../libs/connection/ConnectionInterface.h
GpsHandler.o: ../../libs/gps/CommonGpsCtrl.h ../../libs/gps/GpsInterface.h
GpsHandler.o: ../../libs/gps/NmeaState.h ../../libs/common/Delay.h
HoistTask.o: HoistTask.h SH2.h URG_Ctrl.h
RobotCtrl.o: RobotCtrl.h RobotCtrlInterface.h ../../libs/common/GridTypes.h
RobotCtrl.o: ../../libs/runCtrl/FollowLineInterface.h
RobotCtrl.o: ../../libs/runCtrl/GetPositionInterface.h SteerCtrl.h
RobotCtrl.o: SeniorCarCtrl.h ../../libs/common/MathUtils.h
RobotCtrl.o: ../../libs/common/DetectOS.h FollowLineCalc.h
RobotCtrl.o: ../../libs/common/ThreadCreator.h ../../libs/common/GetTicks.h
RobotCtrl.o: ../../libs/common/Delay.h
SH2.o: SH2.h
SeniorCarCtrl.o: SeniorCarCtrl.h ../../libs/common/ThreadCreator.h
SeniorCarCtrl.o: HoistTask.h SH2.h
SfBinaryHandler.o: SfBinaryHandler.h
SimulationCtrl.o: SimulationCtrl.h RobotCtrlInterface.h
SimulationCtrl.o: ../../libs/common/GridTypes.h
SimulationCtrl.o: ../../libs/runCtrl/FollowLineInterface.h
SimulationCtrl.o: ../../libs/runCtrl/GetPositionInterface.h
SimulationCtrl.o: ../../libs/coordinateCtrl/CoordinateCtrl.h
SimulationCtrl.o: ../../libs/gui/SdlVideo.h ../../libs/gui/InputHandler.h
SimulationCtrl.o: ../../libs/common/MathUtils.h ../../libs/common/DetectOS.h
SimulationCtrl.o: ../../libs/common/ThreadCreator.h FollowLineCalc.h
SimulationCtrl.o: ../../libs/common/Delay.h
SteerCtrl.o: SteerCtrl.h ../../libs/common/GridTypes.h
SteerCtrl.o: ../../libs/connection/SerialCtrl.h
SteerCtrl.o: ../../libs/connection/ConnectionInterface.h HoistTask.h
SteerOffsetHandler.o: SteerOffsetHandler.h
TwinGpsCoordinate.o: TwinGpsCoordinate.h ../../libs/common/GridTypes.h
URG_Ctrl.o: scip_samples/scipBase.h scip_samples/scip1.h scip_samples/scip2.h
URG_Ctrl.o: scip_samples/scipUtil.h URG_Ctrl.h HoistTask.h localize3.h
URG_Ctrl.o: aroundmap.h GpsHandler.h
adjustSteerOffset.o: SteerOffsetHandler.h ../../libs/joystick/WiiJoystick.h
adjustSteerOffset.o: ../../libs/joystick/JoystickInterface.h
adjustSteerOffset.o: ../../libs/common/GridTypes.h SimulationCtrl.h
adjustSteerOffset.o: RobotCtrlInterface.h
adjustSteerOffset.o: ../../libs/runCtrl/FollowLineInterface.h
adjustSteerOffset.o: ../../libs/runCtrl/GetPositionInterface.h RobotCtrl.h
adjustSteerOffset.o: ../../libs/common/Delay.h
aroundmap.o: aroundmap.h
binaryViewSample.o: SfBinaryHandler.h
connectcheck.o: ../../libs/rangesCtrl/UrgCtrl.h
connectcheck.o: ../../libs/rangesCtrl/RangeSensorInterface.h
connectcheck.o: ../../libs/connection/ConnectionDeviceSearch.h
connectcheck.o: ../../libs/rangesCtrl/UrgIdHandler.h
connectcheck.o: ../../libs/connection/ProductIdHandler.h
followLinesSample.o: SimulationCtrl.h RobotCtrlInterface.h
followLinesSample.o: ../../libs/common/GridTypes.h
followLinesSample.o: ../../libs/runCtrl/FollowLineInterface.h
followLinesSample.o: ../../libs/runCtrl/GetPositionInterface.h
followLinesSample.o: ../../libs/pathCtrl/FollowLines.h
followLinesSample.o: ../../libs/common/Delay.h
getGpsSample.o: GpsHandler.h
localize3.o: aroundmap.h localize3.h
pathFollow.o: RobotCtrl.h RobotCtrlInterface.h ../../libs/common/GridTypes.h
pathFollow.o: ../../libs/runCtrl/FollowLineInterface.h
pathFollow.o: ../../libs/runCtrl/GetPositionInterface.h
pathFollow.o: ../../libs/pathCtrl/FollowLines.h SteerOffsetHandler.h
pathFollow.o: ../../libs/coordinateCtrl/CoordinateCtrl.h
pathFollow.o: ../../libs/joystick/WiiJoystick.h
pathFollow.o: ../../libs/joystick/JoystickInterface.h
pathFollow.o: ../../libs/common/Delay.h HoistTask.h
steerCtrlSample.o: SteerCtrl.h ../../libs/common/GridTypes.h
wiiRadicon.o: ../../libs/joystick/WiiJoystick.h
wiiRadicon.o: ../../libs/joystick/JoystickInterface.h
wiiRadicon.o: ../../libs/common/GridTypes.h SimulationCtrl.h
wiiRadicon.o: RobotCtrlInterface.h ../../libs/runCtrl/FollowLineInterface.h
wiiRadicon.o: ../../libs/runCtrl/GetPositionInterface.h RobotCtrl.h
wiiRadicon.o: SteerOffsetHandler.h ../../libs/common/Delay.h HoistTask.h
