1 # Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # generic rule to put in top module Makefile
23 # (for example with module SALOME, SALOME/Makefile.in and SALOME/src/Makefile.in)
24 # build all lib in all subdir
26 lib:$(SUBDIRS:%=lib_%)
28 $(SUBDIRS:%=lib_%):lib_%:%
31 # build all bin in all subdir
33 @@SETX@; for d in $(SUBDIRS); do \
34 (cd $$d && $(MAKE) $@) || exit 1; \
37 # launch check in all subdir
40 @@SETX@; for d in $(SUBDIRS); do \
41 (cd $$d && $(MAKE) $@) || exit 1; \
44 # copy all header files in common directory
46 @@SETX@; for d in $(SUBDIRS); do \
47 (cd $$d && $(MAKE) $@) || exit 1; \
51 @@SETX@; for d in $(SUBDIRS); do \
52 (cd $$d && $(MAKE) $@) || exit 1; \
55 # copy all idl files in common directory
57 @@SETX@; for d in $(SUBDIRS); do \
58 (cd $$d && $(MAKE) $@) || exit 1; \
64 @@SETX@; for d in $(SUBDIRS); do \
65 (cd $$d && $(MAKE) $@) || exit 1; \
68 # copy all resources files in common directory
69 RESOURCES_FILES_ALL := $(notdir $(wildcard $(srcdir)/resources/*))
70 RESOURCES_FILES_ALL := $(filter-out CVS, $(RESOURCES_FILES_ALL))
71 RESOURCES_FILES_ALL := $(filter-out %.po, $(RESOURCES_FILES_ALL))
72 RESOURCES_FILES_ALL := $(filter-out %.in, $(RESOURCES_FILES_ALL))
73 RESOURCES_FILES ?= $(RESOURCES_FILES_ALL)
75 resources: resources-cp
76 @@SETX@; for d in $(SUBDIRS); do \
77 (cd $$d && $(MAKE) $@) || exit 1; \
80 resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
82 $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%): $(top_builddir)/share/salome/resources/$(MODULE_NAME)/% : %
86 # @if test "X$(top_builddir)" = "X."; then \
87 # ((cd examples && $(MAKE) $@) || exit 1); \
89 # Commented because we need not to make docs when we make BUILD
91 # @if test "X$(top_builddir)" = "X."; then \
92 # ((cd doc && $(MAKE) $@) || exit 1); \
95 install: install-resources
96 @@SETX@; for d in $(SUBDIRS); do \
97 (cd $$d && $(MAKE) $@) || exit 1; \
99 @if test "X$(top_builddir)" = "X."; then \
100 $(LT) --mode=finish $(libdir) ; \
103 uninstall: uninstall-resources
104 @@SETX@; for d in $(SUBDIRS); do \
105 (cd $$d && $(MAKE) $@) || exit 1; \
109 @@SETX@; for d in $(SUBDIRS); do \
110 (cd $$d && $(MAKE) $@) || exit 1; \
114 @@SETX@; for d in $(SUBDIRS); do \
115 (cd $$d && $(MAKE) $@) || exit 1; \
119 @@SETX@; for d in $(SUBDIRS); do \
120 (cd $$d && $(MAKE) $@) || exit 1; \
122 -$(RM) .depend *~ *% core *.core *.bak *.new *.old
125 @@SETX@; for d in $(SUBDIRS); do \
126 (cd $$d && $(MAKE) $@) || exit 1; \
128 -$(RM) $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
131 install-resources: resources-cp
132 # one resources directory for all salome modules
133 $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
134 @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%); do \
135 if test $$f != X; then \
136 ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1); \
140 # Uninstall resources files
142 @for f in X $(RESOURCES_FILES); do \
143 if test $$f != X; then \
144 $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ; \