]> SALOME platform Git repositories - modules/kernel.git/blob - salome_adm/unix/DEPRECATED/make_conclude.in
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[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)) $(LIB_CLIENT_IDL:%.idl=%DynSK.cc)
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)) $(LIB_CLIENT_IDL:%.idl=%DynSK.o)
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@LIB_LOCATION_SUFFIX@/salome/%.la)
39 LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la, $(filter %.la, $(LIB)))
40 LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a, $(filter %.a, $(LIB)))
41 LIB_BUILD_SO = $(patsubst %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/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@LIB_LOCATION_SUFFIX@/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@LIB_LOCATION_SUFFIX@/salome/_$(LIB_SWIG) || true;\
64         fi;
65
66 $(LIB_BUILD_A): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a: %.a
67         -$(RM) $@
68         ln -sf $(CURDIR)/$< $@ || true
69
70 $(LIB_BUILD_SO): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/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)) $(BIN_CLIENT_IDL:%.idl=%DynSK.cc)
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)) $(BIN_CLIENT_IDL:%.idl=%DynSK.o)
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@LIB_LOCATION_SUFFIX@/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_ALL := $(filter-out %.in, $(RESOURCES_FILES_ALL))
163 RESOURCES_FILES ?= $(RESOURCES_FILES_ALL)
164
165 resources: resources-po resources-cp 
166
167 resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
168
169 resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
170
171 $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%): $(top_builddir)/share/salome/resources/$(MODULE_NAME)/% : %
172         cp -fr $< $@;
173
174 # Make installation directories if they don't exist.
175 $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir):
176         $(INSTALL) -d $@ && chmod 755 $@
177
178 # Install the library, the public header files, and programs.
179 install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm install-res
180         @for f in X $(LIB); do                                                \
181            if test $$f != X; then                                             \
182               ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1);                  \
183            fi;                                                                \
184         done
185         @if test "X$(LIB_SWIG)" != "X"; then                                  \
186           (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG)  || true); \
187         fi;                                                                   
188         @for f in X $(BIN); do                                                \
189            if test $$f != X; then                                             \
190              ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
191            fi;                                                                \
192         done
193 # Install tests programmes in bindir
194         @for f in X $(TEST_PROGS); do                                         \
195            if test $$f != X; then                                             \
196              ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
197            fi;                                                                \
198         done
199 # Install exported includes in includedir
200         @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do                       \
201            if test $$f != X; then                                             \
202              (cp -p -f $$f $(includedir) || exit 1);                          \
203            fi;                                                                \
204         done
205
206 # Install python script in $(bindir)
207 install-python: $(bindir) $(EXPORT_PYSCRIPTS:%=install-%) $(UI_PY_FILES:%=install-%)
208
209 $(UI_PY_FILES:%=install-%): install-%: %
210         $(INSTALL_PROGRAM) $< $(bindir)/.
211
212 $(EXPORT_PYSCRIPTS:%=install-%): install-%: %
213         $(INSTALL_PROGRAM) $< $(bindir)/.
214
215 #install-python: $(bindir) $(EXPORT_PYSCRIPTS)
216 #       @for f in X $(EXPORT_PYSCRIPTS); do                           \
217 #          if test $$f != X; then                                     \
218 #            ($(INSTALL_PROGRAM) $$f $(bindir)/. || exit 1);          \
219 #          fi;                                                        \
220 #       done
221
222 # Install pyqt script in $(install-sharedpyqt)
223 install-sharedpyqt: $(sharedpydir) $(EXPORT_SHAREDPYSCRIPTS:%=install-%) 
224
225 $(EXPORT_SHAREDPYSCRIPTS:%=install-%): install-%: %
226         $(INSTALL_PROGRAM) $< $(sharedpydir)/.
227
228
229 # generic rule to install .qm files :
230 install-qm: resources
231         $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
232         @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm); do \
233            if test $$f != X; then                                                        \
234              ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1);                      \
235            fi;                                                                           \
236         done
237
238 # generic rule to install resources files (png, ini ...):
239 install-res: resources
240         $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
241         @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%); do \
242            if test $$f != X; then                                                        \
243              ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1);                      \
244            fi;                                                                           \
245         done  
246
247 # Removes those things that `make install' (would have) installed.
248 uninstall:
249         @if test "X$(LIB)" != X; then                                         \
250            for f in $(LIB); do                                                \
251               $(LT_UNINSTALL) $(libdir)/$$f;                                  \
252            done;                                                              \
253         fi
254         @if test "X$(BIN)" != X; then                                         \
255            for f in $(BIN); do                                                \
256               $(LT_UNINSTALL) $(bindir)/$$f;                                  \
257            done;                                                              \
258         fi
259         @for f in X $(TEST_PROGS); do                                         \
260            if test $$f != X; then                                             \
261              $(LT_UNINSTALL) $(bindir)/$$f;                                   \
262            fi;                                                                \
263         done
264 # Uninstall exported includes in includedir
265         @for f in X $(EXPORT_HEADERS); do                                     \
266            if test $$f != X; then                                             \
267              $(LT_UNINSTALL) $(includedir)/$$f;                               \
268            fi;                                                                \
269         done
270 # Uninstall python script in $(bindir)
271         @for f in X $(EXPORT_PYSCRIPTS); do                                   \
272            if test $$f != X; then                                             \
273              $(LT_UNINSTALL) $(bindir)/$$f ;                  \
274            fi;                                                                \
275         done
276
277 # Uninstall python script in $(bindir)
278         @for f in X $(UI_PY_FILES); do                                        \
279            if test $$f != X; then                                             \
280              $(LT_UNINSTALL) $(bindir)/$$f ;                  \
281            fi;                                                                \
282         done
283
284 # Uninstall pyqt script in $(sharedpydir)
285         @for f in X $(EXPORT_SHAREDPYSCRIPTS); do                                     \
286            if test $$f != X; then                                             \
287              $(LT_UNINSTALL) $(sharedpydir)/$$f ;                     \
288            fi;                                                                \
289         done
290
291 # Uninstall qm files
292         @for f in X $(PO_FILES:%.po=%.qm); do         \
293            if test $$f != X; then                                             \
294              $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ;                        \
295            fi;                                                                \
296         done
297
298 # remove all dependencies files
299 #
300 cleandep:
301         -$(RM) .dep*
302
303 # Removes temporary files without removing the final target files.  That is,
304 # remove things like object files but not libraries or executables.
305 #
306 mostlyclean: cleandep
307         -$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o)
308         -$(RM) $(BIN_OBJ) $(BIN:%=%.o)
309         -$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o)
310         -$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN)
311
312 # Like `mostlyclean' except it also removes the final targets: things like
313 # libraries and executables.  This target doesn't remove any file that
314 # is part of the SALOME distribution.
315 #
316 clean: mostlyclean
317         -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN)
318         -$(RM) TAGS *~ *# core *.core 
319         -$(RM) -r .libs
320         -$(RM) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB)
321         -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN))
322         -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
323         -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB))
324 # remove idl generated files (sources)
325         -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
326 # remove idl generated files (headers)
327         -$(RM)  $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_H))
328         -$(RM)  $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_H))
329         -$(RM) $(LIB_MOC_SRC) $(BIN_MOC_SRC)
330         -$(RM) $(LIB_SWIG_SRC)
331
332 # Like `clean' except it also removes files that were created by running
333 # configure.  If you've unpacked the source and built without creating
334 # any other files, then `make distclean' will leave only the files that were
335 # in the distribution.
336 #
337 distclean: clean
338         #remove qm file !
339         -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
340         #remove include files
341         -$(RM) $(DEST_HEADERS)
342         -$(RM) $(DISTCLEAN) *.bak *.old *.new .dep*
343         @if test -f $(srcdir)/Makefile.in; then                               \
344            (@SETX@; $(RM) Makefile);                                          \
345         fi
346
347
348 #implicits rules
349 .cc.o:
350         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
351
352 .cc.lo:
353         $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
354
355 .cxx.o:
356         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
357
358 .cxx.lo:
359         $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
360
361 .c.o:
362         $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
363
364 .c.lo:
365         $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $<
366
367 .f.o:
368         $(FC) $(FFLAGS) -c $< -o $@
369
370 .f.lo:
371         $(LT) --mode=compile $(FC) $(FFLAGS) -c $<
372
373 .ui.h:
374         $(UIC) -o $@  $<
375
376 .ui.cxx:
377         $(UIC) -o $@ -i $*.h $<
378
379 #pattern rules
380 %_moc.cxx : %.h
381         $(MOC) $< -o $@
382
383 %_wrap.cxx : %.i
384         $(SWIG) $(SWIG_FLAGS) -o $@ $<
385
386 $(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm: %.po
387         $(MSG2QM) $< $@ ; \
388
389 #------------------------------------------------------------------------------
390 # The following section of this makefile contains dependencies between the
391 # source files and the header files.  If GNU make and GCC are being used then
392 # the dependencies are in the form of rules that cause the information to
393 # be kept updated automatically.  Otherwise the dependencies are listed
394 # explicitly and come from the `.distdep' files in the various directories.
395 # These files are part of the distribution and are generated automatically on
396 # GNU/GCC systems.
397 #------------------------------------------------------------------------------
398
399 @DEPEND@