Commit ee5688a0 authored by Olivier Aubert's avatar Olivier Aubert
Browse files

Modules.am: fixed typelib generation

parent 9372af1e
...@@ -5,11 +5,14 @@ SOURCES_corba = corba.c mediacontrol-core.c mediacontrol-plugin.c ...@@ -5,11 +5,14 @@ SOURCES_corba = corba.c mediacontrol-core.c mediacontrol-plugin.c
nodist_SOURCES_corba = \ nodist_SOURCES_corba = \
MediaControl-common.c \ MediaControl-common.c \
MediaControl-skels.c \ MediaControl-skels.c \
MediaControl-stubs.c \
MediaControl.h \ MediaControl.h \
$(NULL) $(NULL)
GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h
EXTRA_DIST += $(CORBAIDLFILE) EXTRA_DIST += $(CORBAIDLFILE)
BUILT_SOURCES += $(GENERATEDFILES) $(IMODULEFILE) BUILT_SOURCES += $(GENERATEDFILES)
if ENABLE_CORBA if ENABLE_CORBA
...@@ -21,29 +24,26 @@ corbaidl_DATA = $(CORBAIDLFILE) ...@@ -21,29 +24,26 @@ corbaidl_DATA = $(CORBAIDLFILE)
## orbittypelibdir = $(libdir)/orbit-2.0 ## orbittypelibdir = $(libdir)/orbit-2.0
orbittypelibdir = $(libdir)/advene orbittypelibdir = $(libdir)/advene
orbittypelib_DATA = MediaControl.so orbittypelib_DATA = MediaControl.so
orbittypelib_CFLAGS=`$(VLC_CONFIG) --cflags plugin corba`
orbittypelib_LIBS=`$(VLC_CONFIG) --libs plugin corba`
ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0) ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0)
GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h
IMODULEFILE = $(IMODULEFILE)
## MediaControl.so rules ## MediaControl.so rules
MediaControl.so: MediaControl-imodule.c MediaControl-imodule.o: MediaControl-imodule.c
$(CC) -fPIC -o MediaControl-imodule.o -c $< $(CORBA_CFLAGS) $(CC) -fPIC -o $@ -c $< $(orbittypelib_CFLAGS)
$(CC) -shared -o $@ MediaControl-imodule.o $(CORBA_LIBS)
$(GENERATEDFILES): $(CORBAIDLFILE) MediaControl.so: MediaControl-imodule.o
$(ORBIT_IDL) $< $(CC) -shared -o $@ $< $(orbittypelib_LIBS)
## We have to invoke 2 times $(ORBIT_IDL), else the --imodule ## We have to invoke 2 times $(ORBIT_IDL), else the --imodule
## invocation builds MediaControl-common.c without some ## invocation builds MediaControl-common.c without some
## glue code that is needed. ## glue code that is needed.
$(IMODULEFILE): $(CORBAIDLFILE) $(GENERATEDFILES): $(CORBAIDLFILE)
$(ORBIT_IDL) --imodule $< $(ORBIT_IDL) --imodule $<
$(ORBIT_IDL) $< $(ORBIT_IDL) $<
clean: clean:
$(RM) -f $(GENERATEDFILES) $(RM) -f $(GENERATEDFILES)
$(RM) -f $(IMODULEFILE)
endif endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment