# -*- Makefile -*-
#
# @file  Makefile.SURFObjectFinder
# @brief RTComponent makefile for "SURFObjectFinder component"
# @date  $Date: 2010-04-08 16:18:32 +0900 (木, 08  4月 2010) $
#
# This file is generated by rtc-template with the following argments.
#
#   rtc-template -bcxx,cxx,cxx,cxx,cxx --module-name=SURFObjectFinder 
#   --module-desc='Object Finder from Image using SURF' --module-version=1.0.0 --module-vendor=Hiroaki Yaguchi JSK 
#   --module-category=3D Estimation --module-comp-type=STATIC 
#   --module-act-type=PERIODIC --module-max-inst=1 
#   --inport=InImage:TimedImage --outport=ObjectPose:TimedFloatSeq --outport=ObjectIndex:TimedLong 
#
#
# $Id: Makefile 338 2010-04-08 07:18:32Z eus $
#
CXXFLAGS = `rtm-config --cflags` -I. `pkg-config --cflags opencv` -I`rtmpack find rtmext_opencv`
LDFLAGS  = `rtm-config --libs` -lm `pkg-config --libs opencv` `rtmpack find rtmext_opencv`/ImageTranslater.so
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 = 
STUB_OBJ = 
IMPL_OBJ = ImageProcs.o LSHTable.o SURFConverter.o SURFManager.o
OBJS     = SURFObjectFinder.o $(SKEL_OBJ) $(STUB_OBJ) $(IMPL_OBJ)

.SUFFIXES : .so

all: SURFObjectFinder.so SURFObjectFinderComp

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

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

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

clean: clean_objs clean_skelstub
	rm -f *~

clean_objs:
	rm -f $(OBJS) SURFObjectFinderComp.o SURFObjectFinder.so SURFObjectFinderComp

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



SURFObjectFinder.so: $(OBJS)
SURFObjectFinder.o: SURFObjectFinder.h
SURFObjectFinderComp.o: SURFObjectFinderComp.cpp SURFObjectFinder.cpp SURFObjectFinder.h

# end of Makefile
