Salome HOME
cf7ccbd77d594544f55af326d8e24ffe0edaa9d5
[samples/component.git] / idl / Makefile.in
1 #  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 #
20
21 #
22 #
23 #  File   : Makefile.in
24 #  Module : idl
25 top_srcdir=@top_srcdir@
26 top_builddir=..
27 srcdir=@srcdir@
28 VPATH=.:${KERNEL_ROOT_DIR}/idl/salome
29
30 @COMMENCE@
31
32 IDL_FILES = \
33   AddComponent.idl \
34   DivComponent.idl \
35   FactorialComponent.idl \
36   MulComponent.idl \
37   SubComponent.idl \
38   SyrComponent.idl \
39   SyrControlComponent.idl \
40   TypesCheck.idl \
41   DataStreamComponent.idl
42
43 PY_CLIENT_IDL = $(IDL_FILES)
44
45 # we copy all idl file in $(top_builddir)/idl
46 inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
47
48 $(top_builddir)/idl/salome:
49         mkdir $@
50
51 $(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
52 #       $(CP) $< $@
53         cp -f $^ $(top_builddir)/idl/salome
54
55
56 lib: pyidl
57
58 PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
59
60 pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
61
62 $(PYTHON_BUILD_SITE):
63         $(INSTALL) -d  $@
64
65 $(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
66         $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
67
68
69 # install python client (generated from idl file
70 install: install-pyidl install-idl
71
72 # create directory $(idldir) and copy idl files into it
73 install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
74         $(INSTALL) -d  $(idldir)
75         $(INSTALL_DATA) $^ $(idldir)
76
77
78 install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
79         $(INSTALL) -d  $(PYTHON_SITE_INSTALL)
80         @for file in $^ dummy; do \
81           if [ $$file != "dummy" ]; then \
82             $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
83           fi ; \
84         done ;
85
86 #@ CONCLUDE @
87
88 cleandep:
89         -$(RM) .dep*
90
91 distclean:
92         -$(RM) *.py
93         -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
94         -$(RM) Makefile
95