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 \
47 SALOME_MPIObject.idl \
48 SALOME_MPIContainer.idl \
49 SALOME_TestMPIComponent.idl
51 IDL_FILES = $(BASEIDL_FILES)
53 IDL_FILES += $(MPIIDL_FILES)
56 # all the idl files are needed for make dist
57 EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES)
59 # This variable defines the files to be installed
60 salomeidl_DATA = $(IDL_FILES)
62 # Sources built from idl files
63 # BUILT_SOURCE = first thing done on make all
64 # idl dependencies are checked and rebuilt first
67 SALOME_ExceptionSK.cc \
69 SALOME_ModuleCatalogSK.cc \
70 SALOME_RessourcesCatalogSK.cc \
72 SALOMEDS_AttributesSK.cc \
73 SALOME_ComponentSK.cc \
74 SALOME_ContainerManagerSK.cc \
75 SALOME_TestComponentSK.cc \
76 SALOME_RegistrySK.cc \
78 SALOME_GenericObjSK.cc \
80 SALOME_TestModuleCatalogSK.cc \
84 SALOME_MPIObjectSK.cc \
85 SALOME_MPIContainerSK.cc \
86 SALOME_TestMPIComponentSK.cc
88 IDL_SOURCES = $(BASEIDL_SOURCES)
90 IDL_SOURCES += $(MPIIDL_SOURCES)
93 BUILT_SOURCES = $(IDL_SOURCES)
95 lib_LTLIBRARIES = libSalomeIDLKernel.la
96 nodist_libSalomeIDLKernel_la_SOURCES = $(BUILT_SOURCES)
97 libSalomeIDLKernel_la_CPPFLAGS =\
98 -I$(top_builddir)/salome_adm/unix \
99 -I$(top_builddir)/idl \
100 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
101 libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
102 libSalomeIDLKernel_la_LIBADD = @CORBA_LIBS@
104 # These variables defines the building process of CORBA files
105 OMNIORB_IDL = @OMNIORB_IDL@
106 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
107 OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_builddir)/salome/idl
108 IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_builddir)/salome/idl
109 IDLPYFLAGS = @IDLPYFLAGS@
111 # potential problem on parallel make on the following - multiple outputs
112 SUFFIXES = .idl .hh SK.cc
114 $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
116 $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
119 install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%)
120 $(INSTALL) -d $(pkgpythondir)
121 ls $^ | while read file; do \
122 $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \
125 # uninstall-local removes too much, but it works in distcheck
127 rm -rf $(pkgpythondir)/*
130 -rm -f *.hh *.cc .depidl
132 # we use cpp to generate dependencies between idl files.
133 # option x c tells the preprocessor to consider idl as a c file.
134 # if an idl is modified, all idl dependencies are rebuilt
136 .depidl: $(IDL_FILES)
138 @for dep in $^ dummy; do \
139 if [ $$dep != "dummy" ]; then \
140 echo Building dependencies for $$dep; \
141 $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) $$dep 2>/dev/null | \
142 sed 's/\.o/\SK.cc/' >>$@; \