1 # Copyright (C) 2011-2012 CEA/DEN, EDF R&D
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
20 # This Makefile is responsible of generating the client and server
21 # implementation of IDL interfaces for both C++ and python usage.
22 # The building process of the C++ files is in charge of each source
23 # package and then is not manage here.
25 include $(top_srcdir)/adm_local/unix/make_common_starter.am
27 BUILT_SOURCES = MESHJOBSK.cc
28 IDL_FILES = MESHJOB.idl
30 # For test purpose, we add a little component:
31 BUILT_SOURCES += SPADDERPluginTestSK.cc
32 IDL_FILES += SPADDERPluginTest.idl
34 IDL_FILES_PY=$(IDL_FILES:%.idl=%_idl.py)
36 salomeidl_DATA = $(IDL_FILES)
38 lib_LTLIBRARIES = libSalomeIDLSPADDER.la
39 libSalomeIDLSPADDER_la_SOURCES =
40 nodist_libSalomeIDLSPADDER_la_SOURCES = $(BUILT_SOURCES)
41 nodist_salomeinclude_HEADERS= $(IDL_FILES:%idl=%hh)
43 OMNIORB_CXXFLAGS=@OMNIORB_CXXFLAGS@ @OMNIORB_INCLUDES@
44 OMNIORB_LIBS=@OMNIORB_LIBS@
46 libSalomeIDLSPADDER_la_CXXFLAGS = \
51 libSalomeIDLSPADDER_la_LIBADD = \
52 $(KERNEL_LDFLAGS) -lSalomeIDLKernel \
56 # These variables defines the building process of CORBA files
59 @OMNIORB_IDLCXXFLAGS@ \
60 -I$(KERNEL_ROOT_DIR)/idl/salome
64 @OMNIORB_IDLPYFLAGS@ \
65 -I$(KERNEL_ROOT_DIR)/idl/salome
67 ##########################################################
68 SUFFIXES = .idl .hh SK.cc
71 $(OMNIORB_IDL) $(IDLCXXFLAGS) $<
74 $(OMNIORB_IDL) $(IDLPYFLAGS) $<
76 CLEANFILES = *.hh *SK.cc *.py *.hxx *.cxx
78 EXTRA_DIST += $(IDL_FILES)
80 install-data-local: $(IDL_FILES)
81 $(INSTALL) -d $(DESTDIR)$(salomepythondir)
82 ls $^ | while read file; do \
83 $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
86 # we want to remove only staff generated for IDL files and nothing more
88 @for modulen in MESHJOB SPADDERPluginTest ; do \
89 test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \
90 test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \
92 for filen in $(IDL_FILES_PY) ; do \
93 echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \