# Makefile for libs/controller
# Satofumi KAMIMURA
# $Id$

# Compile options
CC = ${CXX}
CXXFLAGS = -g -O0 -Wall -Werror ${INCLUDES}
#CXXFLAGS = -g -O0 -Wall ${INCLUDES}
INCLUDES = -I../geometry -I../common -I../system -IWiiYourself_1_0

# Target
CONTROLLER_LIB = controller.a
TARGET = ${CONTROLLER_LIB}


all : ${TARGET}

clean :
	${RM} *.o ${TARGET}
	cd samples/ && ${MAKE} clean

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

.PHONY : all clean depend
######################################################################
${CONTROLLER_LIB} : \
	${CONTROLLER_LIB}(WiiJoystick.o) \
	${CONTROLLER_LIB}(WiiUtils.o) \
#	${CONTROLLER_LIB}(RescanWiimote.o)

WiiJoystick.o : WiiJoystick.cpp WiiJoystick_lin.cpp WiiJoystick_win.cpp WiiYourself_1_0/wiimote.cpp WiiYourself_1_0/wiimote.h WiiYourself_1_0/wiimote_state.h WiiJoystick.h ../geometry/GridTypes.h ../common/MovingAverage.h

# DO NOT DELETE

WiiJoystick.o: ../geometry/GridTypes.h
WiiUtils.o: ../geometry/GridTypes.h
WiiJoystick.o: ../system/DetectOS.h
WiiJoystick_lin.o: WiiJoystick.h ../geometry/GridTypes.h
WiiJoystick_lin.o: ../common/MovingAverage.h
WiiJoystick_win.o: WiiYourself_1_0/wiimote.h ../common/MovingAverage.h
WiiJoystick_win.o: WiiYourself_1_0/wiimote_state.h WiiJoystick.h
WiiJoystick_win.o: ../geometry/GridTypes.h
WiiUtils.o: WiiUtils.h ../geometry/GridTypes.h ../geometry/AngleTypes.h
WiiUtils.o: ../system/MathUtils.h ../system/DetectOS.h
rescanWiimote.o: rescanWiimote.h ../system/DetectOS.h
