Salome HOME
Fix for bug IPAL9595 ( 3.0.0(current2707): SMESH - "Scalar Bar Properties" does not...
[modules/smesh.git] / adm_local / unix / 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
42 ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),)
43 LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB)))
44 else
45 LIB_SWIG = 
46 endif
47
48 lib: $(LIB_BUILD) $(LIB_CLIENT_PY)
49 # we don't build static library !
50
51 $(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la
52         -$(RM) $@
53         -$(RM) $(patsubst %.la, %.so, $@)
54         -$(RM) $(patsubst %.la, %.a, $@)
55         ln -sf $(CURDIR)/$< $@ || true
56         ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \
57               $(patsubst %.la, %.so, $@) || true
58         ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \
59               $(patsubst %.la, %.so, $@).0 || true
60
61         if ! test -z $(LIB_SWIG) ; then \
62            ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\
63         fi;
64
65 $(LIB_BUILD_A): $(top_builddir)/lib/salome/%.a: %.a
66         -$(RM) $@
67         ln -sf $(CURDIR)/$< $@ || true
68
69 $(LIB): $(LIB_OBJ)
70         @$(LT) --mode=link $(CXX) -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
71
72 # transform idl reference in appropriate obj file
73 BIN_CLIENT_SRC = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX))
74 BIN_SERVER_SRC = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_CXX))
75 BIN_MOC_SRC = $(BIN_MOC:%.h=%_moc.cxx)
76 BIN_SRC+=$(BIN_MOC_SRC)
77 BIN_DEP=$(BIN:%=%.cxx) $(BIN_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
78
79 BIN_CLIENT_OBJ = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ))
80 BIN_SERVER_OBJ = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ)) 
81 # transform c file in appropriate libtool obj file (.c)
82 BIN_OBJ_C =  $(patsubst %.c,  %.o, $(filter %.c, $(BIN_SRC)))
83 # transform c++ file in appropriate libtool obj file (.cc and .cxx)
84 BIN_OBJ_CC = $(patsubst %.cc,  %.o, $(filter %.cc, $(BIN_SRC)))
85 BIN_OBJ_CXX = $(patsubst %.cxx,  %.o, $(filter %.cxx, $(BIN_SRC)))
86 # all obj file in bin target
87 BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ) 
88
89 bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts
90
91 BIN_LIB=$(LIB:lib%.la=-l%)
92
93 $(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: %
94         -$(RM) $@
95         ln -sf $(CURDIR)/$< $@
96
97 $(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ)
98         $(CXX) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN)
99
100 # copy python scripts in $(top_builddir)/bin/salome
101 #
102 DEST_PYSCRIPTS = $(EXPORT_PYSCRIPTS:%=$(top_builddir)/bin/salome/%)
103 pyscripts: $(DEST_PYSCRIPTS)
104 $(DEST_PYSCRIPTS): $(top_builddir)/bin/salome/%: %
105         cp -f $< $@
106
107 # copy pyqt files in $(PYTHON_SHARED_SITE)
108 #
109 PYTHON_SHARED_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
110
111 $(PYTHON_SHARED_SITE):
112         $(INSTALL) -d  $@
113
114 DEST_SHAREDPYSCRIPTS = $(EXPORT_SHAREDPYSCRIPTS:%=$(PYTHON_SHARED_SITE)/%)
115 sharedpyscripts: $(PYTHON_SHARED_SITE) $(DEST_SHAREDPYSCRIPTS)
116 $(DEST_SHAREDPYSCRIPTS): $(PYTHON_SHARED_SITE)/%: %
117         cp -f $< $@
118
119 check: test
120
121 tests: test
122
123 test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%) 
124
125
126 # copy header file in $(inc_builddir)
127 #
128 DEST_HEADERS = $(EXPORT_HEADERS:%=$(inc_builddir)/%)
129 inc: $(DEST_HEADERS)
130 $(DEST_HEADERS): $(inc_builddir)/%: %
131         cp -f $< $@
132
133 # build resources file (icons and messages) : .qm file from .po file
134 resources: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm)
135
136 # Make installation directories if they don't exist.
137 $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir):
138         $(INSTALL) -d $@ && chmod 755 $@
139
140 # Install the library, the public header files, and programs.
141 install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm
142         @for f in X $(LIB); do                                                \
143            if test $$f != X; then                                             \
144               ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1);                  \
145            fi;                                                                \
146         done
147         @if ! test -z $(LIB_SWIG) ; then                                      \
148           (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG)  || true); \
149         fi;                                                                   
150         @for f in X $(BIN); do                                                \
151            if test $$f != X; then                                             \
152              ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
153            fi;                                                                \
154         done
155 # Install tests programmes in bindir
156         @for f in X $(TEST_PROGS); do                                         \
157            if test $$f != X; then                                             \
158              ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);                  \
159            fi;                                                                \
160         done
161 # Install exported includes in includedir
162         @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do                       \
163            if test $$f != X; then                                             \
164              (cp -p -f $$f $(includedir) || exit 1);                          \
165            fi;                                                                \
166         done
167
168 # Install python script in $(bindir)
169 install-python: $(bindir) $(EXPORT_PYSCRIPTS:%=install-%)
170
171 $(EXPORT_PYSCRIPTS:%=install-%): install-%: %
172         $(INSTALL_PROGRAM) $< $(bindir)/.
173
174 #install-python: $(bindir) $(EXPORT_PYSCRIPTS)
175 #       @for f in X $(EXPORT_PYSCRIPTS); do                           \
176 #          if test $$f != X; then                                     \
177 #            ($(INSTALL_PROGRAM) $$f $(bindir)/. || exit 1);          \
178 #          fi;                                                        \
179 #       done
180
181 # Install pyqt script in $(install-sharedpyqt)
182 install-sharedpyqt: $(sharedpydir) $(EXPORT_SHAREDPYSCRIPTS:%=install-%) 
183
184 $(EXPORT_SHAREDPYSCRIPTS:%=install-%): install-%: %
185         $(INSTALL_PROGRAM) $< $(sharedpydir)/.
186
187
188 # generic rule to install .qm files :
189 install-qm: resources
190         $(INSTALL) -d $(datadir)/resources
191         @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm); do \
192            if test $$f != X; then                                                        \
193              ($(INSTALL_DATA) $$f $(datadir)/resources/. || exit 1);                     \
194            fi;                                                                           \
195         done
196
197 # Removes those things that `make install' (would have) installed.
198 uninstall:
199         @if test "X$(LIB)" != X; then                                         \
200            for f in $(LIB); do                                                \
201               $(LT_UNINSTALL) $(libdir)/$$f;                                  \
202            done;                                                              \
203         fi
204         @if test "X$(BIN)" != X; then                                         \
205            for f in $(BIN); do                                                \
206               $(LT_UNINSTALL) $(bindir)/$$f;                                  \
207            done;                                                              \
208         fi
209         @for f in X $(TEST_PROGS); do                                         \
210            if test $$f != X; then                                             \
211              $(LT_UNINSTALL) $(bindir)/$$f;                                   \
212            fi;                                                                \
213         done
214 # Uninstall exported includes in includedir
215         @for f in X $(EXPORT_HEADERS); do                                     \
216            if test $$f != X; then                                             \
217              $(LT_UNINSTALL) $(includedir)/$$f;                               \
218            fi;                                                                \
219         done
220 # Uninstall python script in $(bindir)
221         @for f in X $(EXPORT_PYSCRIPTS); do                                   \
222            if test $$f != X; then                                             \
223              $(LT_UNINSTALL) $(bindir)/$$f ;                  \
224            fi;                                                                \
225         done
226
227 # Uninstall pyqt script in $(sharedpydir)
228         @for f in X $(EXPORT_SHAREDPYSCRIPTS); do                                     \
229            if test $$f != X; then                                             \
230              $(LT_UNINSTALL) $(sharedpydir)/$$f ;                     \
231            fi;                                                                \
232         done
233
234 # Uninstall qm files
235         @for f in X $(PO_FILES:%.po=%.qm); do         \
236            if test $$f != X; then                                             \
237              $(LT_UNINSTALL) $(datadir)/resources/$$f ;                       \
238            fi;                                                                \
239         done
240
241 # remove all dependencies files
242 #
243 cleandep:
244         -$(RM) .dep*
245
246 # Removes temporary files without removing the final target files.  That is,
247 # remove things like object files but not libraries or executables.
248 #
249 mostlyclean: cleandep
250         -$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o)
251         -$(RM) $(BIN_OBJ) $(BIN:%=%.o)
252         -$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o)
253         -$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN)
254
255 # Like `mostlyclean' except it also removes the final targets: things like
256 # libraries and executables.  This target doesn't remove any file that
257 # is part of the SALOME distribution.
258 #
259 clean: mostlyclean
260         -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN)
261         -$(RM) TAGS *~ *# core *.core 
262         -$(RM) -r .libs
263         -$(RM) $(top_builddir)/lib/salome/$(LIB)
264         -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN))
265         -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib/salome/$(LIB))
266         -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib/salome/$(LIB))
267 # remove idl generated files (sources)
268         -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
269 # remove idl generated files (headers)
270         -$(RM)  $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_H))
271         -$(RM)  $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_H))
272         -$(RM) $(LIB_MOC_SRC) $(BIN_MOC_SRC)
273         -$(RM) $(LIB_SWIG_SRC)
274
275 # Like `clean' except it also removes files that were created by running
276 # configure.  If you've unpacked the source and built without creating
277 # any other files, then `make distclean' will leave only the files that were
278 # in the distribution.
279 #
280 distclean: clean
281         #remove qm file !
282         -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm)
283         #remove include files
284         -$(RM) $(DEST_HEADERS)
285         -$(RM) $(DISTCLEAN) *.bak *.old *.new .dep*
286         @if test -f $(srcdir)/Makefile.in; then                               \
287            (@SETX@; $(RM) Makefile);                                          \
288         fi
289
290
291 #implicits rules
292 .cc.o:
293         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
294
295 .cc.lo:
296         $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
297
298 .cxx.o:
299         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
300
301 .cxx.lo:
302         $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
303
304 .c.o:
305         $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
306
307 .c.lo:
308         $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $<
309
310 .f.o:
311         $(FC) $(FFLAGS) -c $< -o $@
312
313 .f.lo:
314         $(LT) --mode=compile $(FC) $(FFLAGS) -c $<
315
316 .ui.h:
317         $(UIC) -o $@  $<
318
319 .ui.cxx:
320         $(UIC) -o $@ -i $*.h $<
321
322 #pattern rules
323 %_moc.cxx : %.h
324         $(MOC) $< -o $@
325
326 %_wrap.cxx : %.i
327         $(SWIG) $(SWIG_FLAGS) -o $@ $<
328
329 $(top_builddir)/share/salome/resources/%.qm: %.po
330                 $(MSG2QM) $< $@ ; \
331
332 #------------------------------------------------------------------------------
333 # The following section of this makefile contains dependencies between the
334 # source files and the header files.  If GNU make and GCC are being used then
335 # the dependencies are in the form of rules that cause the information to
336 # be kept updated automatically.  Otherwise the dependencies are listed
337 # explicitly and come from the `.distdep' files in the various directories.
338 # These files are part of the distribution and are generated automatically on
339 # GNU/GCC systems.
340 #------------------------------------------------------------------------------
341
342 @DEPEND@