Salome HOME
cc6c37f61cfc3b957df354c1a662afb7e030dbd9
[plugins/netgenplugin.git] / idl / Makefile.in
1 #  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
3 #
4 #  This library is free software; you can redistribute it and/or
5 #  modify it under the terms of the GNU Lesser General Public
6 #  License as published by the Free Software Foundation; either
7 #  version 2.1 of the License.
8 #
9 #  This library is distributed in the hope that it will be useful,
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 #  Lesser General Public License for more details.
13 #
14 #  You should have received a copy of the GNU Lesser General Public
15 #  License along with this library; if not, write to the Free Software
16 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 #  See http://www.salome-platform.org/
19 #
20 #
21 # generate dependencies for idl file :
22 #
23
24 # source path
25 top_srcdir=@top_srcdir@
26 top_builddir=..
27 srcdir=@srcdir@
28 VPATH=.:${KERNEL_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome :${SMESH_ROOT_DIR}/idl/salome 
29 #:${MED_ROOT_DIR}/idl/salome
30
31 @COMMENCE@
32
33 IDL_FILES = NETGENPlugin_Algorithm.idl
34
35
36 # copy all idl file in $(top_builddir)/idl
37 inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
38
39 $(top_builddir)/idl/salome:
40         $(INSTALL) -d $@
41
42 $(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
43         cp -f $^ $(top_builddir)/idl/salome
44
45
46 # python wrap
47 lib: pyidl
48
49 PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
50
51 pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
52
53 $(PYTHON_BUILD_SITE):
54         $(INSTALL) -d  $@
55
56 $(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
57         $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
58
59
60 # install python client (generated from idl file)
61 install: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
62         $(INSTALL) -d  $(idldir) $(PYTHON_SITE_INSTALL)
63         $(INSTALL_DATA) $^ $(idldir)
64         @for file in $^ dummy; do \
65           if [ $$file != "dummy" ]; then \
66             $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
67           fi ; \
68         done ;
69
70 uninstall:
71         -$(RM) $(IDL_FILES:%=$(idldir)/%)
72         -$(RM) $(IDL_FILES:%.idl=$(PYTHON_SITE_INSTALL)/%_idl.py)
73
74 # clean
75 cleandep:
76         -$(RM) .dep*
77
78 clean: cleandep
79         -$(RM) $(top_builddir)/idl/salome/*.idl
80         -$(RM) $(PYTHON_BUILD_SITE)/*.py
81
82 distclean: clean
83         -$(RM) Makefile
84