Modules.am 1.17 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 8
	MediaControl-common.c \
	MediaControl-skels.c \
	MediaControl.h \
9 10
	$(NULL)

11 12
EXTRA_DIST += $(CORBAIDLFILE)
BUILT_SOURCES += $(GENERATEDFILES) $(IMODULEFILE)
13 14 15

if ENABLE_CORBA

16 17
CORBAIDLFILE = MediaControl.idl

18
corbaidldir = $(datadir)/idl
19
corbaidl_DATA = $(CORBAIDLFILE)
20

21 22 23
## orbittypelibdir = $(libdir)/orbit-2.0
orbittypelibdir = $(libdir)/advene
orbittypelib_DATA = MediaControl.so
Olivier Aubert's avatar
Olivier Aubert committed
24

25 26 27
ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0)

GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h
28
IMODULEFILE = $(IMODULEFILE)
29 30

## MediaControl.so rules
Olivier Aubert's avatar
Olivier Aubert committed
31
MediaControl.so: MediaControl-imodule.c
32 33
	$(CC) -fPIC -o MediaControl-imodule.o -c $< $(CORBA_CFLAGS)
	$(CC) -shared -o $@ MediaControl-imodule.o $(CORBA_LIBS)
34

35 36
$(GENERATEDFILES): $(CORBAIDLFILE)
	$(ORBIT_IDL) $<
37

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

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

49
endif