Modules.am 1.23 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
if ENABLE_CORBA

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

16 17
endif

18
EXTRA_DIST += $(CORBAIDLFILE)
19
BUILT_SOURCES += $(GENERATEDFILES)
20 21 22

if ENABLE_CORBA

23 24
CORBAIDLFILE = MediaControl.idl

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

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

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

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

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

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

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

53
endif