# -*- Makefile -*-
#
# @file  Makefile.Odometry
# @brief RTComponent makefile for "Odometry component"
# @date  $Date$
#
# This file is generated by rtc-template with the following argments.
#
#   rtc-template -bcxx --module-name=Odometry 
#   --module-desc='detect position by Odometry' --module-version=4.0.0 --module-vendor=AIST INVENT 
#   --module-category=Localization --module-comp-type=STATIC 
#   --module-act-type=PERIODIC --module-max-inst=10 
#   --config=leftWheelID:int:0 --config=rightWheelID:int:1 --config=radiusOfLeftWheel:double:0.1 --config=radiusOfRightWheel:double:0.1 --config=lengthOfAxle:double:0.441 --config=radiusOfBodyArea:double:0.45 
#   --inport=CurrentWheelAngle:TimedDoubleSeq --inport=LocalizedPosition:intellirobot::TimedPosition --outport=OdometryPosition:intellirobot::TimedPosition 
#
#
# $Id$
#
CXXFLAGS = `rtm-config --cflags` -I.
LDFLAGS  = `rtm-config --libs`
SHFLAGS  = -shared

IDLC     = `rtm-config --idlc`
IDLFLAGS = `rtm-config --idlflags` -I`rtm-config --prefix`/include/rtm/idl
WRAPPER  = rtm-skelwrapper
WRAPPER_FLAGS = --include-dir="" --skel-suffix=Skel --stub-suffix=Stub

###[intellirobot.idl]#######
#SKEL_OBJ = 
SKEL_OBJ = intellirobotSkel.o
###########
STUB_OBJ = 
IMPL_OBJ = 
OBJS     = Odometry.o $(SKEL_OBJ) $(STUB_OBJ) $(IMPL_OBJ)

.SUFFIXES : .so

all: Odometry.so OdometryComp

.cpp.o:
	rm -f $@
	$(CXX) $(CXXFLAGS) -c -o $@ $<

.o.so:
	rm -f $@
	$(CXX) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)

OdometryComp: OdometryComp.o $(OBJS)
	$(CXX) -o $@ $(OBJS) OdometryComp.o $(LDFLAGS) 


clean: clean_objs clean_skelstub
	rm -f *~

clean_objs:
	rm -f $(OBJS) OdometryComp.o Odometry.so OdometryComp

clean_skelstub:
	rm -f *Skel.h *Skel.cpp
	rm -f *Stub.h *Stub.cpp

# add start 2011.01.24 by rtc-center
install:
	cp -p OdometryComp ../../../bin/comp
	cp -p Odometry.so ../../../bin/so
# add end   2011.01.24 by rtc-center

###[intellirobot.idl]#######
intellirobotSkel.cpp : intellirobot.idl
	$(IDLC) $(IDLFLAGS) intellirobot.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=intellirobot.idl
intellirobotSkel.h : intellirobot.idl
	$(IDLC) $(IDLFLAGS) intellirobot.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=intellirobot.idl
intellirobotStub.cpp : intellirobot.idl
	$(IDLC) $(IDLFLAGS) intellirobot.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=intellirobot.idl
intellirobotStub.h : intellirobot.idl
	$(IDLC) $(IDLFLAGS) intellirobot.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=intellirobot.idl
###########

Odometry.so: $(OBJS)
Odometry.o: Odometry.h 	 	
###[intellirobot.idl]#######
#Odometry.o: Odometry.h  
Odometry.o: Odometry.h intellirobotStub.h intellirobot.hh
###########
OdometryComp.o: OdometryComp.cpp Odometry.cpp Odometry.h 

###[intellirobot.idl]#######
intellirobotSkel.o: intellirobotSkel.cpp intellirobotSkel.h intellirobotStub.h
#intellirobotStub.o: intellirobotStub.cpp intellirobotStub.h
###########

# end of Makefile
