]> git.sesse.net Git - vlc/blob - modules/control/corba/Modules.am
corba module: use the integrated mediacontrol API
[vlc] / modules / control / corba / Modules.am
1 ## corba module declaration
2
3 SOURCES_corba = corba.c ../../../src/control/plugin.c
4
5 nodist_SOURCES_corba = \
6         MediaControl-common.c \
7         MediaControl-skels.c \
8         MediaControl-stubs.c \
9         MediaControl.h \
10         $(NULL)
11
12 if ENABLE_CORBA
13
14 GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h
15
16 endif
17
18 CORBAIDLFILE = MediaControl.idl
19
20 EXTRA_DIST += $(CORBAIDLFILE)
21 BUILT_SOURCES += $(GENERATEDFILES)
22
23 if ENABLE_CORBA
24
25
26 corbaidldir = $(datadir)/idl
27 corbaidl_DATA = $(CORBAIDLFILE)
28
29 ## orbittypelibdir = $(libdir)/orbit-2.0
30 orbittypelibdir = $(libdir)/advene
31 orbittypelib_DATA = MediaControl.so
32 orbittypelib_CFLAGS=`$(VLC_CONFIG) --cflags plugin corba`
33 orbittypelib_LIBS=`$(VLC_CONFIG) --libs plugin corba`
34
35 ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0)
36
37 ## MediaControl.so rules
38 MediaControl-imodule.o: MediaControl-imodule.c
39         $(CC) -fPIC -o $@ -c $< $(orbittypelib_CFLAGS)
40
41 MediaControl.so: MediaControl-imodule.o
42         $(CC) -shared -o $@ $< $(orbittypelib_LIBS)
43
44 ## We have to invoke 2 times $(ORBIT_IDL), else the --imodule
45 ## invocation builds MediaControl-common.c without some
46 ## glue code that is needed.
47 $(GENERATEDFILES): $(CORBAIDLFILE)
48         $(ORBIT_IDL) --imodule $<
49         $(ORBIT_IDL) $<
50
51 clean:
52         $(RM) -f $(GENERATEDFILES)
53
54 endif