# Makefile for running/differential_drive
# Satofumi KAMIMURA
# $Id: Makefile 1361 2009-10-03 06:21:34Z satofumi $

# Compile options
CC = sh-elf-gcc
CFLAGS = -g -O0 -Wall -W -Werror $(INCLUDES)
INCLUDES =
LDFLAGS =
LDLIBS =
RUBY = ruby


# Target
TARGET = \
	differential_drive \
	dumpStruct \

all : $(TARGET)

clean :
	$(RM) *.o $(TARGET)

depend :
	makedepend -Y -- $(INCLUDES) -- $(wildcard *.h *.c)

.PHONY : all clean depend
######################################################################
OBJS = system_handler.o pwm_control.o motor_control.o encoder_handler.o wheel_control.o body_control.o position_calculate.o path_manage.o follow_control.o packet_handler.o serial_connection.o robot_control.o direct_handler.o isincos.o isqrt.o iatan2.o

differential_drive : $(OBJS)

isincos.c : create_isincos.rb
	${RUBY} $< > $@ || ${RM} $@
isincos.h : create_isincos.rb
	${RUBY} $< header > $@ || ${RM} $@
isincos.o : isincos.h

iatan2.c : create_iatan2.rb
	${RUBY} $< > $@ || ${RM} $@
iatan2.o : iatan2.h

# DO NOT DELETE

body_control.o: body_t.h math_utils.h
body_t.o: math_utils.h
direct_handler.o: direct_t.h follow_t.h
direct_t.o: follow_t.h
encoder_handler.o: encoder_t.h
follow_control.o: follow_t.h position_t.h body_t.h math_utils.h wheel_t.h
follow_control.o: encoder_t.h path_t.h
motor_control.o: motor_t.h encoder_t.h
packet_handler.o: robot_t.h system_t.h motor_t.h position_t.h body_t.h
packet_handler.o: math_utils.h wheel_t.h encoder_t.h path_t.h direct_t.h
packet_handler.o: follow_t.h
path_manage.o: path_t.h follow_t.h position_t.h body_t.h math_utils.h
path_manage.o: wheel_t.h encoder_t.h
position_calculate.o: position_t.h body_t.h math_utils.h wheel_t.h
position_calculate.o: encoder_t.h
position_t.o: body_t.h math_utils.h wheel_t.h encoder_t.h
robot_control.o: robot_t.h system_t.h motor_t.h position_t.h body_t.h
robot_control.o: math_utils.h wheel_t.h encoder_t.h path_t.h direct_t.h
robot_control.o: follow_t.h
robot_t.o: system_t.h motor_t.h position_t.h body_t.h math_utils.h wheel_t.h
robot_t.o: encoder_t.h path_t.h direct_t.h follow_t.h
system_handler.o: system_t.h
wheel_control.o: wheel_t.h
beego_drive.o: robot_control.h robot_t.h system_t.h motor_t.h position_t.h
beego_drive.o: body_t.h math_utils.h wheel_t.h encoder_t.h path_t.h
beego_drive.o: direct_t.h follow_t.h packet_handler.h
body_control.o: body_control.h body_t.h math_utils.h robot_macro.h
direct_handler.o: direct_handler.h direct_t.h follow_t.h follow_control.h
direct_handler.o: position_t.h body_t.h math_utils.h wheel_t.h encoder_t.h
direct_handler.o: path_t.h
dumpStruct.o: robot_t.h system_t.h motor_t.h position_t.h body_t.h
dumpStruct.o: math_utils.h wheel_t.h encoder_t.h path_t.h direct_t.h
dumpStruct.o: follow_t.h
encoder_handler.o: encoder_handler.h encoder_t.h
follow_control.o: follow_control.h follow_t.h position_t.h body_t.h
follow_control.o: math_utils.h wheel_t.h encoder_t.h path_t.h
follow_control.o: position_calculate.h isqrt.h iatan2.h
iatan2.o: iatan2.h
isincos.o: isincos.h
isqrt.o: isqrt.h
motor_control.o: motor_control.h motor_t.h encoder_t.h encoder_handler.h
packet_handler.o: packet_handler.h robot_t.h system_t.h motor_t.h
packet_handler.o: position_t.h body_t.h math_utils.h wheel_t.h encoder_t.h
packet_handler.o: path_t.h direct_t.h follow_t.h serial_connection.h
path_manage.o: path_manage.h path_t.h follow_t.h position_t.h body_t.h
path_manage.o: math_utils.h wheel_t.h encoder_t.h position_calculate.h
path_manage.o: follow_control.h isincos.h
position_calculate.o: position_calculate.h position_t.h body_t.h math_utils.h
position_calculate.o: wheel_t.h encoder_t.h isincos.h
pwm_control.o: pwm_control.h
robot_control.o: robot_control.h robot_t.h system_t.h motor_t.h position_t.h
robot_control.o: body_t.h math_utils.h wheel_t.h encoder_t.h path_t.h
robot_control.o: direct_t.h follow_t.h robot_macro.h system_handler.h
robot_control.o: pwm_control.h encoder_handler.h motor_control.h
robot_control.o: wheel_control.h body_control.h position_calculate.h
robot_control.o: path_manage.h follow_control.h direct_handler.h
serial_connection.o: serial_connection.h
system_handler.o: system_handler.h system_t.h beego_drive.h
wheel_control.o: wheel_control.h wheel_t.h
