Modules.am 1.24 KB
Newer Older
1 2
## corba module declaration

3
SOURCES_corba = corba.c ../../../src/control/mediacontrol_plugin.c
Olivier Aubert's avatar
Olivier Aubert committed
4

5
nodist_SOURCES_corba = \
Olivier Aubert's avatar
Olivier Aubert committed
6 7
	MediaControl-common.c \
	MediaControl-skels.c \
8
	MediaControl-stubs.c \
Olivier Aubert's avatar
Olivier Aubert committed
9
	MediaControl.h \
10 11
	$(NULL)

12 13
if ENABLE_CORBA

14 15
GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h

16 17
endif

18 19
CORBAIDLFILE = MediaControl.idl

20
EXTRA_DIST += $(CORBAIDLFILE)
21
BUILT_SOURCES += $(GENERATEDFILES)
22 23 24

if ENABLE_CORBA

25

26
corbaidldir = $(datadir)/idl
27
corbaidl_DATA = $(CORBAIDLFILE)
28

29 30 31
## orbittypelibdir = $(libdir)/orbit-2.0
orbittypelibdir = $(libdir)/advene
orbittypelib_DATA = MediaControl.so
32 33
orbittypelib_CFLAGS=`$(VLC_CONFIG) --cflags plugin corba`
orbittypelib_LIBS=`$(VLC_CONFIG) --libs plugin corba`
Olivier Aubert's avatar
Olivier Aubert committed
34

35 36 37
ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0)

## MediaControl.so rules
38 39
MediaControl-imodule.o: MediaControl-imodule.c
	$(CC) -fPIC -o $@ -c $< $(orbittypelib_CFLAGS)
40

41 42
MediaControl.so: MediaControl-imodule.o
	$(CC) -shared -o $@ $< $(orbittypelib_LIBS)
43

44
## We have to invoke 2 times $(ORBIT_IDL), else the --imodule
Olivier Aubert's avatar
Olivier Aubert committed
45 46
## invocation builds MediaControl-common.c without some
## glue code that is needed.
47
$(GENERATEDFILES): $(CORBAIDLFILE)
48 49
	$(ORBIT_IDL) --imodule $<
	$(ORBIT_IDL) $<
50 51

clean:
Olivier Aubert's avatar
Olivier Aubert committed
52
	$(RM) -f $(GENERATEDFILES)
53

54
endif