# -*- Makefile -*-
#
# @file  Makefile.Interface
# @brief RTComponent makefile for "Interface component"
# @date  $Date$
#
# This file is generated by rtc-template with the following argments.
#
#  /usr/local/bin/rtc-template -bcxx --module-name=Interface 
#  --module-type=DataFlowComponent 
#  --module-desc=Console output component --module-version=1.0 
#  --module-vendor=MyName --module-category=example 
#  --module-comp-type=DataFlowComponent --module-act-type=SPORADIC 
#  --module-max-inst=10 --outport=out:TimedLong --module-max-inst=10 
#  --outport=out:TimedLong --module-max-inst=10 --inport=in:Imagedata 
#  --module-max-inst=10 --inport=in:Laserdata --consumer-idl=Image.idl 
#  --consumer-idl=Laser.idl 
#
#
# $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 =  	ImageStub.o LaserStub.o 
STUB_OBJ = 
IMPL_OBJ = 
OBJS     = Interface.o shm_interface.o $(SKEL_OBJ) $(IMPL_OBJ)

.SUFFIXES : .so

all: Interface.so InterfaceComp


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

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

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


clean: clean_objs clean_skelstub
	rm -f *~

clean_objs:
	rm -f $(OBJS) Interface.so InterfaceComp

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






ImageStub.cpp : Image.idl
	$(IDLC) $(IDLFLAGS) Image.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=Image.idl
ImageStub.h : Image.idl
	$(IDLC) $(IDLFLAGS) Image.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=Image.idl

LaserStub.cpp : Laser.idl
	$(IDLC) $(IDLFLAGS) Laser.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=Laser.idl
LaserStub.h : Laser.idl
	$(IDLC) $(IDLFLAGS) Laser.idl
	$(WRAPPER) $(WRAPPER_FLAGS) --idl-file=Laser.idl



Interface.so: $(OBJS)
Interface.o: Interface.h 	 	ImageStub.h LaserStub.h 
InterfaceComp.o: InterfaceComp.cpp Interface.cpp Interface.h 




ImageStub.o: ImageStub.cpp ImageStub.h

LaserStub.o: LaserStub.cpp LaserStub.h


# end of Makefile
