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