# Makefile for games_libs/geometry
# $Id: Makefile 695 2009-03-29 22:24:00Z satofumi $

# Compile options
CC = $(CXX)
CXXFLAGS = -g -O0 -Wall -W -Werror $(INCLUDES)
INCLUDES = -I../system

# Target
GEOMETRY_LIB = geometry.a
TARGET = $(GEOMETRY_LIB)

all : $(TARGET)

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

test : allTest
	./allTest

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

.PHONY : all clean depend
######################################################################
$(GEOMETRY_LIB) : \
	$(GEOMETRY_LIB)(Angle.o) \

allTest.o : ../../unittest/allTest.cpp
	$(CXX) $(CXXFLAGS) `cppunit-config --cflags` $< -c -o $@

TEST_OBJS = allTest.o TestRectUtils.o TestAngleUtils.o Angle.o TestLeastSquare.o $(REQUIRE_LIBS)
allTest : $(TEST_OBJS)
	$(CXX) $(CXXFLAGS) $(TEST_OBJS) -o $@ `cppunit-config --libs` $(TEST_LDLIBS)

# DO NOT DELETE

AngleUtils.o: Angle.h Point.h ../system/MathUtils.h ../system/DetectOS.h
PointUtils.o: ../system/MathUtils.h ../system/DetectOS.h
Position.o: Angle.h
Position3d.o: Position.h Angle.h
PositionUtils.o: ../system/MathUtils.h ../system/DetectOS.h
RectUtils.o: Rect.h Point.h
Rotate.o: Angle.h
leastSquare.o: Point.h
Angle.o: Angle.h ../system/MathUtils.h ../system/DetectOS.h
TestAngleUtils.o: TestAngleUtils.h AngleUtils.h Angle.h Point.h
TestAngleUtils.o: ../system/MathUtils.h ../system/DetectOS.h
TestLeastSquare.o: TestLeastSquare.h leastSquare.h Point.h
TestRectUtils.o: TestRectUtils.h RectUtils.h Rect.h Point.h
