## corba module declaration

SOURCES_corba = corba.c mediacontrol-core.c mediacontrol-plugin.c

EXTRA_DIST += MediaControl.so

nodist_SOURCES_corba = \
	MediaControl-common.c \
	MediaControl-skels.c \
	MediaControl.h \
	$(NULL)

ORBITIDL = orbit-idl-2

GENERATEDFILES=MediaControl-common.c MediaControl-skels.c MediaControl.h  MediaControl-imodule.c

corba.c: MediaControl.h MediaControl-common.c

$(GENERATEDFILES): MediaControl.idl
	$(ORBITIDL) --skeleton-impl MediaControl.idl

MediaControl-imodule.c:
	$(ORBITIDL) --imodule MediaControl.idl

MediaControl.so: MediaControl-imodule.c
	$(CC) -fPIC -o MediaControl-imodule.o -c MediaControl-imodule.c `pkg-config --cflags ORBit-2.0`
	$(CC) -shared -o $@ MediaControl-imodule.o `pkg-config --libs ORBit-2.0`

clean:
	$(RM) -f $(GENERATEDFILES)

