# Makefile for libs/controller
# Satofumi KAMIMURA
# $Id: Makefile 1332 2009-09-23 01:04:31Z satofumi $

# Compile options
CC = $(CXX)
#CXXFLAGS = -g -O0 -Wall -W -Werror $(INCLUDES)
CXXFLAGS = -g -O0 -Wall $(INCLUDES) `sdl-config --cflags`
INCLUDES = -I../geometry -I../common -I../gui -I../system -IWiiYourself_1_0

# Target
CONTROLLER_LIB = controller.a
TARGET = $(CONTROLLER_LIB)


all : $(TARGET)

clean :
	$(RM) *.o $(TARGET)
	cd sdl/ && $(MAKE) clean
	cd samples/ && $(MAKE) clean

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

.PHONY : all clean depend
######################################################################
$(CONTROLLER_LIB) : \
	$(CONTROLLER_LIB)(SdlJoystickInit.o) \
	$(CONTROLLER_LIB)(UsbJoystick.o) \
	$(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/Point3d.h ../common/MovingAverage.h

# DO NOT DELETE

UsbJoystick.o: Joystick.h
WiiJoystick.o: Joystick.h ../geometry/Point.h ../geometry/Point3d.h
WiiUtils.o: ../geometry/Point3d.h
SdlJoystickInit.o: SdlJoystickInit.h ../gui/SdlVideoInit.h
UsbJoystick.o: UsbJoystick.h Joystick.h SdlJoystickInit.h
WiiJoystick.o: ../system/DetectOS.h
WiiJoystick_lin.o: WiiJoystick.h Joystick.h ../geometry/Point.h
WiiJoystick_lin.o: ../geometry/Point3d.h ../common/MovingAverage.h
WiiJoystick_lin.o: ../geometry/Angle.h ../system/MathUtils.h
WiiJoystick_lin.o: ../system/DetectOS.h
WiiJoystick_win.o: WiiYourself_1_0/wiimote.h ../common/MovingAverage.h
WiiJoystick_win.o: WiiYourself_1_0/wiimote_state.h WiiJoystick.h Joystick.h
WiiJoystick_win.o: ../geometry/Point.h ../geometry/Point3d.h
WiiUtils.o: WiiUtils.h ../geometry/Point3d.h ../geometry/Angle.h
WiiUtils.o: ../system/MathUtils.h ../system/DetectOS.h
rescanWiimote.o: rescanWiimote.h ../system/DetectOS.h
