]> SALOME platform Git repositories - modules/kernel.git/blob - idl/Makefile.am
Salome HOME
Merge from BR_LIBBATCH_2_0
[modules/kernel.git] / idl / Makefile.am
1 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
10 #
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22
23 # This Makefile is responsible of generating the client and server
24 # implementation of IDL interfaces for both C++ and python usage.
25 # The building process of the C++ files is in charge of each source
26 # package and then is not manage here.
27 #
28 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
29
30 AM_CXXFLAGS += -fPIC
31
32 BASEIDL_FILES = \
33   SALOME_Exception.idl \
34   SALOME_Comm.idl \
35   SALOME_ModuleCatalog.idl \
36   SALOME_ResourcesManager.idl \
37   SALOME_Launcher.idl \
38   SALOMEDS.idl \
39   SALOMEDS_Attributes.idl \
40   SALOME_Component.idl \
41   SALOME_ContainerManager.idl \
42   SALOME_TestComponent.idl \
43   SALOME_Registry.idl \
44   Logger.idl \
45   SALOME_GenericObj.idl \
46   SALOME_Types.idl \
47   SALOME_Session.idl \
48   SALOME_TestModuleCatalog.idl \
49   nstest.idl \
50   DSC_Engines.idl \
51   SALOME_Ports.idl \
52   SALOME_PyNode.idl \
53   Palm_Ports.idl \
54   SALOME_PACOExtension.idl \
55   SALOME_ParamPorts.idl \
56   SALOME_Parametric.idl \
57   SALOME_MPIObject.idl
58
59 MPIIDL_FILES = \
60   SALOME_MPIContainer.idl \
61   SALOME_TestMPIComponent.idl  
62
63 IDL_FILES = $(BASEIDL_FILES)
64 if MPI_IS_OK
65   IDL_FILES += $(MPIIDL_FILES)
66 endif
67
68 OTHER_IDL_FILES = \
69   TestNotif.idl \
70   TypeData.idl
71
72 # all the idl files are needed for make dist
73 EXTRA_DIST += $(BASEIDL_FILES) $(MPIIDL_FILES) $(OTHER_IDL_FILES) \
74             SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml \
75             SALOME_PACOExtension.xml SALOME_ParamPorts.xml \
76             SALOME_GenericObj.xml SALOME_Exception.xml
77
78 # This variable defines the files to be installed
79 salomeidl_DATA        = $(IDL_FILES)
80 nodist_salomeidl_DATA = Calcium_Ports.idl
81
82 # Sources built from idl files
83 # BUILT_SOURCE = first thing done on make all
84 # idl dependencies are checked and rebuilt first
85
86 BASEIDL_SOURCES =\
87   SALOME_ExceptionSK.cc \
88   SALOME_CommSK.cc \
89   SALOME_ModuleCatalogSK.cc \
90   SALOME_ResourcesManagerSK.cc \
91   SALOME_LauncherSK.cc \
92   SALOMEDSSK.cc \
93   SALOMEDS_AttributesSK.cc \
94   SALOME_ComponentSK.cc \
95   SALOME_ContainerManagerSK.cc \
96   SALOME_TestComponentSK.cc \
97   SALOME_RegistrySK.cc \
98   LoggerSK.cc \
99   SALOME_GenericObjSK.cc \
100   SALOME_TypesSK.cc \
101   SALOME_SessionSK.cc \
102   SALOME_TestModuleCatalogSK.cc \
103   nstestSK.cc \
104   DSC_EnginesSK.cc \
105   SALOME_PortsSK.cc \
106   SALOME_PyNodeSK.cc \
107   Calcium_PortsSK.cc \
108   Palm_PortsSK.cc \
109   SALOME_PACOExtensionSK.cc \
110   SALOME_ParamPortsSK.cc \
111   SALOME_ParametricSK.cc \
112   SALOME_MPIObjectSK.cc
113
114 DYNIDL_SRCS = \
115   SALOME_PortsDynSK.cc  Calcium_PortsDynSK.cc     SALOME_ContainerManagerDynSK.cc \
116   SALOME_CommDynSK.cc   SALOME_RegistryDynSK.cc   SALOME_ModuleCatalogDynSK.cc \
117   SALOMEDSDynSK.cc      SALOME_SessionDynSK.cc    SALOME_ResourcesManagerDynSK.cc SALOME_LauncherDynSK.cc \
118   DSC_EnginesDynSK.cc   SALOME_ComponentDynSK.cc  SALOME_GenericObjDynSK.cc SALOME_TypesDynSK.cc \
119   Palm_PortsDynSK.cc    SALOME_ExceptionDynSK.cc  SALOMEDS_AttributesDynSK.cc \
120   LoggerDynSK.cc        SALOME_PACOExtensionDynSK.cc SALOME_ParamPortsDynSK.cc SALOME_PyNodeDynSK.cc \
121   SALOME_ParametricDynSK.cc SALOME_MPIObjectDynSK.cc
122
123 MPIIDL_SOURCES = \
124   SALOME_MPIContainerSK.cc \
125   SALOME_TestMPIComponentSK.cc  
126
127 IDL_SOURCES = $(BASEIDL_SOURCES)
128 if MPI_IS_OK
129   IDL_SOURCES += $(MPIIDL_SOURCES)
130 endif
131
132
133 STATIDL_SOURCES=$(BASEIDL_SOURCES)
134 if MPI_IS_OK
135   STATIDL_SOURCES += $(MPIIDL_SOURCES)
136 endif
137
138 if MPI_IS_OK
139   DYNIDL_SRCS += SALOME_MPIContainerDynSK.cc SALOME_TestMPIComponentDynSK.cc
140 endif
141
142 $(DYNIDL_SRCS) : $(IDL_SOURCES)
143
144 # also install all generated headers to use result library from another modules
145 salomeinclude_DATA= $(STATIDL_SOURCES:%SK.cc=%.hh)
146
147 if WITH_PACO_PARALLEL
148 PAR = SALOME_ComponentPaCO.hxx SALOME_ComponentPaCO.cxx \
149       SALOME_PortsPaCO.hxx SALOME_PortsPaCO.cxx \
150       DSC_EnginesPaCO.hxx DSC_EnginesPaCO.cxx \
151       SALOME_PACOExtensionPaCO.hxx SALOME_PACOExtensionPaCO.cxx \
152       SALOME_ParamPortsPaCO.hxx SALOME_ParamPortsPaCO.cxx \
153       SALOME_GenericObjPaCO.hxx SALOME_GenericObjPaCO.cxx
154
155 PAR_INCLUDES = SALOME_Exception.hxx SALOME_GenericObj.hxx SALOMEDS.hxx SALOME_PyNode.hxx
156
157 PAR_LIB = libSalomeParallelIDLKernel.la
158
159 IDL_PACO = SALOME_ComponentPaCO.idl SALOME_PortsPaCO.idl DSC_EnginesPaCO.idl \
160            SALOME_ParamPortsPaCO.idl SALOME_PACOExtensionPaCO.idl \
161            SALOME_GenericObjPaCO.idl
162
163 GEN_PACO = SALOME_ComponentPaCO_Engines_Container_server.cxx \
164            SALOME_ComponentPaCO_Engines_Container_client.cxx \
165            SALOME_ComponentPaCO_Engines_EngineComponent_server.cxx \
166            SALOME_ComponentPaCO_Engines_EngineComponent_client.cxx \
167            SALOME_ComponentPaCO_Engines_fileTransfer_server.cxx \
168            SALOME_ComponentPaCO_Engines_fileTransfer_client.cxx \
169            SALOME_ComponentPaCO_Engines_Salome_file_server.cxx \
170            SALOME_ComponentPaCO_Engines_Salome_file_client.cxx \
171            SALOME_PortsPaCO_Ports_Port_server.cxx \
172            SALOME_PortsPaCO_Ports_Port_client.cxx \
173            SALOME_PortsPaCO_Ports_Data_Port_server.cxx \
174            SALOME_PortsPaCO_Ports_Data_Port_client.cxx \
175            DSC_EnginesPaCO_Engines_DSC_server.cxx \
176            DSC_EnginesPaCO_Engines_DSC_client.cxx \
177            DSC_EnginesPaCO_Engines_Superv_Component_server.cxx \
178            DSC_EnginesPaCO_Engines_Superv_Component_client.cxx \
179            SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.cxx \
180            SALOME_PACOExtensionPaCO_Engines_Parallel_Component_client.cxx \
181            SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.cxx \
182            SALOME_PACOExtensionPaCO_Engines_PACO_Container_client.cxx \
183            SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.cxx \
184            SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_client.cxx \
185            SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.cxx \
186            SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_client.cxx \
187            SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.cxx \
188            SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.cxx \
189            SALOME_GenericObjPaCO_SALOME_GenericObj_server.cxx \
190            SALOME_GenericObjPaCO_SALOME_GenericObj_client.cxx
191
192 INCLUDES_PACO = SALOME_ComponentPaCO_Engines_Container_server.hxx \
193                 SALOME_ComponentPaCO_Engines_Container_client.hxx \
194                 SALOME_ComponentPaCO_Engines_EngineComponent_server.hxx \
195                 SALOME_ComponentPaCO_Engines_EngineComponent_client.hxx \
196                 SALOME_ComponentPaCO_Engines_fileTransfer_server.hxx \
197                 SALOME_ComponentPaCO_Engines_fileTransfer_client.hxx \
198                 SALOME_ComponentPaCO_Engines_Salome_file_server.hxx \
199                 SALOME_ComponentPaCO_Engines_Salome_file_client.hxx \
200                 SALOME_ComponentPaCO.hxx \
201                 SALOME_Component.hxx \
202                 SALOME_PortsPaCO_Ports_Port_server.hxx \
203                 SALOME_PortsPaCO_Ports_Port_client.hxx \
204                 SALOME_PortsPaCO_Ports_Data_Port_server.hxx \
205                 SALOME_PortsPaCO_Ports_Data_Port_client.hxx \
206                 SALOME_PortsPaCO.hxx \
207                 SALOME_Ports.hxx \
208                 DSC_EnginesPaCO_Engines_DSC_server.hxx \
209                 DSC_EnginesPaCO_Engines_DSC_client.hxx \
210                 DSC_EnginesPaCO_Engines_Superv_Component_server.hxx \
211                 DSC_EnginesPaCO_Engines_Superv_Component_client.hxx \
212                 DSC_EnginesPaCO.hxx \
213                 DSC_Engines.hxx \
214                 SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.hxx \
215                 SALOME_PACOExtensionPaCO_Engines_Parallel_Component_client.hxx \
216                 SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.hxx \
217                 SALOME_PACOExtensionPaCO_Engines_PACO_Container_client.hxx \
218                 SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.hxx \
219                 SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_client.hxx \
220                 SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.hxx \
221                 SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_client.hxx \
222                 SALOME_PACOExtensionPaCO.hxx \
223                 SALOME_PACOExtension.hxx \
224                 SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.hxx \
225                 SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.hxx \
226                 SALOME_ParamPortsPaCO.hxx \
227                 SALOME_ParamPorts.hxx \
228                 SALOME_GenericObjPaCO_SALOME_GenericObj_server.hxx \
229                 SALOME_GenericObjPaCO_SALOME_GenericObj_client.hxx \
230                 SALOME_GenericObjPaCO.hxx \
231                 SALOME_GenericObj.hxx
232
233 XML           = SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml \
234                 SALOME_PACOExtension.xml SALOME_ParamPorts.xml \
235                 SALOME_GenericObj.xml
236 endif
237
238 idldir = $(prefix)/idl/salome
239 nodist_idl_DATA = ${XML} ${IDL_PACO} Calcium_Ports.idl
240 nodist_salomeinclude_HEADERS = ${INCLUDES_PACO} 
241
242 BUILT_SOURCES = $(IDL_SOURCES) $(PAR_INCLUDES) $(PAR)
243
244 SALOME_GenericObjPaCO.idl SALOME_GenericObjPaCO.hxx SALOME_GenericObjPaCO.cxx : SALOME_GenericObj.idl SALOME_GenericObj.xml
245 SALOME_ComponentPaCO.idl SALOME_ComponentPaCO.hxx SALOME_ComponentPaCO.cxx : SALOME_Component.idl SALOME_Component.xml SALOME_GenericObjPaCO.idl
246 SALOME_PortsPaCO.idl SALOME_PortsPaCO.hxx SALOME_PortsPaCO.cxx : SALOME_Ports.idl SALOME_Ports.xml
247 DSC_EnginesPaCO.idl DSC_EnginesPaCO.hxx DSC_EnginesPaCO.cxx : DSC_Engines.idl DSC_Engines.xml
248 SALOME_PACOExtensionPaCO.idl SALOME_PACOExtensionPaCO.hxx SALOME_PACOExtensionPaCO.cxx : SALOME_PACOExtension.idl SALOME_PACOExtension.xml
249 SALOME_ParamPortsPaCO.idl SALOME_ParamPortsPaCO.hxx SALOME_ParamPortsPaCO.cxx : SALOME_ParamPorts.idl SALOME_ParamPorts.xml
250
251 lib_LTLIBRARIES = libSalomeIDLKernel.la $(PAR_LIB)
252
253 nodist_libSalomeIDLKernel_la_SOURCES = $(IDL_SOURCES) $(DYNIDL_SRCS)
254 libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \
255                                 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
256 libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
257 libSalomeIDLKernel_la_LIBADD  = @CORBA_LIBS@
258
259 nodist_libSalomeParallelIDLKernel_la_SOURCES = $(PAR) $(GEN_PACO)
260 libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \
261                                         @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \
262                                         @PACO_INCLUDES@
263 libSalomeParallelIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
264 libSalomeParallelIDLKernel_la_LIBADD  = libSalomeIDLKernel.la @PACO_LIBS@
265
266 # These variables defines the building process of CORBA files
267 IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(srcdir) -I$(top_builddir)/salome/idl
268 IDLPYFLAGS  = @IDLPYFLAGS@ -I$(srcdir)
269
270 # potential problem on parallel make on the following - multiple outputs
271 SUFFIXES = .idl .hh SK.cc
272 .idlSK.cc:
273         $(IDL) $(IDLCXXFLAGS) $<
274 SK.cc.hh:
275
276 #Dummy rule to replace the following one (for parallel make)
277 #.idl.hh:
278 #       $(IDL) $(IDLCXXFLAGS) $<
279
280 if WITH_PACO_PARALLEL
281
282 %PaCO.idl %PaCO.hxx %PaCO.cxx : %.idl %.xml
283         $(IDL) -p@PACOPATH@/lib/python -bpaco -Wb$(top_srcdir)/idl/$*.xml,$(srcdir):@PACOPATH@/idl $(top_srcdir)/idl/$*.idl
284
285 .idl.hxx:
286         $(IDL) $(PACOIDLCXXFLAGS) -bcxx -Wbh=.hxx -Wbs=.cxx $<
287 endif
288
289 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%) Calcium_Ports.idl
290         $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
291         ls $^ | while read file; do \
292           $(IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
293         done
294 if WITH_PACO_PARALLEL
295         ls $(top_builddir)/idl/*.idl | while read file; do \
296           $(IDL) $(IDLPYFLAGS) -I$(top_srcdir)/idl -I@PACOPATH@/idl -C$(DESTDIR)$(salomepythondir) $$file ; \
297         done
298 endif
299
300 # uninstall-local removes too much, but it works in distcheck
301 uninstall-local:
302         for filen in `find $(DESTDIR)$(salomepythondir) -maxdepth 1` ; do \
303           case $${filen} in                                               \
304           $(DESTDIR)$(salomepythondir) )    ;;                            \
305           $(DESTDIR)$(salomepypkgdir) )     ;;                            \
306           $(DESTDIR)$(sharedpkgpythondir) ) ;;                            \
307           * ) rm -rf $${filen} ;;                                         \
308           esac ;                                                          \
309         done ;
310
311 mostlyclean-local:
312         -rm -f *.hh *.cc .depidl Calcium_Ports.idl
313
314 # we use cpp to generate dependencies between idl files.
315 # option x c tells the preprocessor to consider idl as a c file.
316 # if an idl is modified, all idl dependencies are rebuilt
317
318 .depidl: $(IDL_FILES) Calcium_Ports.idl
319         @echo "" > $@
320         @for dep in $^ dummy; do \
321           if [ $$dep != "dummy" ]; then \
322             echo Building dependencies for $$dep; \
323             $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) $$dep 2>/dev/null | \
324             sed 's/\.o/\SK.cc/' >>$@; \
325           fi; \
326         done ;
327
328 -include .depidl
329
330 CLEANFILES = *PaCO* *.hxx *.cxx Calcium_Ports.idl
331
332