1 # Copyright (C) 2007-2012 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
23 # generic rule to put in top module Makefile
24 # (for example with module SALOME, SALOME/Makefile.in and SALOME/src/Makefile.in)
25 # build all lib in all subdir
27 lib:$(SUBDIRS:%=lib_%)
29 $(SUBDIRS:%=lib_%):lib_%:%
32 # build all bin in all subdir
34 @@SETX@; for d in $(SUBDIRS); do \
35 (cd $$d && $(MAKE) $@) || exit 1; \
38 # launch check in all subdir
41 @@SETX@; for d in $(SUBDIRS); do \
42 (cd $$d && $(MAKE) $@) || exit 1; \
45 # copy all header files in common directory
47 @@SETX@; for d in $(SUBDIRS); do \
48 (cd $$d && $(MAKE) $@) || exit 1; \
52 @@SETX@; for d in $(SUBDIRS); do \
53 (cd $$d && $(MAKE) $@) || exit 1; \
56 # copy all idl files in common directory
58 @@SETX@; for d in $(SUBDIRS); do \
59 (cd $$d && $(MAKE) $@) || exit 1; \
65 @@SETX@; for d in $(SUBDIRS); do \
66 (cd $$d && $(MAKE) $@) || exit 1; \
69 # copy all resources files in common directory
70 RESOURCES_FILES_ALL := $(notdir $(wildcard $(srcdir)/resources/*))
71 RESOURCES_FILES_ALL := $(filter-out CVS, $(RESOURCES_FILES_ALL))
72 RESOURCES_FILES_ALL := $(filter-out %.po, $(RESOURCES_FILES_ALL))
73 RESOURCES_FILES_ALL := $(filter-out %.in, $(RESOURCES_FILES_ALL))
74 RESOURCES_FILES ?= $(RESOURCES_FILES_ALL)
76 resources: resources-cp
77 @@SETX@; for d in $(SUBDIRS); do \
78 (cd $$d && $(MAKE) $@) || exit 1; \
81 resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
83 $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%): $(top_builddir)/share/salome/resources/$(MODULE_NAME)/% : %
87 # @if test "X$(top_builddir)" = "X."; then \
88 # ((cd examples && $(MAKE) $@) || exit 1); \
90 # Commented because we need not to make docs when we make BUILD
92 # @if test "X$(top_builddir)" = "X."; then \
93 # ((cd doc && $(MAKE) $@) || exit 1); \
96 install: install-resources
97 @@SETX@; for d in $(SUBDIRS); do \
98 (cd $$d && $(MAKE) $@) || exit 1; \
100 @if test "X$(top_builddir)" = "X."; then \
101 $(LT) --mode=finish $(libdir) ; \
104 uninstall: uninstall-resources
105 @@SETX@; for d in $(SUBDIRS); do \
106 (cd $$d && $(MAKE) $@) || exit 1; \
110 @@SETX@; for d in $(SUBDIRS); do \
111 (cd $$d && $(MAKE) $@) || exit 1; \
115 @@SETX@; for d in $(SUBDIRS); do \
116 (cd $$d && $(MAKE) $@) || exit 1; \
120 @@SETX@; for d in $(SUBDIRS); do \
121 (cd $$d && $(MAKE) $@) || exit 1; \
123 -$(RM) .depend *~ *% core *.core *.bak *.new *.old
126 @@SETX@; for d in $(SUBDIRS); do \
127 (cd $$d && $(MAKE) $@) || exit 1; \
129 -$(RM) $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
132 install-resources: resources-cp
133 # one resources directory for all salome modules
134 $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
135 @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%); do \
136 if test $$f != X; then \
137 ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1); \
141 # Uninstall resources files
143 @for f in X $(RESOURCES_FILES); do \
144 if test $$f != X; then \
145 $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ; \