]> SALOME platform Git repositories - modules/kernel.git/blob - idl/Makefile.am
Salome HOME
Calcium and Palm ok
[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   DSC_Engines.idl \
46   SALOME_Ports.idl \
47   Calcium_Ports.idl \
48   Palm_Ports.idl
49
50 MPIIDL_FILES = \
51   SALOME_MPIObject.idl \
52   SALOME_MPIContainer.idl \
53   SALOME_TestMPIComponent.idl  
54
55 IDL_FILES = $(BASEIDL_FILES)
56 if MPI_IS_OK
57   IDL_FILES += $(MPIIDL_FILES)
58 endif
59
60 # all the idl files are needed for make dist
61 EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES)
62
63 # This variable defines the files to be installed
64 salomeidl_DATA = $(IDL_FILES)
65
66 # Sources built from idl files
67 # BUILT_SOURCE = first thing done on make all
68 # idl dependencies are checked and rebuilt first
69
70 BASEIDL_SOURCES =\
71   SALOME_ExceptionSK.cc \
72   SALOME_CommSK.cc \
73   SALOME_ModuleCatalogSK.cc \
74   SALOME_RessourcesCatalogSK.cc \
75   SALOMEDSSK.cc \
76   SALOMEDS_AttributesSK.cc \
77   SALOME_ComponentSK.cc \
78   SALOME_ContainerManagerSK.cc \
79   SALOME_TestComponentSK.cc \
80   SALOME_RegistrySK.cc \
81   LoggerSK.cc \
82   SALOME_GenericObjSK.cc \
83   SALOME_SessionSK.cc \
84   SALOME_TestModuleCatalogSK.cc \
85   nstestSK.cc \
86   DSC_EnginesSK.cc \
87   SALOME_PortsSK.cc \
88   Calcium_PortsSK.cc \
89   Palm_PortsSK.cc
90
91 MPIIDL_SOURCES = \
92   SALOME_MPIObjectSK.cc \
93   SALOME_MPIContainerSK.cc \
94   SALOME_TestMPIComponentSK.cc  
95
96 IDL_SOURCES = $(BASEIDL_SOURCES)
97 if MPI_IS_OK
98   IDL_SOURCES += $(MPIIDL_SOURCES)
99 endif
100
101 BUILT_SOURCES = $(IDL_SOURCES)
102
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@
111
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@
118
119 # potential problem on parallel make on the following - multiple outputs
120 SUFFIXES = .idl .hh SK.cc
121 .idlSK.cc:
122         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
123 .idl.hh:
124         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
125
126
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 ; \
131         done
132
133 # uninstall-local removes too much, but it works in distcheck
134 uninstall-local:
135         rm -rf $(pkgpythondir)/*
136
137 mostlyclean-local:
138         -rm -f *.hh *.cc .depidl
139
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
143
144 .depidl: $(IDL_FILES)
145         @echo "" > $@
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/' >>$@; \
151           fi; \
152         done ;
153
154 -include .depidl
155