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

Olivier Aubert's avatar
Olivier Aubert committed
3 4
SOURCES_corba = corba.c mediacontrol-core.c mediacontrol-plugin.c

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
GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h

14
EXTRA_DIST += $(CORBAIDLFILE)
15
BUILT_SOURCES += $(GENERATEDFILES)
16 17 18

if ENABLE_CORBA

19 20
CORBAIDLFILE = MediaControl.idl

21
corbaidldir = $(datadir)/idl
22
corbaidl_DATA = $(CORBAIDLFILE)
23

24 25 26
## orbittypelibdir = $(libdir)/orbit-2.0
orbittypelibdir = $(libdir)/advene
orbittypelib_DATA = MediaControl.so
27 28
orbittypelib_CFLAGS=`$(VLC_CONFIG) --cflags plugin corba`
orbittypelib_LIBS=`$(VLC_CONFIG) --libs plugin corba`
Olivier Aubert's avatar
Olivier Aubert committed
29

30 31 32
ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0)

## MediaControl.so rules
33 34
MediaControl-imodule.o: MediaControl-imodule.c
	$(CC) -fPIC -o $@ -c $< $(orbittypelib_CFLAGS)
35

36 37
MediaControl.so: MediaControl-imodule.o
	$(CC) -shared -o $@ $< $(orbittypelib_LIBS)
38

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

clean:
Olivier Aubert's avatar
Olivier Aubert committed
47
	$(RM) -f $(GENERATEDFILES)
48

49
endif