1 # Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
2 # PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
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
21 # This Makefile is responsible of generating the client and server
22 # implementation of IDL interfaces for both C++ and python usage.
23 # The building process of the C++ files is in charge of each source
24 # 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)
66 # all the idl files are needed for make dist
67 EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES) \
68 SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml
70 # This variable defines the files to be installed
71 salomeidl_DATA = $(IDL_FILES)
73 # Sources built from idl files
74 # BUILT_SOURCE = first thing done on make all
75 # idl dependencies are checked and rebuilt first
78 SALOME_ExceptionSK.cc \
80 SALOME_ModuleCatalogSK.cc \
81 SALOME_RessourcesCatalogSK.cc \
83 SALOMEDS_AttributesSK.cc \
84 SALOME_ComponentSK.cc \
85 SALOME_ContainerManagerSK.cc \
86 SALOME_TestComponentSK.cc \
87 SALOME_RegistrySK.cc \
89 SALOME_GenericObjSK.cc \
91 SALOME_TestModuleCatalogSK.cc \
99 SALOME_PortsDynSK.cc Calcium_PortsDynSK.cc SALOME_ContainerManagerDynSK.cc \
100 SALOME_CommDynSK.cc SALOME_RegistryDynSK.cc SALOME_ModuleCatalogDynSK.cc \
101 SALOMEDSDynSK.cc SALOME_SessionDynSK.cc SALOME_RessourcesCatalogDynSK.cc \
102 DSC_EnginesDynSK.cc SALOME_ComponentDynSK.cc SALOME_GenericObjDynSK.cc \
103 Palm_PortsDynSK.cc SALOME_ExceptionDynSK.cc SALOMEDS_AttributesDynSK.cc \
107 SALOME_MPIObjectSK.cc \
108 SALOME_MPIContainerSK.cc \
109 SALOME_TestMPIComponentSK.cc
111 IDL_SOURCES = $(BASEIDL_SOURCES)
113 IDL_SOURCES += $(MPIIDL_SOURCES)
117 STATIDL_SOURCES=$(BASEIDL_SOURCES)
119 STATIDL_SOURCES += $(MPIIDL_SOURCES)
122 $(DYNIDL_SRCS) : $(IDL_SOURCES)
124 # also install all generated headers to use result library from another modules
125 salomeinclude_DATA= $(STATIDL_SOURCES:%SK.cc=%.hh)
127 if WITH_PACO_PARALLEL
128 PAR = SALOME_ExceptionPaCO.h SALOME_ExceptionPaCO.cc \
129 SALOME_ComponentPaCO.h SALOME_ComponentPaCO.cc \
130 SALOME_PortsPaCO.h SALOME_PortsPaCO.cc \
131 DSC_EnginesPaCO.h DSC_EnginesPaCO.cc
133 PAR_LIB = libSalomeParallelIDLKernel.la
135 IDL_PACO = SALOME_ExceptionPaCO.idl SALOME_ComponentPaCO.idl SALOME_PortsPaCO.idl DSC_EnginesPaCO.idl
137 GEN_PACO = SALOME_ComponentPaCO_Engines_Container_server.cc \
138 SALOME_ComponentPaCO_Engines_Container_client.cc \
139 SALOME_ComponentPaCO_Engines_Component_server.cc \
140 SALOME_ComponentPaCO_Engines_Component_client.cc \
141 SALOME_ComponentPaCO_Engines_Parallel_Component_server.cc \
142 SALOME_ComponentPaCO_Engines_Parallel_Component_client.cc \
143 SALOME_ComponentPaCO_Engines_fileTransfer_server.cc \
144 SALOME_ComponentPaCO_Engines_fileTransfer_client.cc \
145 SALOME_ComponentPaCO_Engines_Salome_file_server.cc \
146 SALOME_ComponentPaCO_Engines_Salome_file_client.cc \
147 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.cc \
148 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_client.cc \
149 SALOME_PortsPaCO_Ports_Port_server.cc \
150 SALOME_PortsPaCO_Ports_Port_client.cc \
151 DSC_EnginesPaCO_Engines_DSC_server.cc \
152 DSC_EnginesPaCO_Engines_DSC_client.cc \
153 DSC_EnginesPaCO_Engines_Superv_Component_server.cc \
154 DSC_EnginesPaCO_Engines_Superv_Component_client.cc \
155 DSC_EnginesPaCO_Engines_Parallel_DSC_server.cc \
156 DSC_EnginesPaCO_Engines_Parallel_DSC_client.cc
158 INCLUDES_PACO = SALOME_ComponentPaCO_Engines_Container_server.h \
159 SALOME_ComponentPaCO_Engines_Container_client.h \
160 SALOME_ComponentPaCO_Engines_Component_server.h \
161 SALOME_ComponentPaCO_Engines_Component_client.h \
162 SALOME_ComponentPaCO_Engines_Parallel_Component_server.h \
163 SALOME_ComponentPaCO_Engines_Parallel_Component_client.h \
164 SALOME_ComponentPaCO_Engines_fileTransfer_server.h \
165 SALOME_ComponentPaCO_Engines_fileTransfer_client.h \
166 SALOME_ComponentPaCO_Engines_Salome_file_server.h \
167 SALOME_ComponentPaCO_Engines_Salome_file_client.h \
168 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_server.h \
169 SALOME_ComponentPaCO_Engines_Parallel_Salome_file_client.h \
170 SALOME_ExceptionPaCO.h \
171 SALOME_ComponentPaCO.h \
174 SALOME_PortsPaCO_Ports_Port_server.h \
175 SALOME_PortsPaCO_Ports_Port_client.h \
178 DSC_EnginesPaCO_Engines_DSC_server.h \
179 DSC_EnginesPaCO_Engines_DSC_client.h \
180 DSC_EnginesPaCO_Engines_Superv_Component_server.h \
181 DSC_EnginesPaCO_Engines_Superv_Component_client.h \
182 DSC_EnginesPaCO_Engines_Parallel_DSC_server.h \
183 DSC_EnginesPaCO_Engines_Parallel_DSC_client.h \
187 XML = SALOME_Exception.xml SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml
190 idldir = $(prefix)/idl/salome
191 nodist_idl_DATA = ${XML} ${IDL_PACO}
192 nodist_salomeinclude_HEADERS = ${INCLUDES_PACO}
194 BUILT_SOURCES = $(IDL_SOURCES) $(PAR)
196 SALOME_ExceptionPaCO.h SALOME_ExceptionPaCO.cc : SALOME_Exception.idl SALOME_Exception.xml
197 SALOME_ComponentPaCO.h SALOME_ComponentPaCO.cc : SALOME_Component.idl SALOME_Component.xml
198 SALOME_PortsPaCO.h SALOME_PortsPaCO.cc : SALOME_Ports.idl SALOME_Ports.xml
199 DSC_EnginesPaCO.h DSC_EnginesPaCO.cc : DSC_Engines.idl DSC_Engines.xml
201 lib_LTLIBRARIES = libSalomeIDLKernel.la $(PAR_LIB)
203 nodist_libSalomeIDLKernel_la_SOURCES = $(IDL_SOURCES) $(DYNIDL_SRCS)
204 libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \
205 -I$(top_builddir)/idl \
206 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
207 libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
208 libSalomeIDLKernel_la_LIBADD = @CORBA_LIBS@
210 nodist_libSalomeParallelIDLKernel_la_SOURCES = $(PAR) $(GEN_PACO)
211 libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \
212 -I$(top_builddir)/idl \
213 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \
215 libSalomeParallelIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
216 libSalomeParallelIDLKernel_la_LIBADD = libSalomeIDLKernel.la @PACO_LIBS@
218 # These variables defines the building process of CORBA files
219 OMNIORB_IDL = @OMNIORB_IDL@
220 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
221 OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/salome/idl
222 IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -Wba -I$(top_builddir)/salome/idl
223 IDLPYFLAGS = @IDLPYFLAGS@
225 # potential problem on parallel make on the following - multiple outputs
226 SUFFIXES = .idl .hh SK.cc
228 $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
231 #Dummy rule to replace the following one (for parallel make)
233 # $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
235 %PaCO.h %PaCO.cc : %.idl %.xml
236 @PACO_IDL@ -I $(srcdir):@PACOPATH@/idl $^ omniORB4 0
238 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%)
239 $(INSTALL) -d $(DESTDIR)$(salomepythondir)
240 ls $^ | while read file; do \
241 $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
244 # uninstall-local removes too much, but it works in distcheck
246 rm -rf $(DESTDIR)$(salomepythondir)/*
249 -rm -f *.hh *.cc .depidl
251 # we use cpp to generate dependencies between idl files.
252 # option x c tells the preprocessor to consider idl as a c file.
253 # if an idl is modified, all idl dependencies are rebuilt
255 .depidl: $(IDL_FILES)
257 @for dep in $^ dummy; do \
258 if [ $$dep != "dummy" ]; then \
259 echo Building dependencies for $$dep; \
260 $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) $$dep 2>/dev/null | \
261 sed 's/\.o/\SK.cc/' >>$@; \
267 CLEANFILES = *PaCO* *.h