]> SALOME platform Git repositories - modules/kernel.git/blob - idl/Makefile.am
Salome HOME
CCAR: add a method to Container idl (create_component_instance_env) to be able
[modules/kernel.git] / idl / Makefile.am
1 #  Copyright (C) 2007-2008  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 # This Makefile is responsible of generating the client and server
23 # implementation of IDL interfaces for both C++ and python usage.
24 # The building process of the C++ files is in charge of each source
25 # package and then is not manage here.
26 #
27 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
28
29 AM_CXXFLAGS += -fPIC
30
31 BASEIDL_FILES = \
32   SALOME_Exception.idl \
33   SALOME_Comm.idl \
34   SALOME_ModuleCatalog.idl \
35   SALOME_RessourcesCatalog.idl \
36   SALOMEDS.idl \
37   SALOMEDS_Attributes.idl \
38   SALOME_Component.idl \
39   SALOME_ContainerManager.idl \
40   SALOME_TestComponent.idl \
41   SALOME_Registry.idl \
42   Logger.idl \
43   SALOME_GenericObj.idl \
44   SALOME_Session.idl \
45   SALOME_TestModuleCatalog.idl \
46   nstest.idl \
47   DSC_Engines.idl \
48   SALOME_Ports.idl \
49   SALOME_PyNode.idl \
50   Palm_Ports.idl \
51   SALOME_PACOExtension.idl \
52   SALOME_ParamPorts.idl
53
54 MPIIDL_FILES = \
55   SALOME_MPIObject.idl \
56   SALOME_MPIContainer.idl \
57   SALOME_TestMPIComponent.idl  
58
59 IDL_FILES = $(BASEIDL_FILES)
60 if MPI_IS_OK
61   IDL_FILES += $(MPIIDL_FILES)
62 endif
63
64 OTHER_IDL_FILES = \
65   TestNotif.idl \
66   TypeData.idl
67
68 # all the idl files are needed for make dist
69 EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES) $(OTHER_IDL_FILES) \
70             SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml \
71             SALOME_PACOExtension.xml SALOME_ParamPorts.xml
72
73 # This variable defines the files to be installed
74 salomeidl_DATA        = $(IDL_FILES)
75 nodist_salomeidl_DATA = Calcium_Ports.idl
76
77 # Sources built from idl files
78 # BUILT_SOURCE = first thing done on make all
79 # idl dependencies are checked and rebuilt first
80
81 BASEIDL_SOURCES =\
82   SALOME_ExceptionSK.cc \
83   SALOME_CommSK.cc \
84   SALOME_ModuleCatalogSK.cc \
85   SALOME_RessourcesCatalogSK.cc \
86   SALOMEDSSK.cc \
87   SALOMEDS_AttributesSK.cc \
88   SALOME_ComponentSK.cc \
89   SALOME_ContainerManagerSK.cc \
90   SALOME_TestComponentSK.cc \
91   SALOME_RegistrySK.cc \
92   LoggerSK.cc \
93   SALOME_GenericObjSK.cc \
94   SALOME_SessionSK.cc \
95   SALOME_TestModuleCatalogSK.cc \
96   nstestSK.cc \
97   DSC_EnginesSK.cc \
98   SALOME_PortsSK.cc \
99   SALOME_PyNodeSK.cc \
100   Calcium_PortsSK.cc \
101   Palm_PortsSK.cc \
102   SALOME_PACOExtensionSK.cc \
103   SALOME_ParamPortsSK.cc
104
105 DYNIDL_SRCS = \
106   SALOME_PortsDynSK.cc  Calcium_PortsDynSK.cc     SALOME_ContainerManagerDynSK.cc \
107   SALOME_CommDynSK.cc   SALOME_RegistryDynSK.cc   SALOME_ModuleCatalogDynSK.cc \
108   SALOMEDSDynSK.cc      SALOME_SessionDynSK.cc    SALOME_RessourcesCatalogDynSK.cc \
109   DSC_EnginesDynSK.cc   SALOME_ComponentDynSK.cc  SALOME_GenericObjDynSK.cc \
110   Palm_PortsDynSK.cc    SALOME_ExceptionDynSK.cc  SALOMEDS_AttributesDynSK.cc \
111   LoggerDynSK.cc        SALOME_PACOExtensionDynSK.cc SALOME_ParamPortsDynSK.cc SALOME_PyNodeDynSK.cc
112
113 MPIIDL_SOURCES = \
114   SALOME_MPIObjectSK.cc \
115   SALOME_MPIContainerSK.cc \
116   SALOME_TestMPIComponentSK.cc  
117
118 IDL_SOURCES = $(BASEIDL_SOURCES)
119 if MPI_IS_OK
120   IDL_SOURCES += $(MPIIDL_SOURCES)
121 endif
122
123
124 STATIDL_SOURCES=$(BASEIDL_SOURCES)
125 if MPI_IS_OK
126   STATIDL_SOURCES += $(MPIIDL_SOURCES)
127 endif
128
129 if MPI_IS_OK
130   DYNIDL_SRCS += SALOME_MPIObjectDynSK.cc SALOME_MPIContainerDynSK.cc SALOME_TestMPIComponentDynSK.cc
131 endif
132
133 $(DYNIDL_SRCS) : $(IDL_SOURCES)
134
135 # also install all generated headers to use result library from another modules
136 salomeinclude_DATA= $(STATIDL_SOURCES:%SK.cc=%.hh)
137
138 if WITH_PACO_PARALLEL
139 PAR = SALOME_ComponentPaCO.hxx SALOME_ComponentPaCO.cxx \
140       SALOME_PortsPaCO.hxx SALOME_PortsPaCO.cxx \
141       DSC_EnginesPaCO.hxx DSC_EnginesPaCO.cxx \
142       SALOME_PACOExtensionPaCO.hxx SALOME_PACOExtensionPaCO.cxx \
143       SALOME_ParamPortsPaCO.hxx SALOME_ParamPortsPaCO.cxx
144
145 PAR_INCLUDES = SALOME_Exception.hxx SALOME_GenericObj.hxx SALOMEDS.hxx SALOME_PyNode.hxx
146
147 PAR_LIB = libSalomeParallelIDLKernel.la
148
149 IDL_PACO = SALOME_ComponentPaCO.idl SALOME_PortsPaCO.idl DSC_EnginesPaCO.idl \
150            SALOME_ParamPortsPaCO.idl SALOME_PACOExtensionPaCO.idl
151
152 GEN_PACO = SALOME_ComponentPaCO_Engines_Container_server.cxx \
153            SALOME_ComponentPaCO_Engines_Container_client.cxx \
154            SALOME_ComponentPaCO_Engines_Component_server.cxx \
155            SALOME_ComponentPaCO_Engines_Component_client.cxx \
156            SALOME_ComponentPaCO_Engines_fileTransfer_server.cxx \
157            SALOME_ComponentPaCO_Engines_fileTransfer_client.cxx \
158            SALOME_ComponentPaCO_Engines_Salome_file_server.cxx \
159            SALOME_ComponentPaCO_Engines_Salome_file_client.cxx \
160            SALOME_PortsPaCO_Ports_Port_server.cxx \
161            SALOME_PortsPaCO_Ports_Port_client.cxx \
162            SALOME_PortsPaCO_Ports_Data_Port_server.cxx \
163            SALOME_PortsPaCO_Ports_Data_Port_client.cxx \
164            DSC_EnginesPaCO_Engines_DSC_server.cxx \
165            DSC_EnginesPaCO_Engines_DSC_client.cxx \
166            DSC_EnginesPaCO_Engines_Superv_Component_server.cxx \
167            DSC_EnginesPaCO_Engines_Superv_Component_client.cxx \
168            SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.cxx \
169            SALOME_PACOExtensionPaCO_Engines_Parallel_Component_client.cxx \
170            SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.cxx \
171            SALOME_PACOExtensionPaCO_Engines_PACO_Container_client.cxx \
172            SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.cxx \
173            SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_client.cxx \
174            SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.cxx \
175            SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_client.cxx \
176            SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.cxx \
177            SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.cxx
178
179 INCLUDES_PACO = SALOME_ComponentPaCO_Engines_Container_server.hxx \
180                 SALOME_ComponentPaCO_Engines_Container_client.hxx \
181                 SALOME_ComponentPaCO_Engines_Component_server.hxx \
182                 SALOME_ComponentPaCO_Engines_Component_client.hxx \
183                 SALOME_ComponentPaCO_Engines_fileTransfer_server.hxx \
184                 SALOME_ComponentPaCO_Engines_fileTransfer_client.hxx \
185                 SALOME_ComponentPaCO_Engines_Salome_file_server.hxx \
186                 SALOME_ComponentPaCO_Engines_Salome_file_client.hxx \
187                 SALOME_ComponentPaCO.hxx \
188                 SALOME_Component.hxx \
189                 SALOME_PortsPaCO_Ports_Port_server.hxx \
190                 SALOME_PortsPaCO_Ports_Port_client.hxx \
191                 SALOME_PortsPaCO_Ports_Data_Port_server.hxx \
192                 SALOME_PortsPaCO_Ports_Data_Port_client.hxx \
193                 SALOME_PortsPaCO.hxx \
194                 SALOME_Ports.hxx \
195                 DSC_EnginesPaCO_Engines_DSC_server.hxx \
196                 DSC_EnginesPaCO_Engines_DSC_client.hxx \
197                 DSC_EnginesPaCO_Engines_Superv_Component_server.hxx \
198                 DSC_EnginesPaCO_Engines_Superv_Component_client.hxx \
199                 DSC_EnginesPaCO.hxx \
200                 DSC_Engines.hxx \
201                 SALOME_PACOExtensionPaCO_Engines_Parallel_Component_server.hxx \
202                 SALOME_PACOExtensionPaCO_Engines_Parallel_Component_client.hxx \
203                 SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.hxx \
204                 SALOME_PACOExtensionPaCO_Engines_PACO_Container_client.hxx \
205                 SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_server.hxx \
206                 SALOME_PACOExtensionPaCO_Engines_Parallel_Salome_file_client.hxx \
207                 SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.hxx \
208                 SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_client.hxx \
209                 SALOME_PACOExtensionPaCO.hxx \
210                 SALOME_PACOExtension.hxx \
211                 SALOME_ParamPortsPaCO_Ports_Param_Double_Port_server.hxx \
212                 SALOME_ParamPortsPaCO_Ports_Param_Double_Port_client.hxx \
213                 SALOME_ParamPortsPaCO.hxx \
214                 SALOME_ParamPorts.hxx
215
216 XML           = SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml \
217                 SALOME_PACOExtension.xml SALOME_ParamPorts.xml
218 endif
219
220 idldir = $(prefix)/idl/salome
221 nodist_idl_DATA = ${XML} ${IDL_PACO} Calcium_Ports.idl
222 nodist_salomeinclude_HEADERS = ${INCLUDES_PACO} 
223
224 BUILT_SOURCES = $(IDL_SOURCES) $(PAR_INCLUDES) $(PAR)
225
226 SALOME_ComponentPaCO.idl SALOME_ComponentPaCO.hxx SALOME_ComponentPaCO.cxx : SALOME_Component.idl SALOME_Component.xml
227 SALOME_PortsPaCO.idl SALOME_PortsPaCO.hxx SALOME_PortsPaCO.cxx : SALOME_Ports.idl SALOME_Ports.xml
228 DSC_EnginesPaCO.idl DSC_EnginesPaCO.hxx DSC_EnginesPaCO.cxx : DSC_Engines.idl DSC_Engines.xml
229 SALOME_PACOExtensionPaCO.idl SALOME_PACOExtensionPaCO.hxx SALOME_PACOExtensionPaCO.cxx : SALOME_PACOExtension.idl SALOME_PACOExtension.xml
230 SALOME_ParamPortsPaCO.idl SALOME_ParamPortsPaCO.hxx SALOME_ParamPortsPaCO.cxx : SALOME_ParamPorts.idl SALOME_ParamPorts.xml
231
232 lib_LTLIBRARIES = libSalomeIDLKernel.la $(PAR_LIB)
233
234 nodist_libSalomeIDLKernel_la_SOURCES = $(IDL_SOURCES) $(DYNIDL_SRCS)
235 libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \
236                                 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
237 libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
238 libSalomeIDLKernel_la_LIBADD  = @CORBA_LIBS@
239
240 nodist_libSalomeParallelIDLKernel_la_SOURCES = $(PAR) $(GEN_PACO)
241 libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \
242                                         @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \
243                                         @PACO_INCLUDES@
244 libSalomeParallelIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
245 libSalomeParallelIDLKernel_la_LIBADD  = libSalomeIDLKernel.la @PACO_LIBS@
246
247 # These variables defines the building process of CORBA files
248 IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(srcdir) -I$(top_builddir)/salome/idl
249 IDLPYFLAGS  = @IDLPYFLAGS@ -I$(srcdir)
250
251 # potential problem on parallel make on the following - multiple outputs
252 SUFFIXES = .idl .hh SK.cc
253 .idlSK.cc:
254         $(IDL) $(IDLCXXFLAGS) $<
255 SK.cc.hh:
256
257 #Dummy rule to replace the following one (for parallel make)
258 #.idl.hh:
259 #       $(IDL) $(IDLCXXFLAGS) $<
260
261 if WITH_PACO_PARALLEL
262
263 %PaCO.idl %PaCO.hxx %PaCO.cxx : %.idl %.xml
264         $(IDL) -p@PACOPATH@/lib/python -bpaco -Wb$(top_srcdir)/idl/$*.xml,$(srcdir):@PACOPATH@/idl $(top_srcdir)/idl/$*.idl
265
266 .idl.hxx:
267         $(IDL) $(IDLCXXFLAGS) -Wbh=.hxx -Wbs=.cxx $<
268 endif
269
270 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%) Calcium_Ports.idl
271         $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
272         ls $^ | while read file; do \
273           $(IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
274         done
275 if WITH_PACO_PARALLEL
276         ls $(top_builddir)/idl/*.idl | while read file; do \
277           $(IDL) $(IDLPYFLAGS) -I$(top_srcdir)/idl -I@PACOPATH@/idl -C$(DESTDIR)$(salomepythondir) $$file ; \
278         done
279 endif
280
281 # uninstall-local removes too much, but it works in distcheck
282 uninstall-local:
283         rm -rf $(DESTDIR)$(salomepythondir)/*
284
285 mostlyclean-local:
286         -rm -f *.hh *.cc .depidl Calcium_Ports.idl
287
288 # we use cpp to generate dependencies between idl files.
289 # option x c tells the preprocessor to consider idl as a c file.
290 # if an idl is modified, all idl dependencies are rebuilt
291
292 .depidl: $(IDL_FILES) Calcium_Ports.idl
293         @echo "" > $@
294         @for dep in $^ dummy; do \
295           if [ $$dep != "dummy" ]; then \
296             echo Building dependencies for $$dep; \
297             $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) $$dep 2>/dev/null | \
298             sed 's/\.o/\SK.cc/' >>$@; \
299           fi; \
300         done ;
301
302 -include .depidl
303
304 CLEANFILES = *PaCO* *.hxx *.cxx Calcium_Ports.idl
305
306