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
30 SALOME_Exception.idl \
32 SALOME_ModuleCatalog.idl \
33 SALOME_RessourcesCatalog.idl \
35 SALOMEDS_Attributes.idl \
36 SALOME_Component.idl \
37 SALOME_ContainerManager.idl \
38 SALOME_TestComponent.idl \
41 SALOME_GenericObj.idl \
43 SALOME_TestModuleCatalog.idl \
51 SALOME_MPIObject.idl \
52 SALOME_MPIContainer.idl \
53 SALOME_TestMPIComponent.idl
55 IDL_FILES = $(BASEIDL_FILES)
57 IDL_FILES += $(MPIIDL_FILES)
60 # all the idl files are needed for make dist
61 EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES)
63 # This variable defines the files to be installed
64 salomeidl_DATA = $(IDL_FILES)
66 # Sources built from idl files
67 # BUILT_SOURCE = first thing done on make all
68 # idl dependencies are checked and rebuilt first
71 SALOME_ExceptionSK.cc \
73 SALOME_ModuleCatalogSK.cc \
74 SALOME_RessourcesCatalogSK.cc \
76 SALOMEDS_AttributesSK.cc \
77 SALOME_ComponentSK.cc \
78 SALOME_ContainerManagerSK.cc \
79 SALOME_TestComponentSK.cc \
80 SALOME_RegistrySK.cc \
82 SALOME_GenericObjSK.cc \
84 SALOME_TestModuleCatalogSK.cc \
92 SALOME_MPIObjectSK.cc \
93 SALOME_MPIContainerSK.cc \
94 SALOME_TestMPIComponentSK.cc
96 IDL_SOURCES = $(BASEIDL_SOURCES)
98 IDL_SOURCES += $(MPIIDL_SOURCES)
101 BUILT_SOURCES = $(IDL_SOURCES)
103 lib_LTLIBRARIES = libSalomeIDLKernel.la
104 nodist_libSalomeIDLKernel_la_SOURCES = $(BUILT_SOURCES)
105 libSalomeIDLKernel_la_CPPFLAGS =\
106 -I$(top_builddir)/salome_adm/unix \
107 -I$(top_builddir)/idl \
108 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
109 libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
110 libSalomeIDLKernel_la_LIBADD = @CORBA_LIBS@
112 # These variables defines the building process of CORBA files
113 OMNIORB_IDL = @OMNIORB_IDL@
114 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
115 OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/salome/idl
116 IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/salome/idl
117 IDLPYFLAGS = @IDLPYFLAGS@
119 # potential problem on parallel make on the following - multiple outputs
120 SUFFIXES = .idl .hh SK.cc
122 $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
124 $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
127 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%)
128 $(INSTALL) -d $(pkgpythondir)
129 ls $^ | while read file; do \
130 $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \
133 # uninstall-local removes too much, but it works in distcheck
135 rm -rf $(pkgpythondir)/*
138 -rm -f *.hh *.cc .depidl
140 # we use cpp to generate dependencies between idl files.
141 # option x c tells the preprocessor to consider idl as a c file.
142 # if an idl is modified, all idl dependencies are rebuilt
144 .depidl: $(IDL_FILES)
146 @for dep in $^ dummy; do \
147 if [ $$dep != "dummy" ]; then \
148 echo Building dependencies for $$dep; \
149 $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) $$dep 2>/dev/null | \
150 sed 's/\.o/\SK.cc/' >>$@; \