# -*- Makefile -*-
#
# @file  Makefile.PathFollower
# @brief RTComponent makefile for "PathFollower component"
# @date  $Date$
#
# This file is generated by rtc-template with the following argments.
#
#  /usr/local/bin/rtc-template -bcxx --module-name=PathFollower
#  --module-type=DataFlowComponent --module-desc=compornent
#  --module-version=1.0 --module-vendor=MyName --module-category=example
#  --module-comp-type=DataFlowComponent --module-act-type=SPORADIC
#  --module-max-inst=10 --outport=velocity:TimedVelocity
#  --inport=position:TimedOdometry --inport=target_path:Path
#  --inport=max_speed:TimedVelocity
#  --inport=max_acceleration:TimedVelocity --consumer-idl=Path.idl
#  --consumer-idl=Rmp.idl --config=max_v:double:0.3
#  --config=max_w:double:1.5 --config=max_acc_v:double:0.1
#  --config=max_acc_w:double:0.1 --config=line_C1:double:0.01
#  --config=line_K1:double:800 --config=line_K2:double:300
#  --config=line_K3:double:400 --config=line_Dist:double:0.4
#  --config=control_cycle:double:0.02
#
#
# $Id$
#
CXXFLAGS = `rtm-config --cflags`
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

SKEL_OBJ =  	intellirobotStub.o
STUB_OBJ =
IMPL_OBJ =
OBJS     = control.o PathFollower.o $(SKEL_OBJ) $(IMPL_OBJ)

.SUFFIXES : .so

all: PathFollower.so PathFollowerComp


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

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

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


clean: clean_objs clean_skelstub
	rm -f *~

clean_objs:
	rm -f $(OBJS) PathFollowerComp.o PathFollower.so PathFollowerComp

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

# add start 2011.04.22 by rtc-center
install:
	cp -p PathFollowerComp ../../../bin/comp
	cp -p PathFollower.so ../../../bin/so
# add end   2011.04.22 by rtc-center

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




PathFollower.so: $(OBJS)
PathFollower.o: PathFollower.h 	 	intellirobotStub.h 
PathFollowerComp.o: PathFollowerComp.cpp PathFollower.cpp PathFollower.h




intellirobotStub.o: intellirobotStub.cpp intellirobotStub.h

RmpStub.o: RmpStub.cpp RmpStub.h


# end of Makefile
