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