Salome HOME
c5c0f0595cc0755eb900e039f726d017ea52bc0e
[modules/smesh.git] / adm_local / unix / make_common_starter.am
1 # Copyright (C) 2007-2013  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 # ============================================================
21 # The following is to avoid PACKAGE_... env variable
22 # redefinition compilation warnings
23 # ============================================================
24 #
25 AM_CXXFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
26 AM_CPPFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
27
28 # ============================================================
29 # This file defines the common definitions used in several
30 # Makefile. This file must be included, if needed, by the file
31 # Makefile.am.
32 # ============================================================
33 # Standard directory for installation
34 #
35 salomeincludedir   = $(includedir)/salome
36 libdir             = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome
37 bindir             = $(prefix)/bin/salome
38 salomescriptdir    = $(bindir)
39 salomepythondir    = $(pythondir)/salome
40 salomepyexecdir    = $(pyexecdir)/salome
41
42 # Root directory of the python packages of SMESH
43 smeshpypkgdir      = $(salomepythondir)/salome/smesh
44
45 # Directory for installing SALOME plugins files
46 salomepluginsdir    = $(prefix)/share/salome/plugins/@MODULE_NAME@
47
48 # Directory for installing idl files
49 salomeidldir       = $(prefix)/idl/salome
50
51 # Directory for installing resource files
52 salomeresdir       = $(prefix)/share/salome/resources/@MODULE_NAME@
53
54 # Directories for installing admin files
55 admlocaldir        = $(prefix)/adm_local
56 admlocalunixdir    = $(admlocaldir)/unix
57 admlocalm4dir      = $(admlocaldir)/unix/config_files
58
59 # Shared modules installation directory
60 sharedpkgpythondir = $(salomepythondir)/shared_modules
61
62 # Documentation directory
63 docdir             = $(datadir)/doc/salome
64
65 # common rules
66
67 # ============================================================
68 # Cmake files wildcard (to add then to the distribution)
69 # ============================================================
70 CMAKEFILES         = $(notdir $(wildcard $(srcdir)/CMakeLists.txt))
71
72 # meta object implementation files generation (moc)
73 %_moc.cxx: %.h
74         $(MOC) $< -o $@
75
76 # translation (*.qm) files generation (lrelease)
77 %.qm: %.ts
78         $(LRELEASE) $< -qm $@
79
80 # resource files generation (qrcc)
81 qrc_%.cxx: %.qrc
82         $(QRCC) $< -o $@ -name $(*F)
83
84 # qt forms files generation (uic)
85 ui_%.h: %.ui
86         $(UIC) -o $@ $<
87
88 # extra distributed files
89 EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(QRC_FILES:qrc_%.cxx=%.qrc) \
90              $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=%.ts) \
91              $(CMAKEFILES)
92
93 # customize clean operation
94 mostlyclean-local:
95         rm -f @builddir@/*_moc.cxx
96         rm -f @builddir@/*.qm
97         rm -f @builddir@/ui_*.h
98         rm -f @builddir@/qrc_*.cxx
99
100 # tests
101 tests: unittest
102
103 unittest: $(UNIT_TEST_PROG)
104         @if test "x$(UNIT_TEST_PROG)" != "x"; then \
105             $(UNIT_TEST_PROG);                     \
106         fi;