1 # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # This Makefile is responsible of generating the client and server
21 # implementation of IDL interfaces for both C++ and python usage.
22 # The building process of the C++ files is in charge of each source
23 # package and then is not manage here.
25 include $(top_srcdir)/adm_local/unix/make_common_starter.am
27 EXTRA_DIST += CMakeLists.txt
30 MED.idl MED_Gen.idl Compo1Py.idl \
31 MEDCouplingCorbaServant.idl \
32 MEDCouplingCorbaServantTest.idl \
33 ParaMEDCouplingCorbaServant.idl
38 MEDEventListener.idl \
41 MPIIDL_FILES = ParaMEDMEMComponent.idl
43 IDL_FILES = $(BASEIDL_FILES)
45 IDL_FILES += $(MPIIDL_FILES)
47 IDL_FILES += $(MEDOPIDL_FILES)
49 IDL_FILES_PY=$(IDL_FILES:%.idl=%_idl.py)
51 # This variable defines the files to be installed
52 dist_salomeidl_DATA = $(IDL_FILES)
54 # GUI idl common library
55 lib_LTLIBRARIES = libSalomeIDLMED.la libSalomeIDLMEDTests.la
57 # Sources built from idl files
59 MEDSK.cc MED_GenSK.cc Compo1PySK.cc \
60 MEDCouplingCorbaServantSK.cc \
61 ParaMEDCouplingCorbaServantSK.cc
66 MEDEventListenerSK.cc \
69 MPIIDL_SOURCES = ParaMEDMEMComponentSK.cc
71 IDL_SOURCES = $(BASEIDL_SOURCES)
73 IDL_SOURCES += $(MPIIDL_SOURCES)
75 IDL_SOURCES += $(MEDOPIDL_SOURCES)
77 nodist_libSalomeIDLMED_la_SOURCES = $(IDL_SOURCES)
79 # header files must be exported: other modules have to use this library
80 nodist_salomeinclude_HEADERS = \
81 MED.hh MED_Gen.hh Compo1Py.hh \
82 MEDCouplingCorbaServant.hh \
83 MEDCouplingCorbaServantTest.hh \
84 ParaMEDCouplingCorbaServant.hh
87 nodist_salomeinclude_HEADERS += ParaMEDMEMComponent.hh
90 nodist_salomeinclude_HEADERS += \
96 libSalomeIDLMED_la_CPPFLAGS = \
97 -I$(top_builddir)/idl \
98 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @KERNEL_CXXFLAGS@
99 libSalomeIDLMED_la_LDFLAGS = -no-undefined -version-info=0:0:0
100 libSalomeIDLMED_la_LIBADD = @CORBA_LIBS@ $(KERNEL_LDFLAGS) -lSalomeIDLKernel
102 nodist_libSalomeIDLMEDTests_la_SOURCES = MEDCouplingCorbaServantTestSK.cc
103 libSalomeIDLMEDTests_la_CPPFLAGS = $(libSalomeIDLMED_la_CPPFLAGS)
104 libSalomeIDLMEDTests_la_LIBADD = libSalomeIDLMED.la
106 # These variables defines the building process of CORBA files
107 OMNIORB_IDL = @OMNIORB_IDL@
108 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
109 OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome
110 IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/idl/salome -I$(KERNEL_ROOT_DIR)/idl/salome
111 IDLPYFLAGS = @IDLPYFLAGS@ -I$(KERNEL_ROOT_DIR)/idl/salome
113 SUFFIXES = .idl .hh SK.cc
116 $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
119 # $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
122 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%)
123 $(INSTALL) -d $(DESTDIR)$(salomepythondir)
124 ls $^ | while read file; do \
125 $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
128 # we want to remove only staff generated for IDL files and nothing more
130 @for modulen in SALOME_MED SALOME_TEST Compo1Py_ORB MEDOP ; do \
131 test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \
132 test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \
134 for filen in $(IDL_FILES_PY) ; do \
135 echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \
138 mostlyclean-local: clean-idls
141 -rm -f *.hh *.cc .depidl
143 # we use cpp to generate dependencies between idl files.
144 # option x c tells the preprocessor to consider idl as a c file.
145 # if an idl is modified, all idl dependencies are rebuilt
147 .depidl: $(BASEIDL_FILES)
149 @for dep in $^ dummy; do \
150 if [ $$dep != "dummy" ]; then \
151 echo Building dependencies for $$dep; \
152 $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \
153 sed 's/\.o/\SK.cc/' >>$@; \