Salome HOME
a0b52b9cb43b4a8df56d318acd7094f7ab523449
[samples/pyhello.git] / idl / Makefile.am
1 #  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
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 BASEIDL_FILES = PYHELLO_Gen.idl
28
29 # This variable defines the files to be installed
30 dist_salomeidl_DATA = $(BASEIDL_FILES)
31
32 # These variables defines the building process of CORBA files
33 OMNIORB_IDL         = @OMNIORB_IDL@
34 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
35 OMNIORB_IDLPYFLAGS  = \
36         @OMNIORB_IDLPYFLAGS@ \
37         -I$(top_builddir)/idl/salome \
38         -I$(KERNEL_ROOT_DIR)/idl/salome
39
40 IDLCXXFLAGS = \
41         -bcxx \
42         @IDLCXXFLAGS@ \
43         -I$(top_builddir)/idl/salome \
44         -I$(KERNEL_ROOT_DIR)/idl/salome
45 IDLPYFLAGS  = \
46         @IDLPYFLAGS@ \
47         -I$(KERNEL_ROOT_DIR)/idl/salome
48
49 install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
50         $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
51         @for file in $^ dummy; do \
52           if [ $$file != "dummy" ]; then \
53              $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
54           fi ; \
55         done ;
56
57 # uninstall-local removes too much, but it works in distcheck
58 uninstall-local:
59         rm -rf $(DESTDIR)$(salomepythondir)/*
60
61 mostlyclean-local:
62         -rm -f *.py
63