# Makefile for coordinate
# Satofumi KAMIMURA
# $Id: Makefile 222 2008-09-17 12:52:15Z satofumi $

# Compile options
CC = g++
CXXFLAGS = -g -O0 -Wall -Werror ${INCLUDES}
INCLUDES = -I../geometry -I../system
LDFLAGS =
LDLIBS =


# Target
COORDINATE_LIB = coordinate.a
TARGET = ${COORDINATE_LIB}

all : ${TARGET}

clean :
	${RM} *.o ${TARGET} allTest

test : allTest
	./allTest

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

.PHONY : all clean test depend
######################################################################
${COORDINATE_LIB} : \
	${COORDINATE_LIB}(Coordinate.o)

REQUIRE_LIBS = ${COORDINATE_LIB} ../geometry/geometry.a
${REQUIRE_LIBS} :
	cd ${@D}/ && ${MAKE} ${@F}

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

TEST_OBJS = allTest.o TestCoordinate.o ${REQUIRE_LIBS}
TEST_LDLIBS =
allTest : ${TEST_OBJS}
	${CXX} ${CXXFLAGS} ${TEST_OBJS} -o $@ `cppunit-config --libs` ${TEST_LDLIBS}

# DO NOT DELETE

Coordinate.o: ../geometry/PositionTypes.h ../geometry/AngleTypes.h
Coordinate.o: Coordinate.h ../geometry/PositionTypes.h
Coordinate.o: ../geometry/AngleTypes.h ../geometry/GridTypes.h
Coordinate.o: ../system/MathUtils.h ../system/DetectOS.h
TestCoordinate.o: TestCoordinate.h Coordinate.h ../geometry/PositionTypes.h
TestCoordinate.o: ../geometry/AngleTypes.h ../geometry/GridTypes.h
TestCoordinate.o: ../system/MathUtils.h ../system/DetectOS.h
