Salome HOME
Update copyright information
[modules/smesh.git] / src / Tools / padder / meshjob / idl / Makefile.am
1 # Copyright (C) 2011-2012  CEA/DEN, EDF R&D
2 #
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 # 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.
24 #
25 include $(top_srcdir)/adm_local/unix/make_common_starter.am
26
27 BUILT_SOURCES = MESHJOBSK.cc
28 IDL_FILES = MESHJOB.idl
29
30 # For test purpose, we add a little component:
31 BUILT_SOURCES += SPADDERPluginTestSK.cc
32 IDL_FILES += SPADDERPluginTest.idl
33
34 salomeidl_DATA = $(IDL_FILES) 
35
36 lib_LTLIBRARIES = libSalomeIDLSPADDER.la
37 libSalomeIDLSPADDER_la_SOURCES      =
38 nodist_libSalomeIDLSPADDER_la_SOURCES = $(BUILT_SOURCES)
39 nodist_salomeinclude_HEADERS= $(IDL_FILES:%idl=%hh)
40
41 OMNIORB_CXXFLAGS=@OMNIORB_CXXFLAGS@ @OMNIORB_INCLUDES@
42 OMNIORB_LIBS=@OMNIORB_LIBS@
43
44 libSalomeIDLSPADDER_la_CXXFLAGS = \
45         $(KERNEL_CXXFLAGS) \
46         $(OMNIORB_CXXFLAGS) \
47         -I.
48
49 libSalomeIDLSPADDER_la_LIBADD     = \
50         $(KERNEL_LDFLAGS) -lSalomeIDLKernel \
51         $(OMNIORB_LIBS)
52
53
54 # These variables defines the building process of CORBA files
55 IDLCXXFLAGS = \
56         -bcxx -I. \
57         @OMNIORB_IDLCXXFLAGS@ \
58         -I$(KERNEL_ROOT_DIR)/idl/salome
59
60 IDLPYFLAGS  = \
61         -I. \
62         @OMNIORB_IDLPYFLAGS@ \
63         -I$(KERNEL_ROOT_DIR)/idl/salome
64
65 ##########################################################
66 SUFFIXES = .idl .hh SK.cc
67
68 %SK.cc %.hh : %.idl
69         $(OMNIORB_IDL) $(IDLCXXFLAGS) $<
70
71 %_idl.py : %.idl
72         $(OMNIORB_IDL) $(IDLPYFLAGS)  $<
73
74 CLEANFILES = *.hh *SK.cc *.py *.hxx *.cxx
75
76 EXTRA_DIST += $(IDL_FILES)
77
78 install-data-local: $(IDL_FILES)
79         $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
80         ls $^ | while read file; do \
81         $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
82         done
83
84 uninstall-local:
85         rm -rf $(DESTDIR)$(salomepythondir)/*
86