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 13 14
CORBAIDLFILE=MediaControl.idl

if ENABLE_CORBA

15
corbaidldir = $(datadir)/idl
16
corbaidl_DATA = $(CORBAIDLFILE)
17

18 19 20
## orbittypelibdir = $(libdir)/orbit-2.0
orbittypelibdir = $(libdir)/advene
orbittypelib_DATA = MediaControl.so
Olivier Aubert's avatar
Olivier Aubert committed
21

22
EXTRA_DIST += $(CORBAIDLFILE)
Olivier Aubert's avatar
Olivier Aubert committed
23

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

GENERATEDFILES = MediaControl-common.c MediaControl-skels.c MediaControl.h
BUILT_SOURCES += $(GENERATEDFILES) MediaControl-imodule.c

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

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

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

clean:
Olivier Aubert's avatar
Olivier Aubert committed
45
	$(RM) -f $(GENERATEDFILES)
46
	$(RM) -f MediaControl-imodule.c
47

48
endif