1 # Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
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.
27 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
36 SALOME_Exception.idl \
38 SALOME_ModuleCatalog.idl \
39 SALOME_RessourcesCatalog.idl \
41 SALOMEDS_Attributes.idl \
42 SALOME_Component.idl \
43 SALOME_ContainerManager.idl \
44 SALOME_TestComponent.idl \
47 SALOME_GenericObj.idl \
49 SALOME_TestModuleCatalog.idl \
57 SALOME_MPIObject.idl \
58 SALOME_MPIContainer.idl \
59 SALOME_TestMPIComponent.idl
61 IDL_FILES = $(BASEIDL_FILES)
63 IDL_FILES += $(MPIIDL_FILES)
70 # all the idl files are needed for make dist
71 EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES) $(OTHER_IDL_FILES) \
72 SALOME_Exception.xml SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml
74 # This variable defines the files to be installed
75 salomeidl_DATA = $(IDL_FILES)
77 # Sources built from idl files
78 # BUILT_SOURCE = first thing done on make all
79 # idl dependencies are checked and rebuilt first
82 SALOME_ExceptionSK.cc \
84 SALOME_ModuleCatalogSK.cc \
85 SALOME_RessourcesCatalogSK.cc \
87 SALOMEDS_AttributesSK.cc \
88 SALOME_ComponentSK.cc \
89 SALOME_ContainerManagerSK.cc \
90 SALOME_TestComponentSK.cc \
91 SALOME_RegistrySK.cc \
93 SALOME_GenericObjSK.cc \
95 SALOME_TestModuleCatalogSK.cc \
103 SALOME_PortsDynSK.cc Calcium_PortsDynSK.cc SALOME_ContainerManagerDynSK.cc \
104 SALOME_CommDynSK.cc SALOME_RegistryDynSK.cc SALOME_ModuleCatalogDynSK.cc \
105 SALOMEDSDynSK.cc SALOME_SessionDynSK.cc SALOME_RessourcesCatalogDynSK.cc \
106 DSC_EnginesDynSK.cc SALOME_ComponentDynSK.cc SALOME_GenericObjDynSK.cc \
107 Palm_PortsDynSK.cc SALOME_ExceptionDynSK.cc SALOMEDS_AttributesDynSK.cc \
111 SALOME_MPIObjectSK.cc \
112 SALOME_MPIContainerSK.cc \
113 SALOME_TestMPIComponentSK.cc
115 IDL_SOURCES = $(BASEIDL_SOURCES)
117 IDL_SOURCES += $(MPIIDL_SOURCES)
121 STATIDL_SOURCES=$(BASEIDL_SOURCES)
123 STATIDL_SOURCES += $(MPIIDL_SOURCES)
126 $(DYNIDL_SRCS) : $(IDL_SOURCES)
128 # also install all generated headers to use result library from another modules
129 salomeinclude_DATA= $(STATIDL_SOURCES:%SK.cc=%.hh)
131 if WITH_PACO_PARALLEL
132 PAR = SALOME_ExceptionPaCO.h SALOME_ExceptionPaCO.cc \
133 SALOME_ComponentPaCO.h SALOME_ComponentPaCO.cc \
134 SALOME_PortsPaCO.h SALOME_PortsPaCO.cc \
135 DSC_EnginesPaCO.h DSC_EnginesPaCO.cc
137 PAR_LIB = libSalomeParallelIDLKernel.la
139 IDL_PACO = SALOME_ExceptionPaCO.idl SALOME_ComponentPaCO.idl SALOME_PortsPaCO.idl DSC_EnginesPaCO.idl
141 GEN_PACO = SALOME_ComponentPaCO_Engines_Container_server.cc \
142 SALOME_ComponentPaCO_Engines_Container_client.cc \
143 SALOME_ComponentPaCO_Engines_Component_server.cc \
144 SALOME_ComponentPaCO_Engines_Component_client.cc \
145 SALOME_ComponentPaCO_Engines_Parallel_Component_server.cc \
146 SALOME_ComponentPaCO_Engines_Parallel_Component_client.cc \
147 SALOME_ComponentPaCO_Engines_fileTransfer_server.cc \
148 SALOME_ComponentPaCO_Engines_fileTransfer_client.cc \
149 SALOME_ComponentPaCO_Engines_Salome_file_server.cc \
150 SALOME_ComponentPaCO_Engines_Salome_file_client.cc \
151 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.cc \
152 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_client.cc \
153 SALOME_PortsPaCO_Ports_Port_server.cc \
154 SALOME_PortsPaCO_Ports_Port_client.cc \
155 DSC_EnginesPaCO_Engines_DSC_server.cc \
156 DSC_EnginesPaCO_Engines_DSC_client.cc \
157 DSC_EnginesPaCO_Engines_Superv_Component_server.cc \
158 DSC_EnginesPaCO_Engines_Superv_Component_client.cc \
159 DSC_EnginesPaCO_Engines_Parallel_DSC_server.cc \
160 DSC_EnginesPaCO_Engines_Parallel_DSC_client.cc
162 INCLUDES_PACO = SALOME_ComponentPaCO_Engines_Container_server.h \
163 SALOME_ComponentPaCO_Engines_Container_client.h \
164 SALOME_ComponentPaCO_Engines_Component_server.h \
165 SALOME_ComponentPaCO_Engines_Component_client.h \
166 SALOME_ComponentPaCO_Engines_Parallel_Component_server.h \
167 SALOME_ComponentPaCO_Engines_Parallel_Component_client.h \
168 SALOME_ComponentPaCO_Engines_fileTransfer_server.h \
169 SALOME_ComponentPaCO_Engines_fileTransfer_client.h \
170 SALOME_ComponentPaCO_Engines_Salome_file_server.h \
171 SALOME_ComponentPaCO_Engines_Salome_file_client.h \
172 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.h \
173 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_client.h \
174 SALOME_ExceptionPaCO.h \
175 SALOME_ComponentPaCO.h \
178 SALOME_PortsPaCO_Ports_Port_server.h \
179 SALOME_PortsPaCO_Ports_Port_client.h \
182 DSC_EnginesPaCO_Engines_DSC_server.h \
183 DSC_EnginesPaCO_Engines_DSC_client.h \
184 DSC_EnginesPaCO_Engines_Superv_Component_server.h \
185 DSC_EnginesPaCO_Engines_Superv_Component_client.h \
186 DSC_EnginesPaCO_Engines_Parallel_DSC_server.h \
187 DSC_EnginesPaCO_Engines_Parallel_DSC_client.h \
191 XML = SALOME_Exception.xml SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml
194 idldir = $(prefix)/idl/salome
195 nodist_idl_DATA = ${XML} ${IDL_PACO}
196 nodist_salomeinclude_HEADERS = ${INCLUDES_PACO}
198 BUILT_SOURCES = $(IDL_SOURCES) $(PAR)
200 SALOME_ExceptionPaCO.h SALOME_ExceptionPaCO.cc : SALOME_Exception.idl SALOME_Exception.xml
201 SALOME_ComponentPaCO.h SALOME_ComponentPaCO.cc : SALOME_Component.idl SALOME_Component.xml
202 SALOME_PortsPaCO.h SALOME_PortsPaCO.cc : SALOME_Ports.idl SALOME_Ports.xml
203 DSC_EnginesPaCO.h DSC_EnginesPaCO.cc : DSC_Engines.idl DSC_Engines.xml
205 lib_LTLIBRARIES = libSalomeIDLKernel.la $(PAR_LIB)
207 nodist_libSalomeIDLKernel_la_SOURCES = $(IDL_SOURCES) $(DYNIDL_SRCS)
208 libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \
209 -I$(top_builddir)/idl \
210 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
211 libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
212 libSalomeIDLKernel_la_LIBADD = @CORBA_LIBS@
214 nodist_libSalomeParallelIDLKernel_la_SOURCES = $(PAR) $(GEN_PACO)
215 libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \
216 -I$(top_builddir)/idl \
217 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \
219 libSalomeParallelIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
220 libSalomeParallelIDLKernel_la_LIBADD = libSalomeIDLKernel.la @PACO_LIBS@
222 # These variables defines the building process of CORBA files
223 OMNIORB_IDL = @OMNIORB_IDL@
224 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
225 OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/salome/idl
226 IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -Wba -I$(top_builddir)/salome/idl
227 IDLPYFLAGS = @IDLPYFLAGS@
229 # potential problem on parallel make on the following - multiple outputs
230 SUFFIXES = .idl .hh SK.cc
232 $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
235 #Dummy rule to replace the following one (for parallel make)
237 # $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
239 %PaCO.h %PaCO.cc : %.idl %.xml
240 @PACO_IDL@ -I $(srcdir):@PACOPATH@/idl $^ omniORB4 0
242 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%)
243 $(INSTALL) -d $(DESTDIR)$(salomepythondir)
244 ls $^ | while read file; do \
245 $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
248 # uninstall-local removes too much, but it works in distcheck
250 rm -rf $(DESTDIR)$(salomepythondir)/*
253 -rm -f *.hh *.cc .depidl
255 # we use cpp to generate dependencies between idl files.
256 # option x c tells the preprocessor to consider idl as a c file.
257 # if an idl is modified, all idl dependencies are rebuilt
259 .depidl: $(IDL_FILES)
261 @for dep in $^ dummy; do \
262 if [ $$dep != "dummy" ]; then \
263 echo Building dependencies for $$dep; \
264 $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) $$dep 2>/dev/null | \
265 sed 's/\.o/\SK.cc/' >>$@; \
271 CLEANFILES = *PaCO* *.h