Salome HOME
Update copyright information
[modules/filter.git] / adm_local / unix / make_omniorb.in
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 #
3 #  This library is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU Lesser General Public
5 #  License as published by the Free Software Foundation; either
6 #  version 2.1 of the License.
7 #
8 #  This library is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 #  Lesser General Public License for more details.
12 #
13 #  You should have received a copy of the GNU Lesser General Public
14 #  License along with this library; if not, write to the Free Software
15 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 #=======================================================================
20 # Begin specific part to omniorb 
21 # (include from file adm/unix/make_omniorb generated by 
22 # adm/unix/make_omniorb.in)
23 #=======================================================================
24 # -* Makefile *- 
25 # Author : Patrick GOLDBRONN (CEA)
26 # Date : 29/06/2001
27 # $Header$
28 # Client and server object are the same with omniorb
29 # There are one header file and one source file generate
30 #IDLOBJ=$(IDLSRC:%.idl=%$(IDL_CLN_OBJ))
31 # dependancies between idl and it's generated files
32 #
33 %$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${KERNEL_ROOT_DIR}/idl/salome/%.idl
34         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
35
36 %$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${top_srcdir}/idl/%.idl
37         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
38
39 %$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${MED_ROOT_DIR}/idl/salome/%.idl
40         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
41
42 # dependncies between idl files
43 depend_idl: .depidl
44
45 # we use cpp to generate dependencies between idl files.
46 # we change cpp output to keep only idl file and transform it to get a suitable rule
47 .depidl: $(IDL_FILES)
48         @touch $@
49         @for dep in $? dummy; do \
50           if [ $$dep != "dummy" ]; then \
51             echo Building dependencies for $$dep; \
52             basedep=`basename $$dep .idl`; \
53             header="$$basedep"$(IDL_CLN_H); \
54             sed '\%^'"$$header"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
55             $(CPP) $(C_DEPEND_FLAG) -I$(srcdir) $$dep 2>/dev/null | \
56             sed `echo "s%$$basedep\\.idl%$$header:%g"` | \
57             sed 's% $(srcdir)/% %g' | \
58             sed 's% $(top_srcdir)/% %g' | \
59             sed 's% $(top_builddir)/% %g' | \
60             sed 's%^.*:\.o: *%%' | sed 's%^ *\\ *%%'| sed 's%^ *\(.*\):%\1:%' | \
61             sed 's/\.idl/$(IDL_CLN_H)/' >>$@; \
62             echo ''  >>$@; \
63           fi; \
64         done ;
65
66 -include .depidl
67
68 #=======================================================================
69 # End specific part to omniorb 
70 #=======================================================================