Salome HOME
To see which hdf5 we're using in configure log
[modules/kernel.git] / salome_adm / unix / DEPRECATED / make_conclude.in
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
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.
10 #
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.
15 #
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
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 #=======================================================================
23 # This section of this makefile comes from the file 
24 # 'adm/unix/make_conclude' which was generated with config.status
25 # from file adm/unix/make_conclude.in
26 #=======================================================================
27 # -* Makefile *- 
28 # Authors : Patrick GOLDBRONN (CEA) - Marc Tajchman (CEA)
29 # Date : 6/07/2001
30 # $Header$
31 # ORB Specifics rules
32 #
33 @CORBA@
34
35 # transform idl reference in appropriate obj file
36 LIB_CLIENT_SRC = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX)) $(LIB_CLIENT_IDL:%.idl=%DynSK.cc)
37 LIB_SERVER_SRC = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_CXX))
38 LIB_MOC_SRC = $(LIB_MOC:%.h=%_moc.cxx)
39 LIB_SRC+=$(LIB_MOC_SRC)
40 LIB_SWIG_SRC = $(SWIG_DEF:%.i=%_wrap.cxx)
41 LIB_DEP= $(LIB_SRC) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(LIB_SWIG_SRC)
42  
43 LIB_CLIENT_OBJ = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ)) $(LIB_CLIENT_IDL:%.idl=%DynSK.o)
44 LIB_SERVER_OBJ = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ))
45
46  
47 # transform c file in appropriate libtool obj file (.c, .cc and .cxx)
48 LIB_OBJ_C   = $(patsubst %.c,   %.lo, $(filter %.c, $(LIB_SRC))) 
49 LIB_OBJ_CC  = $(patsubst %.cc,  %.lo, $(filter %.cc, $(LIB_SRC))) 
50 LIB_OBJ_CXX = $(patsubst %.cxx, %.lo, $(filter %.cxx, $(LIB_SRC))) 
51 LIB_SWIG_OBJ = $(LIB_SWIG_SRC:%.cxx=%.lo)
52 LIB_OBJ_F    = $(patsubst %.f,   %.lo, $(filter %.f, $(LIB_SRC))) 
53
54 # all libtool obj file in library
55 LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F)
56
57 # LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la)
58 LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la, $(filter %.la, $(LIB)))
59 LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a, $(filter %.a, $(LIB)))
60 LIB_BUILD_SO = $(patsubst %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.so, $(filter %.so, $(LIB)))
61
62 ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),)
63 LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB)))
64 else
65 LIB_SWIG = 
66 endif
67
68 lib: $(LIB_BUILD) $(LIB_BUILD_SO) $(LIB_CLIENT_PY)
69 # we don't build static library !
70
71 $(LIB_BUILD): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la: %.la
72         -$(RM) $@
73         -$(RM) $(patsubst %.la, %.so, $@)
74         -$(RM) $(patsubst %.la, %.a, $@)
75         ln -sf $(CURDIR)/$< $@ || true
76         ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \
77               $(patsubst %.la, %.so, $@) || true
78         ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \
79               $(patsubst %.la, %.so, $@).0 || true
80
81         if test "X$(LIB_SWIG)" != "X"; then \
82            ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/_$(LIB_SWIG) || true;\
83         fi;
84
85 $(LIB_BUILD_A): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a: %.a
86         -$(RM) $@
87         ln -sf $(CURDIR)/$< $@ || true
88
89 $(LIB_BUILD_SO): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.so: %.so
90         -$(RM) $@
91         ln -sf $(CURDIR)/$< $@ || true
92
93 $(LIB): $(LIB_OBJ)
94         @$(LT) --mode=link $(CXX) -shared -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
95
96 # transform idl reference in appropriate obj file
97 BIN_CLIENT_SRC = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX)) $(BIN_CLIENT_IDL:%.idl=%DynSK.cc)
98 BIN_SERVER_SRC = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_CXX))
99 BIN_MOC_SRC = $(BIN_MOC:%.h=%_moc.cxx)
100 BIN_SRC+=$(BIN_MOC_SRC)
101 BIN_DEP=$(BIN:%=%.cxx) $(BIN_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
102
103 BIN_CLIENT_OBJ = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ)) $(BIN_CLIENT_IDL:%.idl=%DynSK.o)
104 BIN_SERVER_OBJ = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ)) 
105 # transform c file in appropriate libtool obj file (.c)
106 BIN_OBJ_C =  $(patsubst %.c,  %.o, $(filter %.c, $(BIN_SRC)))
107 # transform c++ file in appropriate libtool obj file (.cc and .cxx)
108 BIN_OBJ_CC = $(patsubst %.cc,  %.o, $(filter %.cc, $(BIN_SRC)))
109 BIN_OBJ_CXX = $(patsubst %.cxx,  %.o, $(filter %.cxx, $(BIN_SRC)))
110 # all obj file in bin target
111 BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ) 
112
113 bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts
114
115 BIN_LIB=$(LIB:lib%.la=-l%)
116
117 $(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: %
118         -$(RM) $@
119         ln -sf $(CURDIR)/$< $@
120
121 $(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ)
122         $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN)
123
124 # copy python scripts in $(top_builddir)/bin/salome
125 #
126
127 UI_FILES = $(notdir $(wildcard $(srcdir)/*.ui))
128 UI_PY_FILES_PY = $(patsubst %.ui, %.py, $(UI_FILES))
129 UI_PY_FILES = $(filter-out $(EXPORT_PYSCRIPTS) ,$(UI_PY_FILES_PY))
130
131 DEST_PYSCRIPTS = $(EXPORT_PYSCRIPTS:%=$(top_builddir)/bin/salome/%)
132 DEST_UI_PY_FILES = $(UI_PY_FILES:%=$(top_builddir)/bin/salome/%)
133 pyscripts: $(DEST_PYSCRIPTS) $(UI_PY_FILES) $(DEST_UI_PY_FILES)
134 $(DEST_PYSCRIPTS): $(top_builddir)/bin/salome/%: %
135         cp -f $< $@
136
137 # generate generic python scripts from *.ui files
138 #
139 $(UI_PY_FILES): %.py: %.ui
140         $(PYUIC) $< -o $@
141
142 # copy ui-generated python scripts in $(top_builddir)/bin
143 #
144 $(DEST_UI_PY_FILES): $(top_builddir)/bin/salome/%: %
145         cp -f $< $@
146
147 # copy pyqt files in $(PYTHON_SHARED_SITE)
148 #
149 PYTHON_SHARED_SITE=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
150
151 $(PYTHON_SHARED_SITE):
152         $(INSTALL) -d  $@
153
154 DEST_SHAREDPYSCRIPTS = $(EXPORT_SHAREDPYSCRIPTS:%=$(PYTHON_SHARED_SITE)/%)
155 sharedpyscripts: $(PYTHON_SHARED_SITE) $(DEST_SHAREDPYSCRIPTS)
156 $(DEST_SHAREDPYSCRIPTS): $(PYTHON_SHARED_SITE)/%: %
157         cp -f $< $@
158
159 check: test
160
161 tests: unittest
162
163 test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%) 
164
165 unittest: 
166         @if test "x$(UNIT_TEST_PROG)" != "x"; then      \
167            $(top_builddir)/bin/salome/$(UNIT_TEST_PROG); \
168         fi;
169
170 # copy header file in $(inc_builddir)
171 #
172 DEST_HEADERS = $(EXPORT_HEADERS:%=$(inc_builddir)/%)
173 inc: $(DEST_HEADERS)
174 $(DEST_HEADERS): $(inc_builddir)/%: %
175         cp -f $< $@
176
177 # build resources file (icons and messages) : .qm file from .po file
178 RESOURCES_FILES_ALL := $(notdir $(wildcard $(srcdir)/resources/*))
179 RESOURCES_FILES_ALL := $(filter-out CVS, $(RESOURCES_FILES_ALL))
180 RESOURCES_FILES_ALL := $(filter-out %.po, $(RESOURCES_FILES_ALL))
181 RESOURCES_FILES_ALL := $(filter-out %.in, $(RESOURCES_FILES_ALL))
182 RESOURCES_FILES ?= $(RESOURCES_FILES_ALL)
183
184 resources: resources-po resources-cp 
185
186 resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
187
188 resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
189
190 $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%): $(top_builddir)/share/salome/resources/$(MODULE_NAME)/% : %
191         cp -fr $< $@;
192
193 # Make installation directories if they don't exist.
194 $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir):
195         $(INSTALL) -d $@ && chmod 755 $@
196
197 # Install the library, the public header files, and programs.
198 install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm install-res
199         @for f in X $(LIB); do                                                \
200            if test $$f != X; then                                             \
201               ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1);                  \
202            fi;                                                                \
203         done
204         @if test "X$(LIB_SWIG)" != "X"; then                                  \
205           (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG)  || true); \
206         fi;                                                                   
207         @for f in X $(BIN); do                                                \
208            if test $$f != X; then                                             \
209              ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
210            fi;                                                                \
211         done
212 # Install tests programmes in bindir
213         @for f in X $(TEST_PROGS); do                                         \
214            if test $$f != X; then                                             \
215              ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
216            fi;                                                                \
217         done
218 # Install exported includes in includedir
219         @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do                       \
220            if test $$f != X; then                                             \
221              (cp -p -f $$f $(includedir) || exit 1);                          \
222            fi;                                                                \
223         done
224
225 # Install python script in $(bindir)
226 install-python: $(bindir) $(EXPORT_PYSCRIPTS:%=install-%) $(UI_PY_FILES:%=install-%)
227
228 $(UI_PY_FILES:%=install-%): install-%: %
229         $(INSTALL_PROGRAM) $< $(bindir)/.
230
231 $(EXPORT_PYSCRIPTS:%=install-%): install-%: %
232         $(INSTALL_PROGRAM) $< $(bindir)/.
233
234 #install-python: $(bindir) $(EXPORT_PYSCRIPTS)
235 #       @for f in X $(EXPORT_PYSCRIPTS); do                           \
236 #          if test $$f != X; then                                     \
237 #            ($(INSTALL_PROGRAM) $$f $(bindir)/. || exit 1);          \
238 #          fi;                                                        \
239 #       done
240
241 # Install pyqt script in $(install-sharedpyqt)
242 install-sharedpyqt: $(sharedpydir) $(EXPORT_SHAREDPYSCRIPTS:%=install-%) 
243
244 $(EXPORT_SHAREDPYSCRIPTS:%=install-%): install-%: %
245         $(INSTALL_PROGRAM) $< $(sharedpydir)/.
246
247
248 # generic rule to install .qm files :
249 install-qm: resources
250         $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
251         @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm); do \
252            if test $$f != X; then                                                        \
253              ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1);                      \
254            fi;                                                                           \
255         done
256
257 # generic rule to install resources files (png, ini ...):
258 install-res: resources
259         $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
260         @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%); do \
261            if test $$f != X; then                                                        \
262              ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1);                      \
263            fi;                                                                           \
264         done  
265
266 # Removes those things that `make install' (would have) installed.
267 uninstall:
268         @if test "X$(LIB)" != X; then                                         \
269            for f in $(LIB); do                                                \
270               $(LT_UNINSTALL) $(libdir)/$$f;                                  \
271            done;                                                              \
272         fi
273         @if test "X$(BIN)" != X; then                                         \
274            for f in $(BIN); do                                                \
275               $(LT_UNINSTALL) $(bindir)/$$f;                                  \
276            done;                                                              \
277         fi
278         @for f in X $(TEST_PROGS); do                                         \
279            if test $$f != X; then                                             \
280              $(LT_UNINSTALL) $(bindir)/$$f;                                   \
281            fi;                                                                \
282         done
283 # Uninstall exported includes in includedir
284         @for f in X $(EXPORT_HEADERS); do                                     \
285            if test $$f != X; then                                             \
286              $(LT_UNINSTALL) $(includedir)/$$f;                               \
287            fi;                                                                \
288         done
289 # Uninstall python script in $(bindir)
290         @for f in X $(EXPORT_PYSCRIPTS); do                                   \
291            if test $$f != X; then                                             \
292              $(LT_UNINSTALL) $(bindir)/$$f ;                  \
293            fi;                                                                \
294         done
295
296 # Uninstall python script in $(bindir)
297         @for f in X $(UI_PY_FILES); do                                        \
298            if test $$f != X; then                                             \
299              $(LT_UNINSTALL) $(bindir)/$$f ;                  \
300            fi;                                                                \
301         done
302
303 # Uninstall pyqt script in $(sharedpydir)
304         @for f in X $(EXPORT_SHAREDPYSCRIPTS); do                                     \
305            if test $$f != X; then                                             \
306              $(LT_UNINSTALL) $(sharedpydir)/$$f ;                     \
307            fi;                                                                \
308         done
309
310 # Uninstall qm files
311         @for f in X $(PO_FILES:%.po=%.qm); do         \
312            if test $$f != X; then                                             \
313              $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ;                        \
314            fi;                                                                \
315         done
316
317 # remove all dependencies files
318 #
319 cleandep:
320         -$(RM) .dep*
321
322 # Removes temporary files without removing the final target files.  That is,
323 # remove things like object files but not libraries or executables.
324 #
325 mostlyclean: cleandep
326         -$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o)
327         -$(RM) $(BIN_OBJ) $(BIN:%=%.o)
328         -$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o)
329         -$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN)
330
331 # Like `mostlyclean' except it also removes the final targets: things like
332 # libraries and executables.  This target doesn't remove any file that
333 # is part of the SALOME distribution.
334 #
335 clean: mostlyclean
336         -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN)
337         -$(RM) TAGS *~ *# core *.core 
338         -$(RM) -r .libs
339         -$(RM) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB)
340         -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN))
341         -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
342         -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
343 # remove idl generated files (sources)
344         -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
345 # remove idl generated files (headers)
346         -$(RM)  $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_H))
347         -$(RM)  $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_H))
348         -$(RM) $(LIB_MOC_SRC) $(BIN_MOC_SRC)
349         -$(RM) $(LIB_SWIG_SRC)
350
351 # Like `clean' except it also removes files that were created by running
352 # configure.  If you've unpacked the source and built without creating
353 # any other files, then `make distclean' will leave only the files that were
354 # in the distribution.
355 #
356 distclean: clean
357         #remove qm file !
358         -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
359         #remove include files
360         -$(RM) $(DEST_HEADERS)
361         -$(RM) $(DISTCLEAN) *.bak *.old *.new .dep*
362         @if test -f $(srcdir)/Makefile.in; then                               \
363            (@SETX@; $(RM) Makefile);                                          \
364         fi
365
366
367 #implicits rules
368 .cc.o:
369         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
370
371 .cc.lo:
372         $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
373
374 .cxx.o:
375         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
376
377 .cxx.lo:
378         $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
379
380 .c.o:
381         $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
382
383 .c.lo:
384         $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $<
385
386 .f.o:
387         $(FC) $(FFLAGS) -c $< -o $@
388
389 .f.lo:
390         $(LT) --mode=compile $(FC) $(FFLAGS) -c $<
391
392 .ui.h:
393         $(UIC) -o $@  $<
394
395 .ui.cxx:
396         $(UIC) -o $@ -i $*.h $<
397
398 #pattern rules
399 %_moc.cxx : %.h
400         $(MOC) $< -o $@
401
402 %_wrap.cxx : %.i
403         $(SWIG) $(SWIG_FLAGS) -o $@ $<
404
405 $(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm: %.po
406         $(MSG2QM) $< $@ ; \
407
408 #------------------------------------------------------------------------------
409 # The following section of this makefile contains dependencies between the
410 # source files and the header files.  If GNU make and GCC are being used then
411 # the dependencies are in the form of rules that cause the information to
412 # be kept updated automatically.  Otherwise the dependencies are listed
413 # explicitly and come from the `.distdep' files in the various directories.
414 # These files are part of the distribution and are generated automatically on
415 # GNU/GCC systems.
416 #------------------------------------------------------------------------------
417
418 @DEPEND@