# Makefile for positioning
# Satofumi KAMIMURA
# $Id: Makefile 1192 2009-07-30 09:10:18Z satofumi $

# Compile options
CC = g++
CXXFLAGS = -g -O0 -Wall -W -Werror $(INCLUDES)
INCLUDES = -I../range_finder -I../geometry -I../system -I../common
LDFLAGS =
LDLIBS =


# Target
POSITIONING_LIB = positioning.a
TARGET = $(POSITIONING_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
######################################################################
$(POSITIONING_LIB) : \
	$(POSITIONING_LIB)(LrfDirection.o) \
	$(POSITIONING_LIB)(splitLrfData.o) \
	$(POSITIONING_LIB)(detectPolls.o) \
	$(POSITIONING_LIB)(detectLines.o) \
	$(POSITIONING_LIB)(medianPoints.o) \
	$(POSITIONING_LIB)(averagePoints.o) \
	$(POSITIONING_LIB)(detectFeaturePoints.o) \
	$(POSITIONING_LIB)(PointMap.o) \
	$(POSITIONING_LIB)(FeaturePointMap.o) \

REQUIRE_LIBS =
$(REQUIRE_LIBS) :
	cd $(@D)/ && $(MAKE) $(@F)

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

TEST_OBJS = allTest.o TestPointMap.o PointMap.o $(REQUIRE_LIBS)
allTest : $(TEST_OBJS)
	$(CXX) $(CXXFLAGS) $(TEST_OBJS) -o $@ `cppunit-config --libs` $(TEST_LDLIBS)

# DO NOT DELETE

FeaturePointMap.o: featurePoint_t.h ../geometry/Point.h
FeaturePointMap.o: ../geometry/Position.h ../geometry/Angle.h
FeaturePointMap.o: ../geometry/Rect.h
PointMap.o: ../geometry/Point.h
averagePoints.o: distance_t.h range_t.h
detectFeaturePoints.o: ../geometry/Position.h ../geometry/Angle.h
detectFeaturePoints.o: distance_t.h range_t.h segment_t.h ../geometry/Point.h
detectFeaturePoints.o: featurePoint_t.h
detectLines.o: line_t.h ../geometry/Point.h ../geometry/Angle.h range_t.h
detectPolls.o: featurePoint_t.h ../geometry/Point.h range_t.h
distance_t.o: range_t.h
featurePoint_t.o: ../geometry/Point.h
line_t.o: ../geometry/Point.h ../geometry/Angle.h
medianPoints.o: distance_t.h range_t.h
poll_t.o: ../geometry/Point.h
segment_t.o: ../geometry/Point.h ../geometry/Angle.h
splitLrfData.o: range_t.h
FeaturePointMap.o: FeaturePointMap.h featurePoint_t.h ../geometry/Point.h
FeaturePointMap.o: ../geometry/Position.h ../geometry/Angle.h
FeaturePointMap.o: ../geometry/Rect.h PointMap.h ../geometry/PointUtils.h
FeaturePointMap.o: ../system/MathUtils.h ../system/DetectOS.h
LrfDirection.o: LrfDirection.h ../range_finder/RangeFinder.h
LrfDirection.o: ../system/MathUtils.h ../system/DetectOS.h
LrfDirection.o: ../geometry/Angle.h
PointMap.o: PointMap.h ../geometry/Point.h
TestPointMap.o: TestPointMap.h PointMap.h ../geometry/Point.h
averagePoints.o: averagePoints.h distance_t.h range_t.h
averagePoints.o: ../common/MovingAverage.h
detectFeaturePoints.o: detectFeaturePoints.h ../geometry/Position.h
detectFeaturePoints.o: ../geometry/Angle.h distance_t.h range_t.h segment_t.h
detectFeaturePoints.o: ../geometry/Point.h featurePoint_t.h
detectFeaturePoints.o: ../range_finder/RangeFinder.h ../system/MathUtils.h
detectFeaturePoints.o: ../system/DetectOS.h ../geometry/leastSquare.h
detectFeaturePoints.o: ../geometry/PointUtils.h ../geometry/Rotate.h
detectLines.o: detectLines.h line_t.h ../geometry/Point.h ../geometry/Angle.h
detectLines.o: range_t.h ../range_finder/RangeFinder.h ../system/MathUtils.h
detectLines.o: ../system/DetectOS.h ../geometry/leastSquare.h
detectLines.o: ../geometry/Position.h ../geometry/PointUtils.h
detectPolls.o: detectPolls.h featurePoint_t.h ../geometry/Point.h range_t.h
detectPolls.o: ../range_finder/RangeFinder.h ../system/MathUtils.h
detectPolls.o: ../system/DetectOS.h ../geometry/PointUtils.h
medianPoints.o: medianPoints.h distance_t.h range_t.h
medianPoints.o: ../common/MovingMedian.h
splitLrfData.o: splitLrfData.h range_t.h ../range_finder/RangeFinder.h
splitLrfData.o: ../system/MathUtils.h ../system/DetectOS.h
