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