# -*- Makefile -*-
#
# @file  Makefile.RefHardRh3
# @brief RTComponent makefile for "RefHardRh3 component"
# @date  $Date$
#
# This file is generated by rtc-template with the following argments.
#
#   rtc-template -bcxx --module-name=RefHardRh3 
#   --module-desc='RefHard VelocutyVersion RH3' --module-version=4.0.0 --module-vendor=AIST INVENT 
#   --module-category=Motor --module-comp-type=STATIC 
#   --module-act-type=PERIODIC --module-max-inst=10 
#   --config=DeviceFileName:std::string:/dev/ttyUSB0 --config=gain_P:int:10 --config=gain_I:int:0 --config=gain_D:int:0 --config=gain_VP:int:50 --config=gain_VI:int:0 --config=gain_VD:int:0 --config=Velocity_limit:double:10.0 --config=Acceleration_limit:double:50.0 --config=WheelTread:double:0.441 --config=WheelRadiusLeft:double:0.1 --config=WheelRadiusRight:double:0.1 --config=GearRatio:double:66.22 --config=EncoderCount:int:2000 --config=EncoderConstant_L:double:1.0 --config=EncoderConstant_R:double:1.0 
#   --inport=InTargetVelocity:IIS::TimedVelocity --outport=OutWheelAngle:TimedDoubleSeq 
#   --service-idl=/tmp/OpenINVENT-4.0.0/RefHard3_VelocityVersion_ver4.0.0/RefHardRh3Pro.idl 
#   --service=BumpProv:BumpRefHard:RefHard 
#   --service=InventGUIProv:InventGUIRefHard:RefHard 
#
#
# $Id$
#
CXXFLAGS = `rtm-config --cflags` -I.
###[libsvm]#######
#LDFLAGS  = `rtm-config --libs`
LDFLAGS  = `rtm-config --libs` -L. -Wl,-rpath . -lsvm -lrt -lm
#########
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 = RefHardRh3ProSkel.o 
SKEL_OBJ = RefHardRh3ProSkel.o	intellirobotSkel.o 
##########
STUB_OBJ = 
IMPL_OBJ = RefHardRh3ProSVC_impl.o 
OBJS     = RefHardRh3.o $(SKEL_OBJ) $(STUB_OBJ) $(IMPL_OBJ)

.SUFFIXES : .so

all: RefHardRh3.so RefHardRh3Comp

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

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

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


clean: clean_objs clean_skelstub
	rm -f *~

clean_objs:
	rm -f $(OBJS) RefHardRh3Comp.o RefHardRh3.so RefHardRh3Comp

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 RefHardRh3Comp ../../../bin/comp
	cp -p RefHardRh3.so ../../../bin/so
# add end   2011.04.22 by rtc-center


RefHardRh3ProSkel.cpp : RefHardRh3Pro.idl
	$(IDLC) $(IDLFLAGS) -I/tmp/OpenINVENT-4.0.0/RefHard3_VelocityVersion_ver4.0.0 -I/tmp/OpenINVENT-4.0.0/RefHard3_VelocityVersion_ver4.0.0 RefHardRh3Pro.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=RefHardRh3Pro.idl
RefHardRh3ProSkel.h : RefHardRh3Pro.idl
	$(IDLC) $(IDLFLAGS) -I/tmp/OpenINVENT-4.0.0/RefHard3_VelocityVersion_ver4.0.0 -I/tmp/OpenINVENT-4.0.0/RefHard3_VelocityVersion_ver4.0.0 RefHardRh3Pro.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=RefHardRh3Pro.idl

###[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
###########

RefHardRh3.so: $(OBJS)
###[intellirobot.idl]#######
#RefHardRh3.o: RefHardRh3.h 	RefHardRh3ProSkel.h RefHardRh3ProSVC_impl.h  	
RefHardRh3.o: RefHardRh3.h 	RefHardRh3ProSkel.h RefHardRh3ProSVC_impl.h intellirobotStub.h intellirobot.hh 	
##########	
RefHardRh3Comp.o: RefHardRh3Comp.cpp RefHardRh3.cpp RefHardRh3.h RefHardRh3ProSkel.h RefHardRh3ProSVC_impl.h 

RefHardRh3ProSVC_impl.o: RefHardRh3ProSVC_impl.cpp RefHardRh3ProSVC_impl.h RefHardRh3ProSkel.h RefHardRh3ProStub.h
RefHardRh3ProSkel.o: RefHardRh3ProSkel.cpp RefHardRh3ProSkel.h RefHardRh3ProStub.h
RefHardRh3ProStub.o: RefHardRh3ProStub.cpp RefHardRh3ProStub.h

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

# end of Makefile
