# 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
#	cd samples/ && $(MAKE) clean

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 $(REQUIRE_LIBS)
allTest : $(TEST_OBJS)
	$(CXX) $(CXXFLAGS) $(TEST_OBJS) -o $@ `cppunit-config --libs` $(TEST_LDLIBS)

# DO NOT DELETE

Position.o: Angle.h
RectUtils.o: Rect.h Point.h
Angle.o: Angle.h ../system/MathUtils.h ../system/DetectOS.h
TestRectUtils.o: TestRectUtils.h RectUtils.h Rect.h Point.h
