]> SALOME platform Git repositories - plugins/blsurfplugin.git/blob - idl/Makefile.am
Salome HOME
Issue 0020194: EDF 977 ALL: Get rid of warnings PACKAGE_VERSION already defined
[plugins/blsurfplugin.git] / idl / Makefile.am
1 #  Copyright (C) 2007-2008  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 # File   : Makefile.am
21 # Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
22 # ---
23 # This Makefile is responsible of generating the client and server
24 # implementation of IDL interfaces for both C++ and python usage.
25 # The building process of the C++ files is in charge of each source
26 # package and then is not manage here.
27 #
28 include $(top_srcdir)/adm_local/unix/make_common_starter.am
29
30 BASEIDL_FILES = BLSURFPlugin_Algorithm.idl
31
32 # This variable defines the files to be installed
33 dist_salomeidl_DATA = $(BASEIDL_FILES)
34
35 # GUI idl common library
36 lib_LTLIBRARIES = libSalomeIDLBLSURFPLUGIN.la
37
38 # Sources built from idl files
39 nodist_libSalomeIDLBLSURFPLUGIN_la_SOURCES = BLSURFPlugin_AlgorithmSK.cc
40
41 # header files must be exported: other modules have to use this library
42 nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh)
43
44 libSalomeIDLBLSURFPLUGIN_la_CPPFLAGS = \
45         $(KERNEL_CXXFLAGS) \
46         $(GEOM_CXXFLAGS) \
47         $(SMESH_CXXFLAGS) \
48         @CORBA_CXXFLAGS@ \
49         @CORBA_INCLUDES@ \
50         -I$(top_builddir)/idl
51
52 libSalomeIDLBLSURFPLUGIN_la_LDFLAGS = -no-undefined -version-info=0:0:0
53 libSalomeIDLBLSURFPLUGIN_la_LIBADD  = \
54         $(KERNEL_LDFLAGS) -lSalomeIDLKernel \
55         $(SMESH_LDFLAGS) -lSalomeIDLSMESH \
56         $(GEOM_LDFLAGS) -lSalomeIDLGEOM \
57         @CORBA_LIBS@
58
59 # These variables defines the building process of CORBA files
60 OMNIORB_IDL         = @OMNIORB_IDL@
61 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
62 OMNIORB_IDLPYFLAGS  = @OMNIORB_IDLPYFLAGS@ \
63         -I$(top_builddir)/idl/salome \
64         -I$(KERNEL_ROOT_DIR)/idl/salome \
65         -I$(GEOM_ROOT_DIR)/idl/salome \
66         -I$(SMESH_ROOT_DIR)/idl/salome
67
68 IDLCXXFLAGS = \
69         -bcxx \
70         @IDLCXXFLAGS@ \
71         -I$(top_builddir)/idl/salome \
72         -I$(KERNEL_ROOT_DIR)/idl/salome \
73         -I$(GEOM_ROOT_DIR)/idl/salome \
74         -I$(SMESH_ROOT_DIR)/idl/salome
75 IDLPYFLAGS  = \
76         @IDLPYFLAGS@ \
77         -I$(KERNEL_ROOT_DIR)/idl/salome \
78         -I$(GEOM_ROOT_DIR)/idl/salome \
79         -I$(SMESH_ROOT_DIR)/idl/salome
80
81 # potential problem on parallel make on the following - multiple outputs
82 SUFFIXES = .idl .hh SK.cc
83 .idlSK.cc:
84         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
85 .idl.hh:
86         $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
87
88 install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
89         $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
90         ls $^ | while read file; do \
91           $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
92         done
93
94 # uninstall-local removes too much, but it works in distcheck
95 uninstall-local:
96         rm -rf $(DESTDIR)$(salomepythondir)/*
97
98 mostlyclean-local:
99         -rm -f *.hh *.cc .depidl
100
101 # we use cpp to generate dependencies between idl files.
102 # option x c tells the preprocessor to consider idl as a c file.
103 # if an idl is modified, all idl dependencies are rebuilt
104
105 .depidl: $(BASEIDL_FILES)
106         @echo "" > $@
107         @for dep in $^ dummy; do \
108           if [ $$dep != "dummy" ]; then \
109             echo Building dependencies for $$dep; \
110             $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(SMESH_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \
111             sed 's/\.o/\SK.cc/' >>$@; \
112           fi; \
113         done ;
114
115 -include .depidl