# -*- Makefile -*-
#
# @file  Makefile.MatchingComponent
# @brief RTComponent makefile for "MatchingComponent component"
# @date  $Date$
#
# This file is generated by rtc-template with the following argments.
#
#   rtc-template -bcxx --module-name=MatchingComponent 
#   --module-desc='Template Matching Component' --module-version=0.1 --module-vendor=OsakaUniv 
#   --module-category=Generic --module-comp-type=STATIC 
#   --module-act-type=SPORADIC --module-max-inst=1 
#   --config=int_width:int:640 --config=int_height:int:480 --config=int_match_level:int:70 --config=int_disp:int:0 
#   --service-idl=/home/rtc-center/sugiyaa/itemposition.idl 
#   --service=itemposition_service:item_position:item_position 
#
#
# $Id$
#
CXXFLAGS = `rtm-config --cflags` -I. `pkg-config --cflags opencv`
LDFLAGS  = `rtm-config --libs` `pkg-config --libs opencv`
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 = itempositionSkel.o 
STUB_OBJ = 
IMPL_OBJ = itempositionSVC_impl.o 
OBJS     = MatchingComponent.o $(SKEL_OBJ) $(STUB_OBJ) $(IMPL_OBJ)

.SUFFIXES : .so

all: MatchingComponent.so MatchingComponentComp

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

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

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


clean: clean_objs clean_skelstub
	rm -f *~ *.log
#	rm -f *~

clean_objs:
	rm -f $(OBJS) MatchingComponentComp.o MatchingComponent.so MatchingComponentComp

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 MatchingComponentComp ../../../bin/comp
	cp -p MatchingComponent.so ../../../bin/so
# add end   2011.01.24 by rtc-center

itempositionSkel.cpp : itemposition.idl
	$(IDLC) $(IDLFLAGS) itemposition.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=itemposition.idl
itempositionSkel.h : itemposition.idl
	$(IDLC) $(IDLFLAGS) itemposition.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=itemposition.idl



MatchingComponent.so: $(OBJS)
MatchingComponent.o: MatchingComponent.h 	itempositionSkel.h itempositionSVC_impl.h  	
MatchingComponentComp.o: MatchingComponentComp.cpp MatchingComponent.cpp MatchingComponent.h itempositionSkel.h itempositionSVC_impl.h 

itempositionSVC_impl.o: itempositionSVC_impl.cpp itempositionSVC_impl.h itempositionSkel.h itempositionStub.h
itempositionSkel.o: itempositionSkel.cpp itempositionSkel.h itempositionStub.h
itempositionStub.o: itempositionStub.cpp itempositionStub.h



# end of Makefile
