Modules.am 1.38 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
corbaidldir = $(datadir)/idl
corbaidl_DATA = MediaControl.idl
13

14 15 16
## orbittypelibdir = $(libdir)/orbit-2.0
orbittypelibdir = $(libdir)/advene
orbittypelib_DATA = MediaControl.so
Olivier Aubert's avatar
Olivier Aubert committed
17

18
EXTRA_DIST += $(corbaidl_DATA)
Olivier Aubert's avatar
Olivier Aubert committed
19

20 21 22 23 24
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

Olivier Aubert's avatar
Olivier Aubert committed
25
## corba.c: MediaControl.h
26

27
## Needed for both MediaControl.so and libcorba_plugin compilation
28
INCLUDES = $(CORBA_CFLAGS)
29

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

Olivier Aubert's avatar
Olivier Aubert committed
35
$(GENERATEDFILES): $(corbaidl_DATA)
36
	[ -z "$(CORBA_CFLAGS)" ] || $(ORBIT_IDL) $(corbaidl_DATA)
37

Olivier Aubert's avatar
Olivier Aubert committed
38 39 40
## We invoke 2 times $(ORBIT_IDL), else the --imodule
## invocation builds MediaControl-common.c without some
## glue code that is needed.
41
MediaControl-imodule.c: $(corbaidl_DATA)
42 43
	[ -z "$(CORBA_CFLAGS)" ] || $(ORBIT_IDL) --imodule $<
	[ -z "$(CORBA_CFLAGS)" ] || $(ORBIT_IDL) $<
44 45

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