]> SALOME platform Git repositories - modules/kernel.git/blob - idl/Makefile.am
Salome HOME
a09c9c622b92281f7fe26987515c8b9040e137ca
[modules/kernel.git] / idl / Makefile.am
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.
7
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.
12
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
16
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
19
20 #
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.
25 #
26
27 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
28
29 BASEIDL_FILES = \
30   SALOME_Exception.idl \
31   SALOME_Comm.idl \
32   SALOME_ModuleCatalog.idl \
33   SALOME_RessourcesCatalog.idl \
34   SALOMEDS.idl \
35   SALOMEDS_Attributes.idl \
36   SALOME_Component.idl \
37   SALOME_ContainerManager.idl \
38   SALOME_TestComponent.idl \
39   SALOME_Registry.idl \
40   Logger.idl \
41   SALOME_GenericObj.idl \
42   SALOME_Session.idl \
43   SALOME_TestModuleCatalog.idl \
44   nstest.idl
45
46 MPIIDL_FILES = \
47   SALOME_MPIObject.idl \
48   SALOME_MPIContainer.idl \
49   SALOME_TestMPIComponent.idl  
50
51 IDL_FILES = $(BASEIDL_FILES)
52 if MPI_IS_OK
53   IDL_FILES += $(MPIIDL_FILES)
54 endif
55
56 # all the idl files are needed for make dist
57 EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES)
58
59 # This variable defines the files to be installed
60 salomeidl_DATA = $(IDL_FILES)
61
62 # Sources built from idl files
63 # BUILT_SOURCE = first thing done on make all
64 # idl dependencies are checked and rebuilt first
65
66 BASEIDL_SOURCES =\
67   SALOME_ExceptionSK.cc \
68   SALOME_CommSK.cc \
69   SALOME_ModuleCatalogSK.cc \
70   SALOME_RessourcesCatalogSK.cc \
71   SALOMEDSSK.cc \
72   SALOMEDS_AttributesSK.cc \
73   SALOME_ComponentSK.cc \
74   SALOME_ContainerManagerSK.cc \
75   SALOME_TestComponentSK.cc \
76   SALOME_RegistrySK.cc \
77   LoggerSK.cc \
78   SALOME_GenericObjSK.cc \
79   SALOME_SessionSK.cc \
80   SALOME_TestModuleCatalogSK.cc \
81   nstestSK.cc
82
83 MPIIDL_SOURCES = \
84   SALOME_MPIObjectSK.cc \
85   SALOME_MPIContainerSK.cc \
86   SALOME_TestMPIComponentSK.cc  
87
88 IDL_SOURCES = $(BASEIDL_SOURCES)
89 if MPI_IS_OK
90   IDL_SOURCES += $(MPIIDL_SOURCES)
91 endif
92
93 BUILT_SOURCES = $(IDL_SOURCES)
94
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@
103
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@
110
111 # potential problem on parallel make on the following - multiple outputs
112 SUFFIXES = .idl .hh SK.cc
113 .idlSK.cc:
114         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
115 .idl.hh:
116         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
117
118
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 ; \
123         done
124
125 # uninstall-local removes too much, but it works in distcheck
126 uninstall-local:
127         rm -rf $(pkgpythondir)/*
128
129 mostlyclean-local:
130         -rm -f *.hh *.cc .depidl
131
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
135
136 .depidl: $(IDL_FILES)
137         @echo "" > $@
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/' >>$@; \
143           fi; \
144         done ;
145
146 -include .depidl
147