Salome HOME
Issue 0020406: Time compilation when recompiling
[modules/multipr.git] / adm_local / unix / make_omniorb.in
1 #=======================================================================
2 # Begin specific part to omniorb 
3 # (include from file adm/unix/make_omniorb generated by 
4 # adm/unix/make_omniorb.in)
5 #=======================================================================
6 # -* Makefile *- 
7 #
8 # Author : Patrick GOLDBRONN (CEA)
9 # Date : 29/06/2001
10 #
11
12 # Client and server object are the same with omniorb
13 # There are one header file and one source file generate
14
15 #IDLOBJ=$(IDLSRC:%.idl=%$(IDL_CLN_OBJ))
16
17 # dependancies between idl and it's generated files
18 %$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${KERNEL_ROOT_DIR}/idl/salome/%.idl
19         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
20
21 %$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${top_srcdir}/idl/%.idl
22         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
23
24 # dependncies between idl files
25 depend_idl: .depidl
26
27 # we use cpp to generate dependencies between idl files.
28 # we change cpp output to keep only idl file and transform it to get a suitable rule
29 .depidl: $(IDL_FILES)
30         @touch $@
31         @for dep in $? dummy; do \
32           if [ $$dep != "dummy" ]; then \
33             echo Building dependencies for $$dep; \
34             basedep=`basename $$dep .idl`; \
35             header="$$basedep"$(IDL_CLN_H); \
36             sed '\%^'"$$header"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
37             $(CPP) $(C_DEPEND_FLAG) -I$(srcdir) $$dep 2>/dev/null | \
38             sed `echo "s%$$basedep\\.idl%$$header:%g"` | \
39             sed 's% $(srcdir)/% %g' | \
40             sed 's% $(top_srcdir)/% %g' | \
41             sed 's% $(top_builddir)/% %g' | \
42             sed 's%^.*:\.o: *%%' | sed 's%^ *\\ *%%'| sed 's%^ *\(.*\):%\1:%' | \
43             sed 's/\.idl/$(IDL_CLN_H)/' >>$@; \
44             echo ''  >>$@; \
45           fi; \
46         done ;
47
48 -include .depidl
49
50 #=======================================================================
51 # End specific part to omniorb 
52 #=======================================================================